mezon-js-protobuf 1.8.85 → 1.8.87
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 +53 -45
- package/dist/mezon-js/api/api.d.ts +24358 -0
- package/dist/mezon-js/google/protobuf/struct.d.ts +201 -0
- package/dist/mezon-js/google/protobuf/wrappers.d.ts +238 -0
- package/dist/mezon-js/utils.d.ts +6 -2
- package/dist/mezon-js-protobuf/api/api.d.ts +487 -27
- package/dist/mezon-js-protobuf/index.d.ts +0 -1
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +14 -14
- package/dist/mezon-js-protobuf.cjs.js +9 -613
- package/dist/mezon-js-protobuf.esm.mjs +9 -613
- package/index.ts +0 -1
- package/package.json +1 -1
- package/web_socket_adapter_pb.ts +123 -123
- package/utils.ts +0 -40
|
@@ -12707,7 +12707,7 @@ function createBaseChannelSettingListRequest() {
|
|
|
12707
12707
|
clan_id: "",
|
|
12708
12708
|
parent_id: "",
|
|
12709
12709
|
category_id: "",
|
|
12710
|
-
|
|
12710
|
+
private_channel: void 0,
|
|
12711
12711
|
active: void 0,
|
|
12712
12712
|
status: void 0,
|
|
12713
12713
|
type: void 0,
|
|
@@ -12727,8 +12727,8 @@ var ChannelSettingListRequest = {
|
|
|
12727
12727
|
if (message.category_id !== "") {
|
|
12728
12728
|
writer.uint32(26).string(message.category_id);
|
|
12729
12729
|
}
|
|
12730
|
-
if (message.
|
|
12731
|
-
Int32Value.encode({ value: message.
|
|
12730
|
+
if (message.private_channel !== void 0) {
|
|
12731
|
+
Int32Value.encode({ value: message.private_channel }, writer.uint32(34).fork()).ldelim();
|
|
12732
12732
|
}
|
|
12733
12733
|
if (message.active !== void 0) {
|
|
12734
12734
|
Int32Value.encode({ value: message.active }, writer.uint32(42).fork()).ldelim();
|
|
@@ -12779,7 +12779,7 @@ var ChannelSettingListRequest = {
|
|
|
12779
12779
|
if (tag !== 34) {
|
|
12780
12780
|
break;
|
|
12781
12781
|
}
|
|
12782
|
-
message.
|
|
12782
|
+
message.private_channel = Int32Value.decode(reader, reader.uint32()).value;
|
|
12783
12783
|
continue;
|
|
12784
12784
|
case 5:
|
|
12785
12785
|
if (tag !== 42) {
|
|
@@ -12830,7 +12830,7 @@ var ChannelSettingListRequest = {
|
|
|
12830
12830
|
clan_id: isSet2(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
12831
12831
|
parent_id: isSet2(object.parent_id) ? globalThis.String(object.parent_id) : "",
|
|
12832
12832
|
category_id: isSet2(object.category_id) ? globalThis.String(object.category_id) : "",
|
|
12833
|
-
|
|
12833
|
+
private_channel: isSet2(object.private_channel) ? Number(object.private_channel) : void 0,
|
|
12834
12834
|
active: isSet2(object.active) ? Number(object.active) : void 0,
|
|
12835
12835
|
status: isSet2(object.status) ? Number(object.status) : void 0,
|
|
12836
12836
|
type: isSet2(object.type) ? Number(object.type) : void 0,
|
|
@@ -12850,8 +12850,8 @@ var ChannelSettingListRequest = {
|
|
|
12850
12850
|
if (message.category_id !== "") {
|
|
12851
12851
|
obj.category_id = message.category_id;
|
|
12852
12852
|
}
|
|
12853
|
-
if (message.
|
|
12854
|
-
obj.
|
|
12853
|
+
if (message.private_channel !== void 0) {
|
|
12854
|
+
obj.private_channel = message.private_channel;
|
|
12855
12855
|
}
|
|
12856
12856
|
if (message.active !== void 0) {
|
|
12857
12857
|
obj.active = message.active;
|
|
@@ -12882,7 +12882,7 @@ var ChannelSettingListRequest = {
|
|
|
12882
12882
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
12883
12883
|
message.parent_id = (_b = object.parent_id) != null ? _b : "";
|
|
12884
12884
|
message.category_id = (_c = object.category_id) != null ? _c : "";
|
|
12885
|
-
message.
|
|
12885
|
+
message.private_channel = (_d = object.private_channel) != null ? _d : void 0;
|
|
12886
12886
|
message.active = (_e = object.active) != null ? _e : void 0;
|
|
12887
12887
|
message.status = (_f = object.status) != null ? _f : void 0;
|
|
12888
12888
|
message.type = (_g = object.type) != null ? _g : void 0;
|
|
@@ -14143,573 +14143,6 @@ var SearchThreadRequest = {
|
|
|
14143
14143
|
return message;
|
|
14144
14144
|
}
|
|
14145
14145
|
};
|
|
14146
|
-
function createBaseDirectFcmProto() {
|
|
14147
|
-
return {
|
|
14148
|
-
title: "",
|
|
14149
|
-
link: "",
|
|
14150
|
-
content: "",
|
|
14151
|
-
channel_id: "",
|
|
14152
|
-
sender_id: "",
|
|
14153
|
-
avatar: "",
|
|
14154
|
-
clan_id: "",
|
|
14155
|
-
attachment_link: "",
|
|
14156
|
-
display_name: "",
|
|
14157
|
-
create_time_seconds: 0,
|
|
14158
|
-
update_time_seconds: 0,
|
|
14159
|
-
username: "",
|
|
14160
|
-
mention_ids: [],
|
|
14161
|
-
position_s: [],
|
|
14162
|
-
position_e: [],
|
|
14163
|
-
attachment_type: "",
|
|
14164
|
-
has_more_attachment: false,
|
|
14165
|
-
is_mention_role: [],
|
|
14166
|
-
message_id: ""
|
|
14167
|
-
};
|
|
14168
|
-
}
|
|
14169
|
-
var DirectFcmProto = {
|
|
14170
|
-
encode(message, writer = import_minimal3.default.Writer.create()) {
|
|
14171
|
-
if (message.title !== "") {
|
|
14172
|
-
writer.uint32(10).string(message.title);
|
|
14173
|
-
}
|
|
14174
|
-
if (message.link !== "") {
|
|
14175
|
-
writer.uint32(18).string(message.link);
|
|
14176
|
-
}
|
|
14177
|
-
if (message.content !== "") {
|
|
14178
|
-
writer.uint32(26).string(message.content);
|
|
14179
|
-
}
|
|
14180
|
-
if (message.channel_id !== "") {
|
|
14181
|
-
writer.uint32(34).string(message.channel_id);
|
|
14182
|
-
}
|
|
14183
|
-
if (message.sender_id !== "") {
|
|
14184
|
-
writer.uint32(42).string(message.sender_id);
|
|
14185
|
-
}
|
|
14186
|
-
if (message.avatar !== "") {
|
|
14187
|
-
writer.uint32(50).string(message.avatar);
|
|
14188
|
-
}
|
|
14189
|
-
if (message.clan_id !== "") {
|
|
14190
|
-
writer.uint32(58).string(message.clan_id);
|
|
14191
|
-
}
|
|
14192
|
-
if (message.attachment_link !== "") {
|
|
14193
|
-
writer.uint32(66).string(message.attachment_link);
|
|
14194
|
-
}
|
|
14195
|
-
if (message.display_name !== "") {
|
|
14196
|
-
writer.uint32(74).string(message.display_name);
|
|
14197
|
-
}
|
|
14198
|
-
if (message.create_time_seconds !== 0) {
|
|
14199
|
-
writer.uint32(80).int32(message.create_time_seconds);
|
|
14200
|
-
}
|
|
14201
|
-
if (message.update_time_seconds !== 0) {
|
|
14202
|
-
writer.uint32(88).int32(message.update_time_seconds);
|
|
14203
|
-
}
|
|
14204
|
-
if (message.username !== "") {
|
|
14205
|
-
writer.uint32(98).string(message.username);
|
|
14206
|
-
}
|
|
14207
|
-
for (const v of message.mention_ids) {
|
|
14208
|
-
writer.uint32(106).string(v);
|
|
14209
|
-
}
|
|
14210
|
-
writer.uint32(114).fork();
|
|
14211
|
-
for (const v of message.position_s) {
|
|
14212
|
-
writer.int32(v);
|
|
14213
|
-
}
|
|
14214
|
-
writer.ldelim();
|
|
14215
|
-
writer.uint32(122).fork();
|
|
14216
|
-
for (const v of message.position_e) {
|
|
14217
|
-
writer.int32(v);
|
|
14218
|
-
}
|
|
14219
|
-
writer.ldelim();
|
|
14220
|
-
if (message.attachment_type !== "") {
|
|
14221
|
-
writer.uint32(130).string(message.attachment_type);
|
|
14222
|
-
}
|
|
14223
|
-
if (message.has_more_attachment !== false) {
|
|
14224
|
-
writer.uint32(136).bool(message.has_more_attachment);
|
|
14225
|
-
}
|
|
14226
|
-
writer.uint32(146).fork();
|
|
14227
|
-
for (const v of message.is_mention_role) {
|
|
14228
|
-
writer.bool(v);
|
|
14229
|
-
}
|
|
14230
|
-
writer.ldelim();
|
|
14231
|
-
if (message.message_id !== "") {
|
|
14232
|
-
writer.uint32(154).string(message.message_id);
|
|
14233
|
-
}
|
|
14234
|
-
return writer;
|
|
14235
|
-
},
|
|
14236
|
-
decode(input, length) {
|
|
14237
|
-
const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
|
|
14238
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14239
|
-
const message = createBaseDirectFcmProto();
|
|
14240
|
-
while (reader.pos < end) {
|
|
14241
|
-
const tag = reader.uint32();
|
|
14242
|
-
switch (tag >>> 3) {
|
|
14243
|
-
case 1:
|
|
14244
|
-
if (tag !== 10) {
|
|
14245
|
-
break;
|
|
14246
|
-
}
|
|
14247
|
-
message.title = reader.string();
|
|
14248
|
-
continue;
|
|
14249
|
-
case 2:
|
|
14250
|
-
if (tag !== 18) {
|
|
14251
|
-
break;
|
|
14252
|
-
}
|
|
14253
|
-
message.link = reader.string();
|
|
14254
|
-
continue;
|
|
14255
|
-
case 3:
|
|
14256
|
-
if (tag !== 26) {
|
|
14257
|
-
break;
|
|
14258
|
-
}
|
|
14259
|
-
message.content = reader.string();
|
|
14260
|
-
continue;
|
|
14261
|
-
case 4:
|
|
14262
|
-
if (tag !== 34) {
|
|
14263
|
-
break;
|
|
14264
|
-
}
|
|
14265
|
-
message.channel_id = reader.string();
|
|
14266
|
-
continue;
|
|
14267
|
-
case 5:
|
|
14268
|
-
if (tag !== 42) {
|
|
14269
|
-
break;
|
|
14270
|
-
}
|
|
14271
|
-
message.sender_id = reader.string();
|
|
14272
|
-
continue;
|
|
14273
|
-
case 6:
|
|
14274
|
-
if (tag !== 50) {
|
|
14275
|
-
break;
|
|
14276
|
-
}
|
|
14277
|
-
message.avatar = reader.string();
|
|
14278
|
-
continue;
|
|
14279
|
-
case 7:
|
|
14280
|
-
if (tag !== 58) {
|
|
14281
|
-
break;
|
|
14282
|
-
}
|
|
14283
|
-
message.clan_id = reader.string();
|
|
14284
|
-
continue;
|
|
14285
|
-
case 8:
|
|
14286
|
-
if (tag !== 66) {
|
|
14287
|
-
break;
|
|
14288
|
-
}
|
|
14289
|
-
message.attachment_link = reader.string();
|
|
14290
|
-
continue;
|
|
14291
|
-
case 9:
|
|
14292
|
-
if (tag !== 74) {
|
|
14293
|
-
break;
|
|
14294
|
-
}
|
|
14295
|
-
message.display_name = reader.string();
|
|
14296
|
-
continue;
|
|
14297
|
-
case 10:
|
|
14298
|
-
if (tag !== 80) {
|
|
14299
|
-
break;
|
|
14300
|
-
}
|
|
14301
|
-
message.create_time_seconds = reader.int32();
|
|
14302
|
-
continue;
|
|
14303
|
-
case 11:
|
|
14304
|
-
if (tag !== 88) {
|
|
14305
|
-
break;
|
|
14306
|
-
}
|
|
14307
|
-
message.update_time_seconds = reader.int32();
|
|
14308
|
-
continue;
|
|
14309
|
-
case 12:
|
|
14310
|
-
if (tag !== 98) {
|
|
14311
|
-
break;
|
|
14312
|
-
}
|
|
14313
|
-
message.username = reader.string();
|
|
14314
|
-
continue;
|
|
14315
|
-
case 13:
|
|
14316
|
-
if (tag !== 106) {
|
|
14317
|
-
break;
|
|
14318
|
-
}
|
|
14319
|
-
message.mention_ids.push(reader.string());
|
|
14320
|
-
continue;
|
|
14321
|
-
case 14:
|
|
14322
|
-
if (tag === 112) {
|
|
14323
|
-
message.position_s.push(reader.int32());
|
|
14324
|
-
continue;
|
|
14325
|
-
}
|
|
14326
|
-
if (tag === 114) {
|
|
14327
|
-
const end2 = reader.uint32() + reader.pos;
|
|
14328
|
-
while (reader.pos < end2) {
|
|
14329
|
-
message.position_s.push(reader.int32());
|
|
14330
|
-
}
|
|
14331
|
-
continue;
|
|
14332
|
-
}
|
|
14333
|
-
break;
|
|
14334
|
-
case 15:
|
|
14335
|
-
if (tag === 120) {
|
|
14336
|
-
message.position_e.push(reader.int32());
|
|
14337
|
-
continue;
|
|
14338
|
-
}
|
|
14339
|
-
if (tag === 122) {
|
|
14340
|
-
const end2 = reader.uint32() + reader.pos;
|
|
14341
|
-
while (reader.pos < end2) {
|
|
14342
|
-
message.position_e.push(reader.int32());
|
|
14343
|
-
}
|
|
14344
|
-
continue;
|
|
14345
|
-
}
|
|
14346
|
-
break;
|
|
14347
|
-
case 16:
|
|
14348
|
-
if (tag !== 130) {
|
|
14349
|
-
break;
|
|
14350
|
-
}
|
|
14351
|
-
message.attachment_type = reader.string();
|
|
14352
|
-
continue;
|
|
14353
|
-
case 17:
|
|
14354
|
-
if (tag !== 136) {
|
|
14355
|
-
break;
|
|
14356
|
-
}
|
|
14357
|
-
message.has_more_attachment = reader.bool();
|
|
14358
|
-
continue;
|
|
14359
|
-
case 18:
|
|
14360
|
-
if (tag === 144) {
|
|
14361
|
-
message.is_mention_role.push(reader.bool());
|
|
14362
|
-
continue;
|
|
14363
|
-
}
|
|
14364
|
-
if (tag === 146) {
|
|
14365
|
-
const end2 = reader.uint32() + reader.pos;
|
|
14366
|
-
while (reader.pos < end2) {
|
|
14367
|
-
message.is_mention_role.push(reader.bool());
|
|
14368
|
-
}
|
|
14369
|
-
continue;
|
|
14370
|
-
}
|
|
14371
|
-
break;
|
|
14372
|
-
case 19:
|
|
14373
|
-
if (tag !== 154) {
|
|
14374
|
-
break;
|
|
14375
|
-
}
|
|
14376
|
-
message.message_id = reader.string();
|
|
14377
|
-
continue;
|
|
14378
|
-
}
|
|
14379
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
14380
|
-
break;
|
|
14381
|
-
}
|
|
14382
|
-
reader.skipType(tag & 7);
|
|
14383
|
-
}
|
|
14384
|
-
return message;
|
|
14385
|
-
},
|
|
14386
|
-
fromJSON(object) {
|
|
14387
|
-
return {
|
|
14388
|
-
title: isSet2(object.title) ? globalThis.String(object.title) : "",
|
|
14389
|
-
link: isSet2(object.link) ? globalThis.String(object.link) : "",
|
|
14390
|
-
content: isSet2(object.content) ? globalThis.String(object.content) : "",
|
|
14391
|
-
channel_id: isSet2(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
14392
|
-
sender_id: isSet2(object.sender_id) ? globalThis.String(object.sender_id) : "",
|
|
14393
|
-
avatar: isSet2(object.avatar) ? globalThis.String(object.avatar) : "",
|
|
14394
|
-
clan_id: isSet2(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
14395
|
-
attachment_link: isSet2(object.attachment_link) ? globalThis.String(object.attachment_link) : "",
|
|
14396
|
-
display_name: isSet2(object.display_name) ? globalThis.String(object.display_name) : "",
|
|
14397
|
-
create_time_seconds: isSet2(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
14398
|
-
update_time_seconds: isSet2(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
|
|
14399
|
-
username: isSet2(object.username) ? globalThis.String(object.username) : "",
|
|
14400
|
-
mention_ids: globalThis.Array.isArray(object == null ? void 0 : object.mention_ids) ? object.mention_ids.map((e) => globalThis.String(e)) : [],
|
|
14401
|
-
position_s: globalThis.Array.isArray(object == null ? void 0 : object.position_s) ? object.position_s.map((e) => globalThis.Number(e)) : [],
|
|
14402
|
-
position_e: globalThis.Array.isArray(object == null ? void 0 : object.position_e) ? object.position_e.map((e) => globalThis.Number(e)) : [],
|
|
14403
|
-
attachment_type: isSet2(object.attachment_type) ? globalThis.String(object.attachment_type) : "",
|
|
14404
|
-
has_more_attachment: isSet2(object.has_more_attachment) ? globalThis.Boolean(object.has_more_attachment) : false,
|
|
14405
|
-
is_mention_role: globalThis.Array.isArray(object == null ? void 0 : object.is_mention_role) ? object.is_mention_role.map((e) => globalThis.Boolean(e)) : [],
|
|
14406
|
-
message_id: isSet2(object.message_id) ? globalThis.String(object.message_id) : ""
|
|
14407
|
-
};
|
|
14408
|
-
},
|
|
14409
|
-
toJSON(message) {
|
|
14410
|
-
var _a, _b, _c, _d;
|
|
14411
|
-
const obj = {};
|
|
14412
|
-
if (message.title !== "") {
|
|
14413
|
-
obj.title = message.title;
|
|
14414
|
-
}
|
|
14415
|
-
if (message.link !== "") {
|
|
14416
|
-
obj.link = message.link;
|
|
14417
|
-
}
|
|
14418
|
-
if (message.content !== "") {
|
|
14419
|
-
obj.content = message.content;
|
|
14420
|
-
}
|
|
14421
|
-
if (message.channel_id !== "") {
|
|
14422
|
-
obj.channel_id = message.channel_id;
|
|
14423
|
-
}
|
|
14424
|
-
if (message.sender_id !== "") {
|
|
14425
|
-
obj.sender_id = message.sender_id;
|
|
14426
|
-
}
|
|
14427
|
-
if (message.avatar !== "") {
|
|
14428
|
-
obj.avatar = message.avatar;
|
|
14429
|
-
}
|
|
14430
|
-
if (message.clan_id !== "") {
|
|
14431
|
-
obj.clan_id = message.clan_id;
|
|
14432
|
-
}
|
|
14433
|
-
if (message.attachment_link !== "") {
|
|
14434
|
-
obj.attachment_link = message.attachment_link;
|
|
14435
|
-
}
|
|
14436
|
-
if (message.display_name !== "") {
|
|
14437
|
-
obj.display_name = message.display_name;
|
|
14438
|
-
}
|
|
14439
|
-
if (message.create_time_seconds !== 0) {
|
|
14440
|
-
obj.create_time_seconds = Math.round(message.create_time_seconds);
|
|
14441
|
-
}
|
|
14442
|
-
if (message.update_time_seconds !== 0) {
|
|
14443
|
-
obj.update_time_seconds = Math.round(message.update_time_seconds);
|
|
14444
|
-
}
|
|
14445
|
-
if (message.username !== "") {
|
|
14446
|
-
obj.username = message.username;
|
|
14447
|
-
}
|
|
14448
|
-
if ((_a = message.mention_ids) == null ? void 0 : _a.length) {
|
|
14449
|
-
obj.mention_ids = message.mention_ids;
|
|
14450
|
-
}
|
|
14451
|
-
if ((_b = message.position_s) == null ? void 0 : _b.length) {
|
|
14452
|
-
obj.position_s = message.position_s.map((e) => Math.round(e));
|
|
14453
|
-
}
|
|
14454
|
-
if ((_c = message.position_e) == null ? void 0 : _c.length) {
|
|
14455
|
-
obj.position_e = message.position_e.map((e) => Math.round(e));
|
|
14456
|
-
}
|
|
14457
|
-
if (message.attachment_type !== "") {
|
|
14458
|
-
obj.attachment_type = message.attachment_type;
|
|
14459
|
-
}
|
|
14460
|
-
if (message.has_more_attachment !== false) {
|
|
14461
|
-
obj.has_more_attachment = message.has_more_attachment;
|
|
14462
|
-
}
|
|
14463
|
-
if ((_d = message.is_mention_role) == null ? void 0 : _d.length) {
|
|
14464
|
-
obj.is_mention_role = message.is_mention_role;
|
|
14465
|
-
}
|
|
14466
|
-
if (message.message_id !== "") {
|
|
14467
|
-
obj.message_id = message.message_id;
|
|
14468
|
-
}
|
|
14469
|
-
return obj;
|
|
14470
|
-
},
|
|
14471
|
-
create(base) {
|
|
14472
|
-
return DirectFcmProto.fromPartial(base != null ? base : {});
|
|
14473
|
-
},
|
|
14474
|
-
fromPartial(object) {
|
|
14475
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
14476
|
-
const message = createBaseDirectFcmProto();
|
|
14477
|
-
message.title = (_a = object.title) != null ? _a : "";
|
|
14478
|
-
message.link = (_b = object.link) != null ? _b : "";
|
|
14479
|
-
message.content = (_c = object.content) != null ? _c : "";
|
|
14480
|
-
message.channel_id = (_d = object.channel_id) != null ? _d : "";
|
|
14481
|
-
message.sender_id = (_e = object.sender_id) != null ? _e : "";
|
|
14482
|
-
message.avatar = (_f = object.avatar) != null ? _f : "";
|
|
14483
|
-
message.clan_id = (_g = object.clan_id) != null ? _g : "";
|
|
14484
|
-
message.attachment_link = (_h = object.attachment_link) != null ? _h : "";
|
|
14485
|
-
message.display_name = (_i = object.display_name) != null ? _i : "";
|
|
14486
|
-
message.create_time_seconds = (_j = object.create_time_seconds) != null ? _j : 0;
|
|
14487
|
-
message.update_time_seconds = (_k = object.update_time_seconds) != null ? _k : 0;
|
|
14488
|
-
message.username = (_l = object.username) != null ? _l : "";
|
|
14489
|
-
message.mention_ids = ((_m = object.mention_ids) == null ? void 0 : _m.map((e) => e)) || [];
|
|
14490
|
-
message.position_s = ((_n = object.position_s) == null ? void 0 : _n.map((e) => e)) || [];
|
|
14491
|
-
message.position_e = ((_o = object.position_e) == null ? void 0 : _o.map((e) => e)) || [];
|
|
14492
|
-
message.attachment_type = (_p = object.attachment_type) != null ? _p : "";
|
|
14493
|
-
message.has_more_attachment = (_q = object.has_more_attachment) != null ? _q : false;
|
|
14494
|
-
message.is_mention_role = ((_r = object.is_mention_role) == null ? void 0 : _r.map((e) => e)) || [];
|
|
14495
|
-
message.message_id = (_s = object.message_id) != null ? _s : "";
|
|
14496
|
-
return message;
|
|
14497
|
-
}
|
|
14498
|
-
};
|
|
14499
|
-
function createBaseMessageMentionList() {
|
|
14500
|
-
return { mentions: [] };
|
|
14501
|
-
}
|
|
14502
|
-
var MessageMentionList = {
|
|
14503
|
-
encode(message, writer = import_minimal3.default.Writer.create()) {
|
|
14504
|
-
for (const v of message.mentions) {
|
|
14505
|
-
MessageMention.encode(v, writer.uint32(10).fork()).ldelim();
|
|
14506
|
-
}
|
|
14507
|
-
return writer;
|
|
14508
|
-
},
|
|
14509
|
-
decode(input, length) {
|
|
14510
|
-
const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
|
|
14511
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14512
|
-
const message = createBaseMessageMentionList();
|
|
14513
|
-
while (reader.pos < end) {
|
|
14514
|
-
const tag = reader.uint32();
|
|
14515
|
-
switch (tag >>> 3) {
|
|
14516
|
-
case 1:
|
|
14517
|
-
if (tag !== 10) {
|
|
14518
|
-
break;
|
|
14519
|
-
}
|
|
14520
|
-
message.mentions.push(MessageMention.decode(reader, reader.uint32()));
|
|
14521
|
-
continue;
|
|
14522
|
-
}
|
|
14523
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
14524
|
-
break;
|
|
14525
|
-
}
|
|
14526
|
-
reader.skipType(tag & 7);
|
|
14527
|
-
}
|
|
14528
|
-
return message;
|
|
14529
|
-
},
|
|
14530
|
-
fromJSON(object) {
|
|
14531
|
-
return {
|
|
14532
|
-
mentions: globalThis.Array.isArray(object == null ? void 0 : object.mentions) ? object.mentions.map((e) => MessageMention.fromJSON(e)) : []
|
|
14533
|
-
};
|
|
14534
|
-
},
|
|
14535
|
-
toJSON(message) {
|
|
14536
|
-
var _a;
|
|
14537
|
-
const obj = {};
|
|
14538
|
-
if ((_a = message.mentions) == null ? void 0 : _a.length) {
|
|
14539
|
-
obj.mentions = message.mentions.map((e) => MessageMention.toJSON(e));
|
|
14540
|
-
}
|
|
14541
|
-
return obj;
|
|
14542
|
-
},
|
|
14543
|
-
create(base) {
|
|
14544
|
-
return MessageMentionList.fromPartial(base != null ? base : {});
|
|
14545
|
-
},
|
|
14546
|
-
fromPartial(object) {
|
|
14547
|
-
var _a;
|
|
14548
|
-
const message = createBaseMessageMentionList();
|
|
14549
|
-
message.mentions = ((_a = object.mentions) == null ? void 0 : _a.map((e) => MessageMention.fromPartial(e))) || [];
|
|
14550
|
-
return message;
|
|
14551
|
-
}
|
|
14552
|
-
};
|
|
14553
|
-
function createBaseMessageAttachmentList() {
|
|
14554
|
-
return { attachments: [] };
|
|
14555
|
-
}
|
|
14556
|
-
var MessageAttachmentList = {
|
|
14557
|
-
encode(message, writer = import_minimal3.default.Writer.create()) {
|
|
14558
|
-
for (const v of message.attachments) {
|
|
14559
|
-
MessageAttachment.encode(v, writer.uint32(10).fork()).ldelim();
|
|
14560
|
-
}
|
|
14561
|
-
return writer;
|
|
14562
|
-
},
|
|
14563
|
-
decode(input, length) {
|
|
14564
|
-
const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
|
|
14565
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14566
|
-
const message = createBaseMessageAttachmentList();
|
|
14567
|
-
while (reader.pos < end) {
|
|
14568
|
-
const tag = reader.uint32();
|
|
14569
|
-
switch (tag >>> 3) {
|
|
14570
|
-
case 1:
|
|
14571
|
-
if (tag !== 10) {
|
|
14572
|
-
break;
|
|
14573
|
-
}
|
|
14574
|
-
message.attachments.push(MessageAttachment.decode(reader, reader.uint32()));
|
|
14575
|
-
continue;
|
|
14576
|
-
}
|
|
14577
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
14578
|
-
break;
|
|
14579
|
-
}
|
|
14580
|
-
reader.skipType(tag & 7);
|
|
14581
|
-
}
|
|
14582
|
-
return message;
|
|
14583
|
-
},
|
|
14584
|
-
fromJSON(object) {
|
|
14585
|
-
return {
|
|
14586
|
-
attachments: globalThis.Array.isArray(object == null ? void 0 : object.attachments) ? object.attachments.map((e) => MessageAttachment.fromJSON(e)) : []
|
|
14587
|
-
};
|
|
14588
|
-
},
|
|
14589
|
-
toJSON(message) {
|
|
14590
|
-
var _a;
|
|
14591
|
-
const obj = {};
|
|
14592
|
-
if ((_a = message.attachments) == null ? void 0 : _a.length) {
|
|
14593
|
-
obj.attachments = message.attachments.map((e) => MessageAttachment.toJSON(e));
|
|
14594
|
-
}
|
|
14595
|
-
return obj;
|
|
14596
|
-
},
|
|
14597
|
-
create(base) {
|
|
14598
|
-
return MessageAttachmentList.fromPartial(base != null ? base : {});
|
|
14599
|
-
},
|
|
14600
|
-
fromPartial(object) {
|
|
14601
|
-
var _a;
|
|
14602
|
-
const message = createBaseMessageAttachmentList();
|
|
14603
|
-
message.attachments = ((_a = object.attachments) == null ? void 0 : _a.map((e) => MessageAttachment.fromPartial(e))) || [];
|
|
14604
|
-
return message;
|
|
14605
|
-
}
|
|
14606
|
-
};
|
|
14607
|
-
function createBaseMessageRefList() {
|
|
14608
|
-
return { refs: [] };
|
|
14609
|
-
}
|
|
14610
|
-
var MessageRefList = {
|
|
14611
|
-
encode(message, writer = import_minimal3.default.Writer.create()) {
|
|
14612
|
-
for (const v of message.refs) {
|
|
14613
|
-
MessageRef.encode(v, writer.uint32(10).fork()).ldelim();
|
|
14614
|
-
}
|
|
14615
|
-
return writer;
|
|
14616
|
-
},
|
|
14617
|
-
decode(input, length) {
|
|
14618
|
-
const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
|
|
14619
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14620
|
-
const message = createBaseMessageRefList();
|
|
14621
|
-
while (reader.pos < end) {
|
|
14622
|
-
const tag = reader.uint32();
|
|
14623
|
-
switch (tag >>> 3) {
|
|
14624
|
-
case 1:
|
|
14625
|
-
if (tag !== 10) {
|
|
14626
|
-
break;
|
|
14627
|
-
}
|
|
14628
|
-
message.refs.push(MessageRef.decode(reader, reader.uint32()));
|
|
14629
|
-
continue;
|
|
14630
|
-
}
|
|
14631
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
14632
|
-
break;
|
|
14633
|
-
}
|
|
14634
|
-
reader.skipType(tag & 7);
|
|
14635
|
-
}
|
|
14636
|
-
return message;
|
|
14637
|
-
},
|
|
14638
|
-
fromJSON(object) {
|
|
14639
|
-
return { refs: globalThis.Array.isArray(object == null ? void 0 : object.refs) ? object.refs.map((e) => MessageRef.fromJSON(e)) : [] };
|
|
14640
|
-
},
|
|
14641
|
-
toJSON(message) {
|
|
14642
|
-
var _a;
|
|
14643
|
-
const obj = {};
|
|
14644
|
-
if ((_a = message.refs) == null ? void 0 : _a.length) {
|
|
14645
|
-
obj.refs = message.refs.map((e) => MessageRef.toJSON(e));
|
|
14646
|
-
}
|
|
14647
|
-
return obj;
|
|
14648
|
-
},
|
|
14649
|
-
create(base) {
|
|
14650
|
-
return MessageRefList.fromPartial(base != null ? base : {});
|
|
14651
|
-
},
|
|
14652
|
-
fromPartial(object) {
|
|
14653
|
-
var _a;
|
|
14654
|
-
const message = createBaseMessageRefList();
|
|
14655
|
-
message.refs = ((_a = object.refs) == null ? void 0 : _a.map((e) => MessageRef.fromPartial(e))) || [];
|
|
14656
|
-
return message;
|
|
14657
|
-
}
|
|
14658
|
-
};
|
|
14659
|
-
function createBaseMessageReactionList() {
|
|
14660
|
-
return { reactions: [] };
|
|
14661
|
-
}
|
|
14662
|
-
var MessageReactionList = {
|
|
14663
|
-
encode(message, writer = import_minimal3.default.Writer.create()) {
|
|
14664
|
-
for (const v of message.reactions) {
|
|
14665
|
-
MessageReaction.encode(v, writer.uint32(10).fork()).ldelim();
|
|
14666
|
-
}
|
|
14667
|
-
return writer;
|
|
14668
|
-
},
|
|
14669
|
-
decode(input, length) {
|
|
14670
|
-
const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
|
|
14671
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14672
|
-
const message = createBaseMessageReactionList();
|
|
14673
|
-
while (reader.pos < end) {
|
|
14674
|
-
const tag = reader.uint32();
|
|
14675
|
-
switch (tag >>> 3) {
|
|
14676
|
-
case 1:
|
|
14677
|
-
if (tag !== 10) {
|
|
14678
|
-
break;
|
|
14679
|
-
}
|
|
14680
|
-
message.reactions.push(MessageReaction.decode(reader, reader.uint32()));
|
|
14681
|
-
continue;
|
|
14682
|
-
}
|
|
14683
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
14684
|
-
break;
|
|
14685
|
-
}
|
|
14686
|
-
reader.skipType(tag & 7);
|
|
14687
|
-
}
|
|
14688
|
-
return message;
|
|
14689
|
-
},
|
|
14690
|
-
fromJSON(object) {
|
|
14691
|
-
return {
|
|
14692
|
-
reactions: globalThis.Array.isArray(object == null ? void 0 : object.reactions) ? object.reactions.map((e) => MessageReaction.fromJSON(e)) : []
|
|
14693
|
-
};
|
|
14694
|
-
},
|
|
14695
|
-
toJSON(message) {
|
|
14696
|
-
var _a;
|
|
14697
|
-
const obj = {};
|
|
14698
|
-
if ((_a = message.reactions) == null ? void 0 : _a.length) {
|
|
14699
|
-
obj.reactions = message.reactions.map((e) => MessageReaction.toJSON(e));
|
|
14700
|
-
}
|
|
14701
|
-
return obj;
|
|
14702
|
-
},
|
|
14703
|
-
create(base) {
|
|
14704
|
-
return MessageReactionList.fromPartial(base != null ? base : {});
|
|
14705
|
-
},
|
|
14706
|
-
fromPartial(object) {
|
|
14707
|
-
var _a;
|
|
14708
|
-
const message = createBaseMessageReactionList();
|
|
14709
|
-
message.reactions = ((_a = object.reactions) == null ? void 0 : _a.map((e) => MessageReaction.fromPartial(e))) || [];
|
|
14710
|
-
return message;
|
|
14711
|
-
}
|
|
14712
|
-
};
|
|
14713
14146
|
function createBaseListClanBadgeCountRequest() {
|
|
14714
14147
|
return { clan_id: "" };
|
|
14715
14148
|
}
|
|
@@ -26937,43 +26370,6 @@ var WebSocketAdapterPb = class {
|
|
|
26937
26370
|
this._socket.send(encodedMsg);
|
|
26938
26371
|
}
|
|
26939
26372
|
};
|
|
26940
|
-
|
|
26941
|
-
// utils.ts
|
|
26942
|
-
function decodeMentions(data) {
|
|
26943
|
-
const buffer = data;
|
|
26944
|
-
const uintBuffer = new Uint8Array(buffer);
|
|
26945
|
-
const mentions = MessageMentionList.decode(uintBuffer);
|
|
26946
|
-
return mentions;
|
|
26947
|
-
}
|
|
26948
|
-
function decodeAttachments(data) {
|
|
26949
|
-
const buffer = data;
|
|
26950
|
-
const uintBuffer = new Uint8Array(buffer);
|
|
26951
|
-
const attachments = MessageAttachmentList.decode(uintBuffer);
|
|
26952
|
-
return attachments;
|
|
26953
|
-
}
|
|
26954
|
-
function decodeRefs(data) {
|
|
26955
|
-
const buffer = data;
|
|
26956
|
-
const uintBuffer = new Uint8Array(buffer);
|
|
26957
|
-
const refs = MessageRefList.decode(uintBuffer);
|
|
26958
|
-
return refs;
|
|
26959
|
-
}
|
|
26960
|
-
function decodeReactions(data) {
|
|
26961
|
-
const buffer = data;
|
|
26962
|
-
const uintBuffer = new Uint8Array(buffer);
|
|
26963
|
-
const reactions = MessageReactionList.decode(uintBuffer);
|
|
26964
|
-
return reactions;
|
|
26965
|
-
}
|
|
26966
|
-
function decodeNotificationFcm(data) {
|
|
26967
|
-
const buffer = data;
|
|
26968
|
-
const uintBuffer = new Uint8Array(buffer);
|
|
26969
|
-
const noti = DirectFcmProto.decode(uintBuffer);
|
|
26970
|
-
return noti;
|
|
26971
|
-
}
|
|
26972
26373
|
export {
|
|
26973
|
-
WebSocketAdapterPb
|
|
26974
|
-
decodeAttachments,
|
|
26975
|
-
decodeMentions,
|
|
26976
|
-
decodeNotificationFcm,
|
|
26977
|
-
decodeReactions,
|
|
26978
|
-
decodeRefs
|
|
26374
|
+
WebSocketAdapterPb
|
|
26979
26375
|
};
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mezon-js-protobuf",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.87",
|
|
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",
|