mezon-sdk 2.8.44 → 2.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.
@@ -6,7 +6,7 @@
6
6
  /* eslint-disable */
7
7
  import Long from "long";
8
8
  import _m0 from "protobufjs/minimal";
9
- import { ChannelDescription as ChannelDescription1, ChannelMessage, ChannelMessageHeader, CreateEventRequest, GiveCoffeeEvent, ListClanBadgeCountRequest, ListClanBadgeCountResponse, ListClanUnreadMsgIndicatorRequest, ListClanUnreadMsgIndicatorResponse, LogedDeviceList, MessageAttachment, MessageMention, MessageReaction, MessageRef, Notification, NotificationUserChannel, PermissionUpdate, Role, Rpc, TokenSentEvent, UserActivity, Webhook, } from "../api/api";
9
+ import { ChannelDescription as ChannelDescription1, ChannelMessage, ChannelMessageHeader, CreateEventRequest, GiveCoffeeEvent, ListChannelBadgeCountRequest, ListChannelBadgeCountResponse, ListClanBadgeCountResponse, ListUserOnlineRequest, ListUserOnlineResponse, LogedDeviceList, MessageAttachment, MessageMention, MessageReaction, MessageRef, Notification, NotificationUserChannel, PermissionUpdate, Role, Rpc, Session, TokenSentEvent, UserActivity, Webhook, } from "../api/api";
10
10
  import { BoolValue, Int32Value, StringValue } from "../google/protobuf/wrappers";
11
11
  export const protobufPackage = "mezon.realtime";
12
12
  /** The selection of possible error codes. */
@@ -87,7 +87,7 @@ export function error_CodeToJSON(object) {
87
87
  }
88
88
  function createBaseEnvelope() {
89
89
  return {
90
- cid: "",
90
+ cid: 0,
91
91
  channel: undefined,
92
92
  clan_join: undefined,
93
93
  channel_join: undefined,
@@ -178,15 +178,17 @@ function createBaseEnvelope() {
178
178
  ban_user_event: undefined,
179
179
  active_archived_thread: undefined,
180
180
  allow_anonymous_event: undefined,
181
- update_localcache_event: undefined,
181
+ api_request_event: undefined,
182
182
  clan_created_event: undefined,
183
183
  aiagent_enabled_event: undefined,
184
+ list_channel_users_banned_event: undefined,
185
+ refresh_session_event: undefined,
184
186
  };
185
187
  }
186
188
  export const Envelope = {
187
189
  encode(message, writer = _m0.Writer.create()) {
188
- if (message.cid !== "") {
189
- writer.uint32(10).string(message.cid);
190
+ if (message.cid !== 0) {
191
+ writer.uint32(8).int32(message.cid);
190
192
  }
191
193
  if (message.channel !== undefined) {
192
194
  Channel.encode(message.channel, writer.uint32(18).fork()).ldelim();
@@ -459,8 +461,8 @@ export const Envelope = {
459
461
  if (message.allow_anonymous_event !== undefined) {
460
462
  AllowAnonymousEvent.encode(message.allow_anonymous_event, writer.uint32(730).fork()).ldelim();
461
463
  }
462
- if (message.update_localcache_event !== undefined) {
463
- UpdateLocalCacheEvent.encode(message.update_localcache_event, writer.uint32(738).fork()).ldelim();
464
+ if (message.api_request_event !== undefined) {
465
+ ApiRequestEvent.encode(message.api_request_event, writer.uint32(738).fork()).ldelim();
464
466
  }
465
467
  if (message.clan_created_event !== undefined) {
466
468
  ClanCreatedEvent.encode(message.clan_created_event, writer.uint32(746).fork()).ldelim();
@@ -468,6 +470,12 @@ export const Envelope = {
468
470
  if (message.aiagent_enabled_event !== undefined) {
469
471
  AIAgentEnabledEvent.encode(message.aiagent_enabled_event, writer.uint32(754).fork()).ldelim();
470
472
  }
473
+ if (message.list_channel_users_banned_event !== undefined) {
474
+ ListChannelUsersBannedEvent.encode(message.list_channel_users_banned_event, writer.uint32(762).fork()).ldelim();
475
+ }
476
+ if (message.refresh_session_event !== undefined) {
477
+ Session.encode(message.refresh_session_event, writer.uint32(770).fork()).ldelim();
478
+ }
471
479
  return writer;
472
480
  },
473
481
  decode(input, length) {
@@ -478,10 +486,10 @@ export const Envelope = {
478
486
  const tag = reader.uint32();
479
487
  switch (tag >>> 3) {
480
488
  case 1:
481
- if (tag !== 10) {
489
+ if (tag !== 8) {
482
490
  break;
483
491
  }
484
- message.cid = reader.string();
492
+ message.cid = reader.int32();
485
493
  continue;
486
494
  case 2:
487
495
  if (tag !== 18) {
@@ -1027,7 +1035,7 @@ export const Envelope = {
1027
1035
  if (tag !== 738) {
1028
1036
  break;
1029
1037
  }
1030
- message.update_localcache_event = UpdateLocalCacheEvent.decode(reader, reader.uint32());
1038
+ message.api_request_event = ApiRequestEvent.decode(reader, reader.uint32());
1031
1039
  continue;
1032
1040
  case 93:
1033
1041
  if (tag !== 746) {
@@ -1041,6 +1049,18 @@ export const Envelope = {
1041
1049
  }
1042
1050
  message.aiagent_enabled_event = AIAgentEnabledEvent.decode(reader, reader.uint32());
1043
1051
  continue;
1052
+ case 95:
1053
+ if (tag !== 762) {
1054
+ break;
1055
+ }
1056
+ message.list_channel_users_banned_event = ListChannelUsersBannedEvent.decode(reader, reader.uint32());
1057
+ continue;
1058
+ case 96:
1059
+ if (tag !== 770) {
1060
+ break;
1061
+ }
1062
+ message.refresh_session_event = Session.decode(reader, reader.uint32());
1063
+ continue;
1044
1064
  }
1045
1065
  if ((tag & 7) === 4 || tag === 0) {
1046
1066
  break;
@@ -1051,7 +1071,7 @@ export const Envelope = {
1051
1071
  },
1052
1072
  fromJSON(object) {
1053
1073
  return {
1054
- cid: isSet(object.cid) ? globalThis.String(object.cid) : "",
1074
+ cid: isSet(object.cid) ? globalThis.Number(object.cid) : 0,
1055
1075
  channel: isSet(object.channel) ? Channel.fromJSON(object.channel) : undefined,
1056
1076
  clan_join: isSet(object.clan_join) ? ClanJoin.fromJSON(object.clan_join) : undefined,
1057
1077
  channel_join: isSet(object.channel_join) ? ChannelJoin.fromJSON(object.channel_join) : undefined,
@@ -1258,8 +1278,8 @@ export const Envelope = {
1258
1278
  allow_anonymous_event: isSet(object.allow_anonymous_event)
1259
1279
  ? AllowAnonymousEvent.fromJSON(object.allow_anonymous_event)
1260
1280
  : undefined,
1261
- update_localcache_event: isSet(object.update_localcache_event)
1262
- ? UpdateLocalCacheEvent.fromJSON(object.update_localcache_event)
1281
+ api_request_event: isSet(object.api_request_event)
1282
+ ? ApiRequestEvent.fromJSON(object.api_request_event)
1263
1283
  : undefined,
1264
1284
  clan_created_event: isSet(object.clan_created_event)
1265
1285
  ? ClanCreatedEvent.fromJSON(object.clan_created_event)
@@ -1267,12 +1287,18 @@ export const Envelope = {
1267
1287
  aiagent_enabled_event: isSet(object.aiagent_enabled_event)
1268
1288
  ? AIAgentEnabledEvent.fromJSON(object.aiagent_enabled_event)
1269
1289
  : undefined,
1290
+ list_channel_users_banned_event: isSet(object.list_channel_users_banned_event)
1291
+ ? ListChannelUsersBannedEvent.fromJSON(object.list_channel_users_banned_event)
1292
+ : undefined,
1293
+ refresh_session_event: isSet(object.refresh_session_event)
1294
+ ? Session.fromJSON(object.refresh_session_event)
1295
+ : undefined,
1270
1296
  };
1271
1297
  },
1272
1298
  toJSON(message) {
1273
1299
  const obj = {};
1274
- if (message.cid !== "") {
1275
- obj.cid = message.cid;
1300
+ if (message.cid !== 0) {
1301
+ obj.cid = Math.round(message.cid);
1276
1302
  }
1277
1303
  if (message.channel !== undefined) {
1278
1304
  obj.channel = Channel.toJSON(message.channel);
@@ -1544,8 +1570,8 @@ export const Envelope = {
1544
1570
  if (message.allow_anonymous_event !== undefined) {
1545
1571
  obj.allow_anonymous_event = AllowAnonymousEvent.toJSON(message.allow_anonymous_event);
1546
1572
  }
1547
- if (message.update_localcache_event !== undefined) {
1548
- obj.update_localcache_event = UpdateLocalCacheEvent.toJSON(message.update_localcache_event);
1573
+ if (message.api_request_event !== undefined) {
1574
+ obj.api_request_event = ApiRequestEvent.toJSON(message.api_request_event);
1549
1575
  }
1550
1576
  if (message.clan_created_event !== undefined) {
1551
1577
  obj.clan_created_event = ClanCreatedEvent.toJSON(message.clan_created_event);
@@ -1553,6 +1579,12 @@ export const Envelope = {
1553
1579
  if (message.aiagent_enabled_event !== undefined) {
1554
1580
  obj.aiagent_enabled_event = AIAgentEnabledEvent.toJSON(message.aiagent_enabled_event);
1555
1581
  }
1582
+ if (message.list_channel_users_banned_event !== undefined) {
1583
+ obj.list_channel_users_banned_event = ListChannelUsersBannedEvent.toJSON(message.list_channel_users_banned_event);
1584
+ }
1585
+ if (message.refresh_session_event !== undefined) {
1586
+ obj.refresh_session_event = Session.toJSON(message.refresh_session_event);
1587
+ }
1556
1588
  return obj;
1557
1589
  },
1558
1590
  create(base) {
@@ -1560,7 +1592,7 @@ export const Envelope = {
1560
1592
  },
1561
1593
  fromPartial(object) {
1562
1594
  const message = createBaseEnvelope();
1563
- message.cid = object.cid ?? "";
1595
+ message.cid = object.cid ?? 0;
1564
1596
  message.channel = (object.channel !== undefined && object.channel !== null)
1565
1597
  ? Channel.fromPartial(object.channel)
1566
1598
  : undefined;
@@ -1854,10 +1886,9 @@ export const Envelope = {
1854
1886
  (object.allow_anonymous_event !== undefined && object.allow_anonymous_event !== null)
1855
1887
  ? AllowAnonymousEvent.fromPartial(object.allow_anonymous_event)
1856
1888
  : undefined;
1857
- message.update_localcache_event =
1858
- (object.update_localcache_event !== undefined && object.update_localcache_event !== null)
1859
- ? UpdateLocalCacheEvent.fromPartial(object.update_localcache_event)
1860
- : undefined;
1889
+ message.api_request_event = (object.api_request_event !== undefined && object.api_request_event !== null)
1890
+ ? ApiRequestEvent.fromPartial(object.api_request_event)
1891
+ : undefined;
1861
1892
  message.clan_created_event = (object.clan_created_event !== undefined && object.clan_created_event !== null)
1862
1893
  ? ClanCreatedEvent.fromPartial(object.clan_created_event)
1863
1894
  : undefined;
@@ -1865,59 +1896,58 @@ export const Envelope = {
1865
1896
  (object.aiagent_enabled_event !== undefined && object.aiagent_enabled_event !== null)
1866
1897
  ? AIAgentEnabledEvent.fromPartial(object.aiagent_enabled_event)
1867
1898
  : undefined;
1899
+ message.list_channel_users_banned_event =
1900
+ (object.list_channel_users_banned_event !== undefined && object.list_channel_users_banned_event !== null)
1901
+ ? ListChannelUsersBannedEvent.fromPartial(object.list_channel_users_banned_event)
1902
+ : undefined;
1903
+ message.refresh_session_event =
1904
+ (object.refresh_session_event !== undefined && object.refresh_session_event !== null)
1905
+ ? Session.fromPartial(object.refresh_session_event)
1906
+ : undefined;
1868
1907
  return message;
1869
1908
  },
1870
1909
  };
1871
- function createBaseUpdateLocalCacheEvent() {
1872
- return { params1: [], params2: [] };
1910
+ function createBaseApiRequestEvent() {
1911
+ return { api_index: 0, api_name: "", body: new Uint8Array(0) };
1873
1912
  }
1874
- export const UpdateLocalCacheEvent = {
1913
+ export const ApiRequestEvent = {
1875
1914
  encode(message, writer = _m0.Writer.create()) {
1876
- writer.uint32(10).fork();
1877
- for (const v of message.params1) {
1878
- writer.int64(v);
1915
+ if (message.api_index !== 0) {
1916
+ writer.uint32(8).int32(message.api_index);
1879
1917
  }
1880
- writer.ldelim();
1881
- writer.uint32(18).fork();
1882
- for (const v of message.params2) {
1883
- writer.int64(v);
1918
+ if (message.api_name !== "") {
1919
+ writer.uint32(18).string(message.api_name);
1920
+ }
1921
+ if (message.body.length !== 0) {
1922
+ writer.uint32(26).bytes(message.body);
1884
1923
  }
1885
- writer.ldelim();
1886
1924
  return writer;
1887
1925
  },
1888
1926
  decode(input, length) {
1889
1927
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1890
1928
  let end = length === undefined ? reader.len : reader.pos + length;
1891
- const message = createBaseUpdateLocalCacheEvent();
1929
+ const message = createBaseApiRequestEvent();
1892
1930
  while (reader.pos < end) {
1893
1931
  const tag = reader.uint32();
1894
1932
  switch (tag >>> 3) {
1895
1933
  case 1:
1896
- if (tag === 8) {
1897
- message.params1.push(longToString(reader.int64()));
1898
- continue;
1899
- }
1900
- if (tag === 10) {
1901
- const end2 = reader.uint32() + reader.pos;
1902
- while (reader.pos < end2) {
1903
- message.params1.push(longToString(reader.int64()));
1904
- }
1905
- continue;
1934
+ if (tag !== 8) {
1935
+ break;
1906
1936
  }
1907
- break;
1937
+ message.api_index = reader.int32();
1938
+ continue;
1908
1939
  case 2:
1909
- if (tag === 16) {
1910
- message.params2.push(longToString(reader.int64()));
1911
- continue;
1940
+ if (tag !== 18) {
1941
+ break;
1912
1942
  }
1913
- if (tag === 18) {
1914
- const end2 = reader.uint32() + reader.pos;
1915
- while (reader.pos < end2) {
1916
- message.params2.push(longToString(reader.int64()));
1917
- }
1918
- continue;
1943
+ message.api_name = reader.string();
1944
+ continue;
1945
+ case 3:
1946
+ if (tag !== 26) {
1947
+ break;
1919
1948
  }
1920
- break;
1949
+ message.body = reader.bytes();
1950
+ continue;
1921
1951
  }
1922
1952
  if ((tag & 7) === 4 || tag === 0) {
1923
1953
  break;
@@ -1928,27 +1958,32 @@ export const UpdateLocalCacheEvent = {
1928
1958
  },
1929
1959
  fromJSON(object) {
1930
1960
  return {
1931
- params1: globalThis.Array.isArray(object?.params1) ? object.params1.map((e) => globalThis.String(e)) : [],
1932
- params2: globalThis.Array.isArray(object?.params2) ? object.params2.map((e) => globalThis.String(e)) : [],
1961
+ api_index: isSet(object.api_index) ? globalThis.Number(object.api_index) : 0,
1962
+ api_name: isSet(object.api_name) ? globalThis.String(object.api_name) : "",
1963
+ body: isSet(object.body) ? bytesFromBase64(object.body) : new Uint8Array(0),
1933
1964
  };
1934
1965
  },
1935
1966
  toJSON(message) {
1936
1967
  const obj = {};
1937
- if (message.params1?.length) {
1938
- obj.params1 = message.params1;
1968
+ if (message.api_index !== 0) {
1969
+ obj.api_index = Math.round(message.api_index);
1939
1970
  }
1940
- if (message.params2?.length) {
1941
- obj.params2 = message.params2;
1971
+ if (message.api_name !== "") {
1972
+ obj.api_name = message.api_name;
1973
+ }
1974
+ if (message.body.length !== 0) {
1975
+ obj.body = base64FromBytes(message.body);
1942
1976
  }
1943
1977
  return obj;
1944
1978
  },
1945
1979
  create(base) {
1946
- return UpdateLocalCacheEvent.fromPartial(base ?? {});
1980
+ return ApiRequestEvent.fromPartial(base ?? {});
1947
1981
  },
1948
1982
  fromPartial(object) {
1949
- const message = createBaseUpdateLocalCacheEvent();
1950
- message.params1 = object.params1?.map((e) => e) || [];
1951
- message.params2 = object.params2?.map((e) => e) || [];
1983
+ const message = createBaseApiRequestEvent();
1984
+ message.api_index = object.api_index ?? 0;
1985
+ message.api_name = object.api_name ?? "";
1986
+ message.body = object.body ?? new Uint8Array(0);
1952
1987
  return message;
1953
1988
  },
1954
1989
  };
@@ -2120,6 +2155,69 @@ export const BannedUserEvent = {
2120
2155
  return message;
2121
2156
  },
2122
2157
  };
2158
+ function createBaseListChannelUsersBannedEvent() {
2159
+ return { banned_user_ids: [] };
2160
+ }
2161
+ export const ListChannelUsersBannedEvent = {
2162
+ encode(message, writer = _m0.Writer.create()) {
2163
+ writer.uint32(10).fork();
2164
+ for (const v of message.banned_user_ids) {
2165
+ writer.int64(v);
2166
+ }
2167
+ writer.ldelim();
2168
+ return writer;
2169
+ },
2170
+ decode(input, length) {
2171
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
2172
+ let end = length === undefined ? reader.len : reader.pos + length;
2173
+ const message = createBaseListChannelUsersBannedEvent();
2174
+ while (reader.pos < end) {
2175
+ const tag = reader.uint32();
2176
+ switch (tag >>> 3) {
2177
+ case 1:
2178
+ if (tag === 8) {
2179
+ message.banned_user_ids.push(longToString(reader.int64()));
2180
+ continue;
2181
+ }
2182
+ if (tag === 10) {
2183
+ const end2 = reader.uint32() + reader.pos;
2184
+ while (reader.pos < end2) {
2185
+ message.banned_user_ids.push(longToString(reader.int64()));
2186
+ }
2187
+ continue;
2188
+ }
2189
+ break;
2190
+ }
2191
+ if ((tag & 7) === 4 || tag === 0) {
2192
+ break;
2193
+ }
2194
+ reader.skipType(tag & 7);
2195
+ }
2196
+ return message;
2197
+ },
2198
+ fromJSON(object) {
2199
+ return {
2200
+ banned_user_ids: globalThis.Array.isArray(object?.banned_user_ids)
2201
+ ? object.banned_user_ids.map((e) => globalThis.String(e))
2202
+ : [],
2203
+ };
2204
+ },
2205
+ toJSON(message) {
2206
+ const obj = {};
2207
+ if (message.banned_user_ids?.length) {
2208
+ obj.banned_user_ids = message.banned_user_ids;
2209
+ }
2210
+ return obj;
2211
+ },
2212
+ create(base) {
2213
+ return ListChannelUsersBannedEvent.fromPartial(base ?? {});
2214
+ },
2215
+ fromPartial(object) {
2216
+ const message = createBaseListChannelUsersBannedEvent();
2217
+ message.banned_user_ids = object.banned_user_ids?.map((e) => e) || [];
2218
+ return message;
2219
+ },
2220
+ };
2123
2221
  function createBaseChannelCanvas() {
2124
2222
  return {
2125
2223
  id: "0",
@@ -8846,15 +8944,15 @@ export const StreamPresenceEvent = {
8846
8944
  },
8847
8945
  };
8848
8946
  function createBaseUserPresence() {
8849
- return { user_id: "0", session_id: "", username: "", status: undefined, is_mobile: false, user_status: "" };
8947
+ return { user_id: "0", session_id: 0, username: "", status: undefined, is_mobile: false, user_status: "" };
8850
8948
  }
8851
8949
  export const UserPresence = {
8852
8950
  encode(message, writer = _m0.Writer.create()) {
8853
8951
  if (message.user_id !== "0") {
8854
8952
  writer.uint32(8).int64(message.user_id);
8855
8953
  }
8856
- if (message.session_id !== "") {
8857
- writer.uint32(18).string(message.session_id);
8954
+ if (message.session_id !== 0) {
8955
+ writer.uint32(16).int32(message.session_id);
8858
8956
  }
8859
8957
  if (message.username !== "") {
8860
8958
  writer.uint32(26).string(message.username);
@@ -8884,10 +8982,10 @@ export const UserPresence = {
8884
8982
  message.user_id = longToString(reader.int64());
8885
8983
  continue;
8886
8984
  case 2:
8887
- if (tag !== 18) {
8985
+ if (tag !== 16) {
8888
8986
  break;
8889
8987
  }
8890
- message.session_id = reader.string();
8988
+ message.session_id = reader.int32();
8891
8989
  continue;
8892
8990
  case 3:
8893
8991
  if (tag !== 26) {
@@ -8924,7 +9022,7 @@ export const UserPresence = {
8924
9022
  fromJSON(object) {
8925
9023
  return {
8926
9024
  user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "0",
8927
- session_id: isSet(object.session_id) ? globalThis.String(object.session_id) : "",
9025
+ session_id: isSet(object.session_id) ? globalThis.Number(object.session_id) : 0,
8928
9026
  username: isSet(object.username) ? globalThis.String(object.username) : "",
8929
9027
  status: isSet(object.status) ? String(object.status) : undefined,
8930
9028
  is_mobile: isSet(object.is_mobile) ? globalThis.Boolean(object.is_mobile) : false,
@@ -8936,8 +9034,8 @@ export const UserPresence = {
8936
9034
  if (message.user_id !== "0") {
8937
9035
  obj.user_id = message.user_id;
8938
9036
  }
8939
- if (message.session_id !== "") {
8940
- obj.session_id = message.session_id;
9037
+ if (message.session_id !== 0) {
9038
+ obj.session_id = Math.round(message.session_id);
8941
9039
  }
8942
9040
  if (message.username !== "") {
8943
9041
  obj.username = message.username;
@@ -8959,7 +9057,7 @@ export const UserPresence = {
8959
9057
  fromPartial(object) {
8960
9058
  const message = createBaseUserPresence();
8961
9059
  message.user_id = object.user_id ?? "0";
8962
- message.session_id = object.session_id ?? "";
9060
+ message.session_id = object.session_id ?? 0;
8963
9061
  message.username = object.username ?? "";
8964
9062
  message.status = object.status ?? undefined;
8965
9063
  message.is_mobile = object.is_mobile ?? false;
@@ -12098,11 +12196,12 @@ export const DeleteAccountEvent = {
12098
12196
  function createBaseListDataSocket() {
12099
12197
  return {
12100
12198
  api_name: "",
12101
- list_unread_msg_indicator_req: undefined,
12102
- unread_msg_indicator: undefined,
12103
- list_clan_badge_count_req: undefined,
12199
+ list_channel_badge_count_req: undefined,
12200
+ channel_badge_count: undefined,
12104
12201
  clan_badge_count: undefined,
12105
12202
  list_loged_device: undefined,
12203
+ list_user_online_req: undefined,
12204
+ user_online_list: undefined,
12106
12205
  };
12107
12206
  }
12108
12207
  export const ListDataSocket = {
@@ -12110,21 +12209,23 @@ export const ListDataSocket = {
12110
12209
  if (message.api_name !== "") {
12111
12210
  writer.uint32(10).string(message.api_name);
12112
12211
  }
12113
- if (message.list_unread_msg_indicator_req !== undefined) {
12114
- ListClanUnreadMsgIndicatorRequest.encode(message.list_unread_msg_indicator_req, writer.uint32(18).fork())
12115
- .ldelim();
12116
- }
12117
- if (message.unread_msg_indicator !== undefined) {
12118
- ListClanUnreadMsgIndicatorResponse.encode(message.unread_msg_indicator, writer.uint32(26).fork()).ldelim();
12212
+ if (message.list_channel_badge_count_req !== undefined) {
12213
+ ListChannelBadgeCountRequest.encode(message.list_channel_badge_count_req, writer.uint32(18).fork()).ldelim();
12119
12214
  }
12120
- if (message.list_clan_badge_count_req !== undefined) {
12121
- ListClanBadgeCountRequest.encode(message.list_clan_badge_count_req, writer.uint32(34).fork()).ldelim();
12215
+ if (message.channel_badge_count !== undefined) {
12216
+ ListChannelBadgeCountResponse.encode(message.channel_badge_count, writer.uint32(26).fork()).ldelim();
12122
12217
  }
12123
12218
  if (message.clan_badge_count !== undefined) {
12124
- ListClanBadgeCountResponse.encode(message.clan_badge_count, writer.uint32(42).fork()).ldelim();
12219
+ ListClanBadgeCountResponse.encode(message.clan_badge_count, writer.uint32(34).fork()).ldelim();
12125
12220
  }
12126
12221
  if (message.list_loged_device !== undefined) {
12127
- LogedDeviceList.encode(message.list_loged_device, writer.uint32(50).fork()).ldelim();
12222
+ LogedDeviceList.encode(message.list_loged_device, writer.uint32(42).fork()).ldelim();
12223
+ }
12224
+ if (message.list_user_online_req !== undefined) {
12225
+ ListUserOnlineRequest.encode(message.list_user_online_req, writer.uint32(50).fork()).ldelim();
12226
+ }
12227
+ if (message.user_online_list !== undefined) {
12228
+ ListUserOnlineResponse.encode(message.user_online_list, writer.uint32(58).fork()).ldelim();
12128
12229
  }
12129
12230
  return writer;
12130
12231
  },
@@ -12145,31 +12246,37 @@ export const ListDataSocket = {
12145
12246
  if (tag !== 18) {
12146
12247
  break;
12147
12248
  }
12148
- message.list_unread_msg_indicator_req = ListClanUnreadMsgIndicatorRequest.decode(reader, reader.uint32());
12249
+ message.list_channel_badge_count_req = ListChannelBadgeCountRequest.decode(reader, reader.uint32());
12149
12250
  continue;
12150
12251
  case 3:
12151
12252
  if (tag !== 26) {
12152
12253
  break;
12153
12254
  }
12154
- message.unread_msg_indicator = ListClanUnreadMsgIndicatorResponse.decode(reader, reader.uint32());
12255
+ message.channel_badge_count = ListChannelBadgeCountResponse.decode(reader, reader.uint32());
12155
12256
  continue;
12156
12257
  case 4:
12157
12258
  if (tag !== 34) {
12158
12259
  break;
12159
12260
  }
12160
- message.list_clan_badge_count_req = ListClanBadgeCountRequest.decode(reader, reader.uint32());
12261
+ message.clan_badge_count = ListClanBadgeCountResponse.decode(reader, reader.uint32());
12161
12262
  continue;
12162
12263
  case 5:
12163
12264
  if (tag !== 42) {
12164
12265
  break;
12165
12266
  }
12166
- message.clan_badge_count = ListClanBadgeCountResponse.decode(reader, reader.uint32());
12267
+ message.list_loged_device = LogedDeviceList.decode(reader, reader.uint32());
12167
12268
  continue;
12168
12269
  case 6:
12169
12270
  if (tag !== 50) {
12170
12271
  break;
12171
12272
  }
12172
- message.list_loged_device = LogedDeviceList.decode(reader, reader.uint32());
12273
+ message.list_user_online_req = ListUserOnlineRequest.decode(reader, reader.uint32());
12274
+ continue;
12275
+ case 7:
12276
+ if (tag !== 58) {
12277
+ break;
12278
+ }
12279
+ message.user_online_list = ListUserOnlineResponse.decode(reader, reader.uint32());
12173
12280
  continue;
12174
12281
  }
12175
12282
  if ((tag & 7) === 4 || tag === 0) {
@@ -12182,14 +12289,11 @@ export const ListDataSocket = {
12182
12289
  fromJSON(object) {
12183
12290
  return {
12184
12291
  api_name: isSet(object.api_name) ? globalThis.String(object.api_name) : "",
12185
- list_unread_msg_indicator_req: isSet(object.list_unread_msg_indicator_req)
12186
- ? ListClanUnreadMsgIndicatorRequest.fromJSON(object.list_unread_msg_indicator_req)
12292
+ list_channel_badge_count_req: isSet(object.list_channel_badge_count_req)
12293
+ ? ListChannelBadgeCountRequest.fromJSON(object.list_channel_badge_count_req)
12187
12294
  : undefined,
12188
- unread_msg_indicator: isSet(object.unread_msg_indicator)
12189
- ? ListClanUnreadMsgIndicatorResponse.fromJSON(object.unread_msg_indicator)
12190
- : undefined,
12191
- list_clan_badge_count_req: isSet(object.list_clan_badge_count_req)
12192
- ? ListClanBadgeCountRequest.fromJSON(object.list_clan_badge_count_req)
12295
+ channel_badge_count: isSet(object.channel_badge_count)
12296
+ ? ListChannelBadgeCountResponse.fromJSON(object.channel_badge_count)
12193
12297
  : undefined,
12194
12298
  clan_badge_count: isSet(object.clan_badge_count)
12195
12299
  ? ListClanBadgeCountResponse.fromJSON(object.clan_badge_count)
@@ -12197,6 +12301,12 @@ export const ListDataSocket = {
12197
12301
  list_loged_device: isSet(object.list_loged_device)
12198
12302
  ? LogedDeviceList.fromJSON(object.list_loged_device)
12199
12303
  : undefined,
12304
+ list_user_online_req: isSet(object.list_user_online_req)
12305
+ ? ListUserOnlineRequest.fromJSON(object.list_user_online_req)
12306
+ : undefined,
12307
+ user_online_list: isSet(object.user_online_list)
12308
+ ? ListUserOnlineResponse.fromJSON(object.user_online_list)
12309
+ : undefined,
12200
12310
  };
12201
12311
  },
12202
12312
  toJSON(message) {
@@ -12204,14 +12314,11 @@ export const ListDataSocket = {
12204
12314
  if (message.api_name !== "") {
12205
12315
  obj.api_name = message.api_name;
12206
12316
  }
12207
- if (message.list_unread_msg_indicator_req !== undefined) {
12208
- obj.list_unread_msg_indicator_req = ListClanUnreadMsgIndicatorRequest.toJSON(message.list_unread_msg_indicator_req);
12317
+ if (message.list_channel_badge_count_req !== undefined) {
12318
+ obj.list_channel_badge_count_req = ListChannelBadgeCountRequest.toJSON(message.list_channel_badge_count_req);
12209
12319
  }
12210
- if (message.unread_msg_indicator !== undefined) {
12211
- obj.unread_msg_indicator = ListClanUnreadMsgIndicatorResponse.toJSON(message.unread_msg_indicator);
12212
- }
12213
- if (message.list_clan_badge_count_req !== undefined) {
12214
- obj.list_clan_badge_count_req = ListClanBadgeCountRequest.toJSON(message.list_clan_badge_count_req);
12320
+ if (message.channel_badge_count !== undefined) {
12321
+ obj.channel_badge_count = ListChannelBadgeCountResponse.toJSON(message.channel_badge_count);
12215
12322
  }
12216
12323
  if (message.clan_badge_count !== undefined) {
12217
12324
  obj.clan_badge_count = ListClanBadgeCountResponse.toJSON(message.clan_badge_count);
@@ -12219,6 +12326,12 @@ export const ListDataSocket = {
12219
12326
  if (message.list_loged_device !== undefined) {
12220
12327
  obj.list_loged_device = LogedDeviceList.toJSON(message.list_loged_device);
12221
12328
  }
12329
+ if (message.list_user_online_req !== undefined) {
12330
+ obj.list_user_online_req = ListUserOnlineRequest.toJSON(message.list_user_online_req);
12331
+ }
12332
+ if (message.user_online_list !== undefined) {
12333
+ obj.user_online_list = ListUserOnlineResponse.toJSON(message.user_online_list);
12334
+ }
12222
12335
  return obj;
12223
12336
  },
12224
12337
  create(base) {
@@ -12227,23 +12340,25 @@ export const ListDataSocket = {
12227
12340
  fromPartial(object) {
12228
12341
  const message = createBaseListDataSocket();
12229
12342
  message.api_name = object.api_name ?? "";
12230
- message.list_unread_msg_indicator_req =
12231
- (object.list_unread_msg_indicator_req !== undefined && object.list_unread_msg_indicator_req !== null)
12232
- ? ListClanUnreadMsgIndicatorRequest.fromPartial(object.list_unread_msg_indicator_req)
12343
+ message.list_channel_badge_count_req =
12344
+ (object.list_channel_badge_count_req !== undefined && object.list_channel_badge_count_req !== null)
12345
+ ? ListChannelBadgeCountRequest.fromPartial(object.list_channel_badge_count_req)
12233
12346
  : undefined;
12234
- message.unread_msg_indicator = (object.unread_msg_indicator !== undefined && object.unread_msg_indicator !== null)
12235
- ? ListClanUnreadMsgIndicatorResponse.fromPartial(object.unread_msg_indicator)
12347
+ message.channel_badge_count = (object.channel_badge_count !== undefined && object.channel_badge_count !== null)
12348
+ ? ListChannelBadgeCountResponse.fromPartial(object.channel_badge_count)
12236
12349
  : undefined;
12237
- message.list_clan_badge_count_req =
12238
- (object.list_clan_badge_count_req !== undefined && object.list_clan_badge_count_req !== null)
12239
- ? ListClanBadgeCountRequest.fromPartial(object.list_clan_badge_count_req)
12240
- : undefined;
12241
12350
  message.clan_badge_count = (object.clan_badge_count !== undefined && object.clan_badge_count !== null)
12242
12351
  ? ListClanBadgeCountResponse.fromPartial(object.clan_badge_count)
12243
12352
  : undefined;
12244
12353
  message.list_loged_device = (object.list_loged_device !== undefined && object.list_loged_device !== null)
12245
12354
  ? LogedDeviceList.fromPartial(object.list_loged_device)
12246
12355
  : undefined;
12356
+ message.list_user_online_req = (object.list_user_online_req !== undefined && object.list_user_online_req !== null)
12357
+ ? ListUserOnlineRequest.fromPartial(object.list_user_online_req)
12358
+ : undefined;
12359
+ message.user_online_list = (object.user_online_list !== undefined && object.user_online_list !== null)
12360
+ ? ListUserOnlineResponse.fromPartial(object.user_online_list)
12361
+ : undefined;
12247
12362
  return message;
12248
12363
  },
12249
12364
  };
@@ -12940,6 +13055,280 @@ export const AIAgentEnabledEvent = {
12940
13055
  return message;
12941
13056
  },
12942
13057
  };
13058
+ function createBaseGotifyMessage() {
13059
+ return {
13060
+ id: 0,
13061
+ channel_id: "0",
13062
+ message: "",
13063
+ title: "",
13064
+ image: "",
13065
+ priority: 0,
13066
+ users: [],
13067
+ extras: {},
13068
+ app_id: 0,
13069
+ sender_id: "0",
13070
+ };
13071
+ }
13072
+ export const GotifyMessage = {
13073
+ encode(message, writer = _m0.Writer.create()) {
13074
+ if (message.id !== 0) {
13075
+ writer.uint32(8).uint32(message.id);
13076
+ }
13077
+ if (message.channel_id !== "0") {
13078
+ writer.uint32(16).int64(message.channel_id);
13079
+ }
13080
+ if (message.message !== "") {
13081
+ writer.uint32(26).string(message.message);
13082
+ }
13083
+ if (message.title !== "") {
13084
+ writer.uint32(34).string(message.title);
13085
+ }
13086
+ if (message.image !== "") {
13087
+ writer.uint32(42).string(message.image);
13088
+ }
13089
+ if (message.priority !== 0) {
13090
+ writer.uint32(48).int32(message.priority);
13091
+ }
13092
+ for (const v of message.users) {
13093
+ writer.uint32(58).string(v);
13094
+ }
13095
+ Object.entries(message.extras).forEach(([key, value]) => {
13096
+ GotifyMessage_ExtrasEntry.encode({ key: key, value }, writer.uint32(66).fork()).ldelim();
13097
+ });
13098
+ if (message.app_id !== 0) {
13099
+ writer.uint32(72).uint32(message.app_id);
13100
+ }
13101
+ if (message.sender_id !== "0") {
13102
+ writer.uint32(80).int64(message.sender_id);
13103
+ }
13104
+ return writer;
13105
+ },
13106
+ decode(input, length) {
13107
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
13108
+ let end = length === undefined ? reader.len : reader.pos + length;
13109
+ const message = createBaseGotifyMessage();
13110
+ while (reader.pos < end) {
13111
+ const tag = reader.uint32();
13112
+ switch (tag >>> 3) {
13113
+ case 1:
13114
+ if (tag !== 8) {
13115
+ break;
13116
+ }
13117
+ message.id = reader.uint32();
13118
+ continue;
13119
+ case 2:
13120
+ if (tag !== 16) {
13121
+ break;
13122
+ }
13123
+ message.channel_id = longToString(reader.int64());
13124
+ continue;
13125
+ case 3:
13126
+ if (tag !== 26) {
13127
+ break;
13128
+ }
13129
+ message.message = reader.string();
13130
+ continue;
13131
+ case 4:
13132
+ if (tag !== 34) {
13133
+ break;
13134
+ }
13135
+ message.title = reader.string();
13136
+ continue;
13137
+ case 5:
13138
+ if (tag !== 42) {
13139
+ break;
13140
+ }
13141
+ message.image = reader.string();
13142
+ continue;
13143
+ case 6:
13144
+ if (tag !== 48) {
13145
+ break;
13146
+ }
13147
+ message.priority = reader.int32();
13148
+ continue;
13149
+ case 7:
13150
+ if (tag !== 58) {
13151
+ break;
13152
+ }
13153
+ message.users.push(reader.string());
13154
+ continue;
13155
+ case 8:
13156
+ if (tag !== 66) {
13157
+ break;
13158
+ }
13159
+ const entry8 = GotifyMessage_ExtrasEntry.decode(reader, reader.uint32());
13160
+ if (entry8.value !== undefined) {
13161
+ message.extras[entry8.key] = entry8.value;
13162
+ }
13163
+ continue;
13164
+ case 9:
13165
+ if (tag !== 72) {
13166
+ break;
13167
+ }
13168
+ message.app_id = reader.uint32();
13169
+ continue;
13170
+ case 10:
13171
+ if (tag !== 80) {
13172
+ break;
13173
+ }
13174
+ message.sender_id = longToString(reader.int64());
13175
+ continue;
13176
+ }
13177
+ if ((tag & 7) === 4 || tag === 0) {
13178
+ break;
13179
+ }
13180
+ reader.skipType(tag & 7);
13181
+ }
13182
+ return message;
13183
+ },
13184
+ fromJSON(object) {
13185
+ return {
13186
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
13187
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "0",
13188
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
13189
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
13190
+ image: isSet(object.image) ? globalThis.String(object.image) : "",
13191
+ priority: isSet(object.priority) ? globalThis.Number(object.priority) : 0,
13192
+ users: globalThis.Array.isArray(object?.users) ? object.users.map((e) => globalThis.String(e)) : [],
13193
+ extras: isObject(object.extras)
13194
+ ? Object.entries(object.extras).reduce((acc, [key, value]) => {
13195
+ acc[key] = String(value);
13196
+ return acc;
13197
+ }, {})
13198
+ : {},
13199
+ app_id: isSet(object.app_id) ? globalThis.Number(object.app_id) : 0,
13200
+ sender_id: isSet(object.sender_id) ? globalThis.String(object.sender_id) : "0",
13201
+ };
13202
+ },
13203
+ toJSON(message) {
13204
+ const obj = {};
13205
+ if (message.id !== 0) {
13206
+ obj.id = Math.round(message.id);
13207
+ }
13208
+ if (message.channel_id !== "0") {
13209
+ obj.channel_id = message.channel_id;
13210
+ }
13211
+ if (message.message !== "") {
13212
+ obj.message = message.message;
13213
+ }
13214
+ if (message.title !== "") {
13215
+ obj.title = message.title;
13216
+ }
13217
+ if (message.image !== "") {
13218
+ obj.image = message.image;
13219
+ }
13220
+ if (message.priority !== 0) {
13221
+ obj.priority = Math.round(message.priority);
13222
+ }
13223
+ if (message.users?.length) {
13224
+ obj.users = message.users;
13225
+ }
13226
+ if (message.extras) {
13227
+ const entries = Object.entries(message.extras);
13228
+ if (entries.length > 0) {
13229
+ obj.extras = {};
13230
+ entries.forEach(([k, v]) => {
13231
+ obj.extras[k] = v;
13232
+ });
13233
+ }
13234
+ }
13235
+ if (message.app_id !== 0) {
13236
+ obj.app_id = Math.round(message.app_id);
13237
+ }
13238
+ if (message.sender_id !== "0") {
13239
+ obj.sender_id = message.sender_id;
13240
+ }
13241
+ return obj;
13242
+ },
13243
+ create(base) {
13244
+ return GotifyMessage.fromPartial(base ?? {});
13245
+ },
13246
+ fromPartial(object) {
13247
+ const message = createBaseGotifyMessage();
13248
+ message.id = object.id ?? 0;
13249
+ message.channel_id = object.channel_id ?? "0";
13250
+ message.message = object.message ?? "";
13251
+ message.title = object.title ?? "";
13252
+ message.image = object.image ?? "";
13253
+ message.priority = object.priority ?? 0;
13254
+ message.users = object.users?.map((e) => e) || [];
13255
+ message.extras = Object.entries(object.extras ?? {}).reduce((acc, [key, value]) => {
13256
+ if (value !== undefined) {
13257
+ acc[key] = globalThis.String(value);
13258
+ }
13259
+ return acc;
13260
+ }, {});
13261
+ message.app_id = object.app_id ?? 0;
13262
+ message.sender_id = object.sender_id ?? "0";
13263
+ return message;
13264
+ },
13265
+ };
13266
+ function createBaseGotifyMessage_ExtrasEntry() {
13267
+ return { key: "", value: "" };
13268
+ }
13269
+ export const GotifyMessage_ExtrasEntry = {
13270
+ encode(message, writer = _m0.Writer.create()) {
13271
+ if (message.key !== "") {
13272
+ writer.uint32(10).string(message.key);
13273
+ }
13274
+ if (message.value !== "") {
13275
+ writer.uint32(18).string(message.value);
13276
+ }
13277
+ return writer;
13278
+ },
13279
+ decode(input, length) {
13280
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
13281
+ let end = length === undefined ? reader.len : reader.pos + length;
13282
+ const message = createBaseGotifyMessage_ExtrasEntry();
13283
+ while (reader.pos < end) {
13284
+ const tag = reader.uint32();
13285
+ switch (tag >>> 3) {
13286
+ case 1:
13287
+ if (tag !== 10) {
13288
+ break;
13289
+ }
13290
+ message.key = reader.string();
13291
+ continue;
13292
+ case 2:
13293
+ if (tag !== 18) {
13294
+ break;
13295
+ }
13296
+ message.value = reader.string();
13297
+ continue;
13298
+ }
13299
+ if ((tag & 7) === 4 || tag === 0) {
13300
+ break;
13301
+ }
13302
+ reader.skipType(tag & 7);
13303
+ }
13304
+ return message;
13305
+ },
13306
+ fromJSON(object) {
13307
+ return {
13308
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
13309
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
13310
+ };
13311
+ },
13312
+ toJSON(message) {
13313
+ const obj = {};
13314
+ if (message.key !== "") {
13315
+ obj.key = message.key;
13316
+ }
13317
+ if (message.value !== "") {
13318
+ obj.value = message.value;
13319
+ }
13320
+ return obj;
13321
+ },
13322
+ create(base) {
13323
+ return GotifyMessage_ExtrasEntry.fromPartial(base ?? {});
13324
+ },
13325
+ fromPartial(object) {
13326
+ const message = createBaseGotifyMessage_ExtrasEntry();
13327
+ message.key = object.key ?? "";
13328
+ message.value = object.value ?? "";
13329
+ return message;
13330
+ },
13331
+ };
12943
13332
  function bytesFromBase64(b64) {
12944
13333
  if (globalThis.Buffer) {
12945
13334
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));