mezon-js-protobuf 1.8.58 → 1.8.60

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/rtapi/realtime.ts CHANGED
@@ -367,19 +367,19 @@ export interface Envelope {
367
367
  user_status_event?:
368
368
  | UserStatusEvent
369
369
  | undefined;
370
- /** */
370
+ /** remove friend */
371
371
  remove_friend?:
372
372
  | RemoveFriend
373
373
  | undefined;
374
- /** */
374
+ /** webhook event */
375
375
  webhook_event?:
376
376
  | Webhook
377
377
  | undefined;
378
- /** */
378
+ /** notification */
379
379
  noti_user_channel?:
380
380
  | NotificationUserChannel
381
381
  | undefined;
382
- /** */
382
+ /** join channel app */
383
383
  join_channel_app_data?:
384
384
  | JoinChannelAppData
385
385
  | undefined;
@@ -444,7 +444,11 @@ export interface Envelope {
444
444
  | AddFriend
445
445
  | undefined;
446
446
  /** Ban channel user */
447
- ban_user_event?: BannedUserEvent | undefined;
447
+ ban_user_event?:
448
+ | BannedUserEvent
449
+ | undefined;
450
+ /** Active archive thread */
451
+ active_archived_thread?: ActiveArchivedThread | undefined;
448
452
  }
449
453
 
450
454
  export interface FollowEvent {
@@ -1483,26 +1487,14 @@ export interface UserProfileRedis {
1483
1487
  avatar: string;
1484
1488
  /** Display name */
1485
1489
  display_name: string;
1486
- /** about me */
1487
- about_me: string;
1488
1490
  /** user status */
1489
1491
  user_status: string;
1490
1492
  /** status online, offline, invisible, idle, do not disturb */
1491
1493
  status: string;
1492
- /** create time */
1493
- create_time_second: number;
1494
1494
  /** FCM token */
1495
1495
  fcm_tokens: FCMTokens[];
1496
- /** isOnline */
1497
- online: boolean;
1498
- /** is disabled */
1499
- is_disabled: boolean;
1500
1496
  /** clans */
1501
1497
  joined_clans: string[];
1502
- /** public key */
1503
- pubkey: string;
1504
- /** mezon id */
1505
- mezon_id: string;
1506
1498
  /** app token */
1507
1499
  app_token: string;
1508
1500
  /** app url */
@@ -1744,6 +1736,11 @@ export interface TransferOwnershipEvent {
1744
1736
  curr_owner: string;
1745
1737
  }
1746
1738
 
1739
+ export interface ActiveArchivedThread {
1740
+ clan_id: string;
1741
+ channel_id: string;
1742
+ }
1743
+
1747
1744
  function createBaseEnvelope(): Envelope {
1748
1745
  return {
1749
1746
  cid: "",
@@ -1835,6 +1832,7 @@ function createBaseEnvelope(): Envelope {
1835
1832
  transfer_ownership_event: undefined,
1836
1833
  add_friend: undefined,
1837
1834
  ban_user_event: undefined,
1835
+ active_archived_thread: undefined,
1838
1836
  };
1839
1837
  }
1840
1838
 
@@ -2108,6 +2106,9 @@ export const Envelope = {
2108
2106
  if (message.ban_user_event !== undefined) {
2109
2107
  BannedUserEvent.encode(message.ban_user_event, writer.uint32(714).fork()).ldelim();
2110
2108
  }
2109
+ if (message.active_archived_thread !== undefined) {
2110
+ ActiveArchivedThread.encode(message.active_archived_thread, writer.uint32(722).fork()).ldelim();
2111
+ }
2111
2112
  return writer;
2112
2113
  },
2113
2114
 
@@ -2741,6 +2742,13 @@ export const Envelope = {
2741
2742
 
2742
2743
  message.ban_user_event = BannedUserEvent.decode(reader, reader.uint32());
2743
2744
  continue;
2745
+ case 90:
2746
+ if (tag !== 722) {
2747
+ break;
2748
+ }
2749
+
2750
+ message.active_archived_thread = ActiveArchivedThread.decode(reader, reader.uint32());
2751
+ continue;
2744
2752
  }
2745
2753
  if ((tag & 7) === 4 || tag === 0) {
2746
2754
  break;
@@ -2953,6 +2961,9 @@ export const Envelope = {
2953
2961
  : undefined,
2954
2962
  add_friend: isSet(object.add_friend) ? AddFriend.fromJSON(object.add_friend) : undefined,
2955
2963
  ban_user_event: isSet(object.ban_user_event) ? BannedUserEvent.fromJSON(object.ban_user_event) : undefined,
2964
+ active_archived_thread: isSet(object.active_archived_thread)
2965
+ ? ActiveArchivedThread.fromJSON(object.active_archived_thread)
2966
+ : undefined,
2956
2967
  };
2957
2968
  },
2958
2969
 
@@ -3227,6 +3238,9 @@ export const Envelope = {
3227
3238
  if (message.ban_user_event !== undefined) {
3228
3239
  obj.ban_user_event = BannedUserEvent.toJSON(message.ban_user_event);
3229
3240
  }
3241
+ if (message.active_archived_thread !== undefined) {
3242
+ obj.active_archived_thread = ActiveArchivedThread.toJSON(message.active_archived_thread);
3243
+ }
3230
3244
  return obj;
3231
3245
  },
3232
3246
 
@@ -3521,6 +3535,10 @@ export const Envelope = {
3521
3535
  message.ban_user_event = (object.ban_user_event !== undefined && object.ban_user_event !== null)
3522
3536
  ? BannedUserEvent.fromPartial(object.ban_user_event)
3523
3537
  : undefined;
3538
+ message.active_archived_thread =
3539
+ (object.active_archived_thread !== undefined && object.active_archived_thread !== null)
3540
+ ? ActiveArchivedThread.fromPartial(object.active_archived_thread)
3541
+ : undefined;
3524
3542
  return message;
3525
3543
  },
3526
3544
  };
@@ -12121,16 +12139,10 @@ function createBaseUserProfileRedis(): UserProfileRedis {
12121
12139
  username: "",
12122
12140
  avatar: "",
12123
12141
  display_name: "",
12124
- about_me: "",
12125
12142
  user_status: "",
12126
12143
  status: "",
12127
- create_time_second: 0,
12128
12144
  fcm_tokens: [],
12129
- online: false,
12130
- is_disabled: false,
12131
12145
  joined_clans: [],
12132
- pubkey: "",
12133
- mezon_id: "",
12134
12146
  app_token: "",
12135
12147
  app_url: "",
12136
12148
  is_bot: false,
@@ -12152,47 +12164,29 @@ export const UserProfileRedis = {
12152
12164
  if (message.display_name !== "") {
12153
12165
  writer.uint32(34).string(message.display_name);
12154
12166
  }
12155
- if (message.about_me !== "") {
12156
- writer.uint32(42).string(message.about_me);
12157
- }
12158
12167
  if (message.user_status !== "") {
12159
- writer.uint32(50).string(message.user_status);
12168
+ writer.uint32(42).string(message.user_status);
12160
12169
  }
12161
12170
  if (message.status !== "") {
12162
- writer.uint32(58).string(message.status);
12163
- }
12164
- if (message.create_time_second !== 0) {
12165
- writer.uint32(64).uint32(message.create_time_second);
12171
+ writer.uint32(50).string(message.status);
12166
12172
  }
12167
12173
  for (const v of message.fcm_tokens) {
12168
- FCMTokens.encode(v!, writer.uint32(74).fork()).ldelim();
12169
- }
12170
- if (message.online !== false) {
12171
- writer.uint32(80).bool(message.online);
12172
- }
12173
- if (message.is_disabled !== false) {
12174
- writer.uint32(88).bool(message.is_disabled);
12174
+ FCMTokens.encode(v!, writer.uint32(58).fork()).ldelim();
12175
12175
  }
12176
12176
  for (const v of message.joined_clans) {
12177
- writer.uint32(98).string(v!);
12178
- }
12179
- if (message.pubkey !== "") {
12180
- writer.uint32(106).string(message.pubkey);
12181
- }
12182
- if (message.mezon_id !== "") {
12183
- writer.uint32(114).string(message.mezon_id);
12177
+ writer.uint32(66).string(v!);
12184
12178
  }
12185
12179
  if (message.app_token !== "") {
12186
- writer.uint32(122).string(message.app_token);
12180
+ writer.uint32(74).string(message.app_token);
12187
12181
  }
12188
12182
  if (message.app_url !== "") {
12189
- writer.uint32(130).string(message.app_url);
12183
+ writer.uint32(82).string(message.app_url);
12190
12184
  }
12191
12185
  if (message.is_bot !== false) {
12192
- writer.uint32(136).bool(message.is_bot);
12186
+ writer.uint32(88).bool(message.is_bot);
12193
12187
  }
12194
12188
  if (message.voip_token !== "") {
12195
- writer.uint32(146).string(message.voip_token);
12189
+ writer.uint32(98).string(message.voip_token);
12196
12190
  }
12197
12191
  return writer;
12198
12192
  },
@@ -12237,97 +12231,55 @@ export const UserProfileRedis = {
12237
12231
  break;
12238
12232
  }
12239
12233
 
12240
- message.about_me = reader.string();
12234
+ message.user_status = reader.string();
12241
12235
  continue;
12242
12236
  case 6:
12243
12237
  if (tag !== 50) {
12244
12238
  break;
12245
12239
  }
12246
12240
 
12247
- message.user_status = reader.string();
12241
+ message.status = reader.string();
12248
12242
  continue;
12249
12243
  case 7:
12250
12244
  if (tag !== 58) {
12251
12245
  break;
12252
12246
  }
12253
12247
 
12254
- message.status = reader.string();
12248
+ message.fcm_tokens.push(FCMTokens.decode(reader, reader.uint32()));
12255
12249
  continue;
12256
12250
  case 8:
12257
- if (tag !== 64) {
12251
+ if (tag !== 66) {
12258
12252
  break;
12259
12253
  }
12260
12254
 
12261
- message.create_time_second = reader.uint32();
12255
+ message.joined_clans.push(reader.string());
12262
12256
  continue;
12263
12257
  case 9:
12264
12258
  if (tag !== 74) {
12265
12259
  break;
12266
12260
  }
12267
12261
 
12268
- message.fcm_tokens.push(FCMTokens.decode(reader, reader.uint32()));
12262
+ message.app_token = reader.string();
12269
12263
  continue;
12270
12264
  case 10:
12271
- if (tag !== 80) {
12265
+ if (tag !== 82) {
12272
12266
  break;
12273
12267
  }
12274
12268
 
12275
- message.online = reader.bool();
12269
+ message.app_url = reader.string();
12276
12270
  continue;
12277
12271
  case 11:
12278
12272
  if (tag !== 88) {
12279
12273
  break;
12280
12274
  }
12281
12275
 
12282
- message.is_disabled = reader.bool();
12276
+ message.is_bot = reader.bool();
12283
12277
  continue;
12284
12278
  case 12:
12285
12279
  if (tag !== 98) {
12286
12280
  break;
12287
12281
  }
12288
12282
 
12289
- message.joined_clans.push(reader.string());
12290
- continue;
12291
- case 13:
12292
- if (tag !== 106) {
12293
- break;
12294
- }
12295
-
12296
- message.pubkey = reader.string();
12297
- continue;
12298
- case 14:
12299
- if (tag !== 114) {
12300
- break;
12301
- }
12302
-
12303
- message.mezon_id = reader.string();
12304
- continue;
12305
- case 15:
12306
- if (tag !== 122) {
12307
- break;
12308
- }
12309
-
12310
- message.app_token = reader.string();
12311
- continue;
12312
- case 16:
12313
- if (tag !== 130) {
12314
- break;
12315
- }
12316
-
12317
- message.app_url = reader.string();
12318
- continue;
12319
- case 17:
12320
- if (tag !== 136) {
12321
- break;
12322
- }
12323
-
12324
- message.is_bot = reader.bool();
12325
- continue;
12326
- case 18:
12327
- if (tag !== 146) {
12328
- break;
12329
- }
12330
-
12331
12283
  message.voip_token = reader.string();
12332
12284
  continue;
12333
12285
  }
@@ -12345,20 +12297,14 @@ export const UserProfileRedis = {
12345
12297
  username: isSet(object.username) ? globalThis.String(object.username) : "",
12346
12298
  avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
12347
12299
  display_name: isSet(object.display_name) ? globalThis.String(object.display_name) : "",
12348
- about_me: isSet(object.about_me) ? globalThis.String(object.about_me) : "",
12349
12300
  user_status: isSet(object.user_status) ? globalThis.String(object.user_status) : "",
12350
12301
  status: isSet(object.status) ? globalThis.String(object.status) : "",
12351
- create_time_second: isSet(object.create_time_second) ? globalThis.Number(object.create_time_second) : 0,
12352
12302
  fcm_tokens: globalThis.Array.isArray(object?.fcm_tokens)
12353
12303
  ? object.fcm_tokens.map((e: any) => FCMTokens.fromJSON(e))
12354
12304
  : [],
12355
- online: isSet(object.online) ? globalThis.Boolean(object.online) : false,
12356
- is_disabled: isSet(object.is_disabled) ? globalThis.Boolean(object.is_disabled) : false,
12357
12305
  joined_clans: globalThis.Array.isArray(object?.joined_clans)
12358
12306
  ? object.joined_clans.map((e: any) => globalThis.String(e))
12359
12307
  : [],
12360
- pubkey: isSet(object.pubkey) ? globalThis.String(object.pubkey) : "",
12361
- mezon_id: isSet(object.mezon_id) ? globalThis.String(object.mezon_id) : "",
12362
12308
  app_token: isSet(object.app_token) ? globalThis.String(object.app_token) : "",
12363
12309
  app_url: isSet(object.app_url) ? globalThis.String(object.app_url) : "",
12364
12310
  is_bot: isSet(object.is_bot) ? globalThis.Boolean(object.is_bot) : false,
@@ -12380,36 +12326,18 @@ export const UserProfileRedis = {
12380
12326
  if (message.display_name !== "") {
12381
12327
  obj.display_name = message.display_name;
12382
12328
  }
12383
- if (message.about_me !== "") {
12384
- obj.about_me = message.about_me;
12385
- }
12386
12329
  if (message.user_status !== "") {
12387
12330
  obj.user_status = message.user_status;
12388
12331
  }
12389
12332
  if (message.status !== "") {
12390
12333
  obj.status = message.status;
12391
12334
  }
12392
- if (message.create_time_second !== 0) {
12393
- obj.create_time_second = Math.round(message.create_time_second);
12394
- }
12395
12335
  if (message.fcm_tokens?.length) {
12396
12336
  obj.fcm_tokens = message.fcm_tokens.map((e) => FCMTokens.toJSON(e));
12397
12337
  }
12398
- if (message.online !== false) {
12399
- obj.online = message.online;
12400
- }
12401
- if (message.is_disabled !== false) {
12402
- obj.is_disabled = message.is_disabled;
12403
- }
12404
12338
  if (message.joined_clans?.length) {
12405
12339
  obj.joined_clans = message.joined_clans;
12406
12340
  }
12407
- if (message.pubkey !== "") {
12408
- obj.pubkey = message.pubkey;
12409
- }
12410
- if (message.mezon_id !== "") {
12411
- obj.mezon_id = message.mezon_id;
12412
- }
12413
12341
  if (message.app_token !== "") {
12414
12342
  obj.app_token = message.app_token;
12415
12343
  }
@@ -12434,16 +12362,10 @@ export const UserProfileRedis = {
12434
12362
  message.username = object.username ?? "";
12435
12363
  message.avatar = object.avatar ?? "";
12436
12364
  message.display_name = object.display_name ?? "";
12437
- message.about_me = object.about_me ?? "";
12438
12365
  message.user_status = object.user_status ?? "";
12439
12366
  message.status = object.status ?? "";
12440
- message.create_time_second = object.create_time_second ?? 0;
12441
12367
  message.fcm_tokens = object.fcm_tokens?.map((e) => FCMTokens.fromPartial(e)) || [];
12442
- message.online = object.online ?? false;
12443
- message.is_disabled = object.is_disabled ?? false;
12444
12368
  message.joined_clans = object.joined_clans?.map((e) => e) || [];
12445
- message.pubkey = object.pubkey ?? "";
12446
- message.mezon_id = object.mezon_id ?? "";
12447
12369
  message.app_token = object.app_token ?? "";
12448
12370
  message.app_url = object.app_url ?? "";
12449
12371
  message.is_bot = object.is_bot ?? false;
@@ -15917,6 +15839,80 @@ export const TransferOwnershipEvent = {
15917
15839
  },
15918
15840
  };
15919
15841
 
15842
+ function createBaseActiveArchivedThread(): ActiveArchivedThread {
15843
+ return { clan_id: "", channel_id: "" };
15844
+ }
15845
+
15846
+ export const ActiveArchivedThread = {
15847
+ encode(message: ActiveArchivedThread, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
15848
+ if (message.clan_id !== "") {
15849
+ writer.uint32(10).string(message.clan_id);
15850
+ }
15851
+ if (message.channel_id !== "") {
15852
+ writer.uint32(18).string(message.channel_id);
15853
+ }
15854
+ return writer;
15855
+ },
15856
+
15857
+ decode(input: _m0.Reader | Uint8Array, length?: number): ActiveArchivedThread {
15858
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
15859
+ let end = length === undefined ? reader.len : reader.pos + length;
15860
+ const message = createBaseActiveArchivedThread();
15861
+ while (reader.pos < end) {
15862
+ const tag = reader.uint32();
15863
+ switch (tag >>> 3) {
15864
+ case 1:
15865
+ if (tag !== 10) {
15866
+ break;
15867
+ }
15868
+
15869
+ message.clan_id = reader.string();
15870
+ continue;
15871
+ case 2:
15872
+ if (tag !== 18) {
15873
+ break;
15874
+ }
15875
+
15876
+ message.channel_id = reader.string();
15877
+ continue;
15878
+ }
15879
+ if ((tag & 7) === 4 || tag === 0) {
15880
+ break;
15881
+ }
15882
+ reader.skipType(tag & 7);
15883
+ }
15884
+ return message;
15885
+ },
15886
+
15887
+ fromJSON(object: any): ActiveArchivedThread {
15888
+ return {
15889
+ clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
15890
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
15891
+ };
15892
+ },
15893
+
15894
+ toJSON(message: ActiveArchivedThread): unknown {
15895
+ const obj: any = {};
15896
+ if (message.clan_id !== "") {
15897
+ obj.clan_id = message.clan_id;
15898
+ }
15899
+ if (message.channel_id !== "") {
15900
+ obj.channel_id = message.channel_id;
15901
+ }
15902
+ return obj;
15903
+ },
15904
+
15905
+ create<I extends Exact<DeepPartial<ActiveArchivedThread>, I>>(base?: I): ActiveArchivedThread {
15906
+ return ActiveArchivedThread.fromPartial(base ?? ({} as any));
15907
+ },
15908
+ fromPartial<I extends Exact<DeepPartial<ActiveArchivedThread>, I>>(object: I): ActiveArchivedThread {
15909
+ const message = createBaseActiveArchivedThread();
15910
+ message.clan_id = object.clan_id ?? "";
15911
+ message.channel_id = object.channel_id ?? "";
15912
+ return message;
15913
+ },
15914
+ };
15915
+
15920
15916
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
15921
15917
 
15922
15918
  export type DeepPartial<T> = T extends Builtin ? T