mezon-js-protobuf 1.7.2 → 1.7.4
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 +38149 -38029
- package/dist/mezon-js-protobuf/api/api.d.ts +211 -135
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +413 -331
- package/dist/mezon-js-protobuf.cjs.js +154 -15
- package/dist/mezon-js-protobuf.esm.mjs +154 -15
- package/package.json +1 -1
- package/rtapi/realtime.ts +11512 -11487
|
@@ -4201,7 +4201,7 @@ function createBaseChannelDescription() {
|
|
|
4201
4201
|
count_mess_unread: 0,
|
|
4202
4202
|
active: 0,
|
|
4203
4203
|
last_pin_message: "",
|
|
4204
|
-
usernames:
|
|
4204
|
+
usernames: [],
|
|
4205
4205
|
creator_name: "",
|
|
4206
4206
|
create_time_seconds: 0,
|
|
4207
4207
|
update_time_seconds: 0,
|
|
@@ -4212,7 +4212,8 @@ function createBaseChannelDescription() {
|
|
|
4212
4212
|
is_mute: false,
|
|
4213
4213
|
age_restricted: 0,
|
|
4214
4214
|
topic: "",
|
|
4215
|
-
e2ee: 0
|
|
4215
|
+
e2ee: 0,
|
|
4216
|
+
display_names: []
|
|
4216
4217
|
};
|
|
4217
4218
|
}
|
|
4218
4219
|
var ChannelDescription = {
|
|
@@ -4273,8 +4274,8 @@ var ChannelDescription = {
|
|
|
4273
4274
|
if (message.last_pin_message !== "") {
|
|
4274
4275
|
writer.uint32(146).string(message.last_pin_message);
|
|
4275
4276
|
}
|
|
4276
|
-
|
|
4277
|
-
writer.uint32(154).string(
|
|
4277
|
+
for (const v of message.usernames) {
|
|
4278
|
+
writer.uint32(154).string(v);
|
|
4278
4279
|
}
|
|
4279
4280
|
if (message.creator_name !== "") {
|
|
4280
4281
|
writer.uint32(162).string(message.creator_name);
|
|
@@ -4309,6 +4310,9 @@ var ChannelDescription = {
|
|
|
4309
4310
|
if (message.e2ee !== 0) {
|
|
4310
4311
|
writer.uint32(240).int32(message.e2ee);
|
|
4311
4312
|
}
|
|
4313
|
+
for (const v of message.display_names) {
|
|
4314
|
+
writer.uint32(250).string(v);
|
|
4315
|
+
}
|
|
4312
4316
|
return writer;
|
|
4313
4317
|
},
|
|
4314
4318
|
decode(input, length) {
|
|
@@ -4437,7 +4441,7 @@ var ChannelDescription = {
|
|
|
4437
4441
|
if (tag !== 154) {
|
|
4438
4442
|
break;
|
|
4439
4443
|
}
|
|
4440
|
-
message.usernames
|
|
4444
|
+
message.usernames.push(reader.string());
|
|
4441
4445
|
continue;
|
|
4442
4446
|
case 20:
|
|
4443
4447
|
if (tag !== 162) {
|
|
@@ -4505,6 +4509,12 @@ var ChannelDescription = {
|
|
|
4505
4509
|
}
|
|
4506
4510
|
message.e2ee = reader.int32();
|
|
4507
4511
|
continue;
|
|
4512
|
+
case 31:
|
|
4513
|
+
if (tag !== 250) {
|
|
4514
|
+
break;
|
|
4515
|
+
}
|
|
4516
|
+
message.display_names.push(reader.string());
|
|
4517
|
+
continue;
|
|
4508
4518
|
}
|
|
4509
4519
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4510
4520
|
break;
|
|
@@ -4533,7 +4543,7 @@ var ChannelDescription = {
|
|
|
4533
4543
|
count_mess_unread: isSet3(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
|
|
4534
4544
|
active: isSet3(object.active) ? globalThis.Number(object.active) : 0,
|
|
4535
4545
|
last_pin_message: isSet3(object.last_pin_message) ? globalThis.String(object.last_pin_message) : "",
|
|
4536
|
-
usernames:
|
|
4546
|
+
usernames: globalThis.Array.isArray(object == null ? void 0 : object.usernames) ? object.usernames.map((e) => globalThis.String(e)) : [],
|
|
4537
4547
|
creator_name: isSet3(object.creator_name) ? globalThis.String(object.creator_name) : "",
|
|
4538
4548
|
create_time_seconds: isSet3(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
4539
4549
|
update_time_seconds: isSet3(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
|
|
@@ -4544,11 +4554,12 @@ var ChannelDescription = {
|
|
|
4544
4554
|
is_mute: isSet3(object.is_mute) ? globalThis.Boolean(object.is_mute) : false,
|
|
4545
4555
|
age_restricted: isSet3(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
4546
4556
|
topic: isSet3(object.topic) ? globalThis.String(object.topic) : "",
|
|
4547
|
-
e2ee: isSet3(object.e2ee) ? globalThis.Number(object.e2ee) : 0
|
|
4557
|
+
e2ee: isSet3(object.e2ee) ? globalThis.Number(object.e2ee) : 0,
|
|
4558
|
+
display_names: globalThis.Array.isArray(object == null ? void 0 : object.display_names) ? object.display_names.map((e) => globalThis.String(e)) : []
|
|
4548
4559
|
};
|
|
4549
4560
|
},
|
|
4550
4561
|
toJSON(message) {
|
|
4551
|
-
var _a, _b, _c, _d, _e;
|
|
4562
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4552
4563
|
const obj = {};
|
|
4553
4564
|
if (message.clan_id !== "") {
|
|
4554
4565
|
obj.clan_id = message.clan_id;
|
|
@@ -4604,7 +4615,7 @@ var ChannelDescription = {
|
|
|
4604
4615
|
if (message.last_pin_message !== "") {
|
|
4605
4616
|
obj.last_pin_message = message.last_pin_message;
|
|
4606
4617
|
}
|
|
4607
|
-
if (message.usernames
|
|
4618
|
+
if ((_d = message.usernames) == null ? void 0 : _d.length) {
|
|
4608
4619
|
obj.usernames = message.usernames;
|
|
4609
4620
|
}
|
|
4610
4621
|
if (message.creator_name !== "") {
|
|
@@ -4616,10 +4627,10 @@ var ChannelDescription = {
|
|
|
4616
4627
|
if (message.update_time_seconds !== 0) {
|
|
4617
4628
|
obj.update_time_seconds = Math.round(message.update_time_seconds);
|
|
4618
4629
|
}
|
|
4619
|
-
if ((
|
|
4630
|
+
if ((_e = message.metadata) == null ? void 0 : _e.length) {
|
|
4620
4631
|
obj.metadata = message.metadata;
|
|
4621
4632
|
}
|
|
4622
|
-
if ((
|
|
4633
|
+
if ((_f = message.about_me) == null ? void 0 : _f.length) {
|
|
4623
4634
|
obj.about_me = message.about_me;
|
|
4624
4635
|
}
|
|
4625
4636
|
if (message.clan_name !== "") {
|
|
@@ -4640,13 +4651,16 @@ var ChannelDescription = {
|
|
|
4640
4651
|
if (message.e2ee !== 0) {
|
|
4641
4652
|
obj.e2ee = Math.round(message.e2ee);
|
|
4642
4653
|
}
|
|
4654
|
+
if ((_g = message.display_names) == null ? void 0 : _g.length) {
|
|
4655
|
+
obj.display_names = message.display_names;
|
|
4656
|
+
}
|
|
4643
4657
|
return obj;
|
|
4644
4658
|
},
|
|
4645
4659
|
create(base) {
|
|
4646
4660
|
return ChannelDescription.fromPartial(base != null ? base : {});
|
|
4647
4661
|
},
|
|
4648
4662
|
fromPartial(object) {
|
|
4649
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
|
|
4663
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C;
|
|
4650
4664
|
const message = createBaseChannelDescription();
|
|
4651
4665
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
4652
4666
|
message.parrent_id = (_b = object.parrent_id) != null ? _b : "";
|
|
@@ -4666,7 +4680,7 @@ var ChannelDescription = {
|
|
|
4666
4680
|
message.count_mess_unread = (_n = object.count_mess_unread) != null ? _n : 0;
|
|
4667
4681
|
message.active = (_o = object.active) != null ? _o : 0;
|
|
4668
4682
|
message.last_pin_message = (_p = object.last_pin_message) != null ? _p : "";
|
|
4669
|
-
message.usernames = (_q = object.usernames)
|
|
4683
|
+
message.usernames = ((_q = object.usernames) == null ? void 0 : _q.map((e) => e)) || [];
|
|
4670
4684
|
message.creator_name = (_r = object.creator_name) != null ? _r : "";
|
|
4671
4685
|
message.create_time_seconds = (_s = object.create_time_seconds) != null ? _s : 0;
|
|
4672
4686
|
message.update_time_seconds = (_t = object.update_time_seconds) != null ? _t : 0;
|
|
@@ -4678,6 +4692,7 @@ var ChannelDescription = {
|
|
|
4678
4692
|
message.age_restricted = (_z = object.age_restricted) != null ? _z : 0;
|
|
4679
4693
|
message.topic = (_A = object.topic) != null ? _A : "";
|
|
4680
4694
|
message.e2ee = (_B = object.e2ee) != null ? _B : 0;
|
|
4695
|
+
message.display_names = ((_C = object.display_names) == null ? void 0 : _C.map((e) => e)) || [];
|
|
4681
4696
|
return message;
|
|
4682
4697
|
}
|
|
4683
4698
|
};
|
|
@@ -5099,6 +5114,115 @@ var Permission = {
|
|
|
5099
5114
|
return message;
|
|
5100
5115
|
}
|
|
5101
5116
|
};
|
|
5117
|
+
function createBaseNotificationUserChannel() {
|
|
5118
|
+
return { id: "", notification_setting_type: 0, time_mute: void 0, active: 0, channel_id: "" };
|
|
5119
|
+
}
|
|
5120
|
+
var NotificationUserChannel = {
|
|
5121
|
+
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
5122
|
+
if (message.id !== "") {
|
|
5123
|
+
writer.uint32(10).string(message.id);
|
|
5124
|
+
}
|
|
5125
|
+
if (message.notification_setting_type !== 0) {
|
|
5126
|
+
writer.uint32(16).int32(message.notification_setting_type);
|
|
5127
|
+
}
|
|
5128
|
+
if (message.time_mute !== void 0) {
|
|
5129
|
+
Timestamp.encode(toTimestamp(message.time_mute), writer.uint32(26).fork()).ldelim();
|
|
5130
|
+
}
|
|
5131
|
+
if (message.active !== 0) {
|
|
5132
|
+
writer.uint32(32).int32(message.active);
|
|
5133
|
+
}
|
|
5134
|
+
if (message.channel_id !== "") {
|
|
5135
|
+
writer.uint32(42).string(message.channel_id);
|
|
5136
|
+
}
|
|
5137
|
+
return writer;
|
|
5138
|
+
},
|
|
5139
|
+
decode(input, length) {
|
|
5140
|
+
const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
|
|
5141
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5142
|
+
const message = createBaseNotificationUserChannel();
|
|
5143
|
+
while (reader.pos < end) {
|
|
5144
|
+
const tag = reader.uint32();
|
|
5145
|
+
switch (tag >>> 3) {
|
|
5146
|
+
case 1:
|
|
5147
|
+
if (tag !== 10) {
|
|
5148
|
+
break;
|
|
5149
|
+
}
|
|
5150
|
+
message.id = reader.string();
|
|
5151
|
+
continue;
|
|
5152
|
+
case 2:
|
|
5153
|
+
if (tag !== 16) {
|
|
5154
|
+
break;
|
|
5155
|
+
}
|
|
5156
|
+
message.notification_setting_type = reader.int32();
|
|
5157
|
+
continue;
|
|
5158
|
+
case 3:
|
|
5159
|
+
if (tag !== 26) {
|
|
5160
|
+
break;
|
|
5161
|
+
}
|
|
5162
|
+
message.time_mute = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
5163
|
+
continue;
|
|
5164
|
+
case 4:
|
|
5165
|
+
if (tag !== 32) {
|
|
5166
|
+
break;
|
|
5167
|
+
}
|
|
5168
|
+
message.active = reader.int32();
|
|
5169
|
+
continue;
|
|
5170
|
+
case 5:
|
|
5171
|
+
if (tag !== 42) {
|
|
5172
|
+
break;
|
|
5173
|
+
}
|
|
5174
|
+
message.channel_id = reader.string();
|
|
5175
|
+
continue;
|
|
5176
|
+
}
|
|
5177
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5178
|
+
break;
|
|
5179
|
+
}
|
|
5180
|
+
reader.skipType(tag & 7);
|
|
5181
|
+
}
|
|
5182
|
+
return message;
|
|
5183
|
+
},
|
|
5184
|
+
fromJSON(object) {
|
|
5185
|
+
return {
|
|
5186
|
+
id: isSet3(object.id) ? globalThis.String(object.id) : "",
|
|
5187
|
+
notification_setting_type: isSet3(object.notification_setting_type) ? globalThis.Number(object.notification_setting_type) : 0,
|
|
5188
|
+
time_mute: isSet3(object.time_mute) ? fromJsonTimestamp(object.time_mute) : void 0,
|
|
5189
|
+
active: isSet3(object.active) ? globalThis.Number(object.active) : 0,
|
|
5190
|
+
channel_id: isSet3(object.channel_id) ? globalThis.String(object.channel_id) : ""
|
|
5191
|
+
};
|
|
5192
|
+
},
|
|
5193
|
+
toJSON(message) {
|
|
5194
|
+
const obj = {};
|
|
5195
|
+
if (message.id !== "") {
|
|
5196
|
+
obj.id = message.id;
|
|
5197
|
+
}
|
|
5198
|
+
if (message.notification_setting_type !== 0) {
|
|
5199
|
+
obj.notification_setting_type = Math.round(message.notification_setting_type);
|
|
5200
|
+
}
|
|
5201
|
+
if (message.time_mute !== void 0) {
|
|
5202
|
+
obj.time_mute = message.time_mute.toISOString();
|
|
5203
|
+
}
|
|
5204
|
+
if (message.active !== 0) {
|
|
5205
|
+
obj.active = Math.round(message.active);
|
|
5206
|
+
}
|
|
5207
|
+
if (message.channel_id !== "") {
|
|
5208
|
+
obj.channel_id = message.channel_id;
|
|
5209
|
+
}
|
|
5210
|
+
return obj;
|
|
5211
|
+
},
|
|
5212
|
+
create(base) {
|
|
5213
|
+
return NotificationUserChannel.fromPartial(base != null ? base : {});
|
|
5214
|
+
},
|
|
5215
|
+
fromPartial(object) {
|
|
5216
|
+
var _a, _b, _c, _d, _e;
|
|
5217
|
+
const message = createBaseNotificationUserChannel();
|
|
5218
|
+
message.id = (_a = object.id) != null ? _a : "";
|
|
5219
|
+
message.notification_setting_type = (_b = object.notification_setting_type) != null ? _b : 0;
|
|
5220
|
+
message.time_mute = (_c = object.time_mute) != null ? _c : void 0;
|
|
5221
|
+
message.active = (_d = object.active) != null ? _d : 0;
|
|
5222
|
+
message.channel_id = (_e = object.channel_id) != null ? _e : "";
|
|
5223
|
+
return message;
|
|
5224
|
+
}
|
|
5225
|
+
};
|
|
5102
5226
|
function createBasePermissionList() {
|
|
5103
5227
|
return { permissions: [], max_level_permission: 0 };
|
|
5104
5228
|
}
|
|
@@ -6430,7 +6554,8 @@ function createBaseEnvelope() {
|
|
|
6430
6554
|
channel_app_event: void 0,
|
|
6431
6555
|
user_status_event: void 0,
|
|
6432
6556
|
remove_friend: void 0,
|
|
6433
|
-
webhook_event: void 0
|
|
6557
|
+
webhook_event: void 0,
|
|
6558
|
+
noti_user_channel: void 0
|
|
6434
6559
|
};
|
|
6435
6560
|
}
|
|
6436
6561
|
var Envelope = {
|
|
@@ -6648,6 +6773,9 @@ var Envelope = {
|
|
|
6648
6773
|
if (message.webhook_event !== void 0) {
|
|
6649
6774
|
Webhook.encode(message.webhook_event, writer.uint32(570).fork()).ldelim();
|
|
6650
6775
|
}
|
|
6776
|
+
if (message.noti_user_channel !== void 0) {
|
|
6777
|
+
NotificationUserChannel.encode(message.noti_user_channel, writer.uint32(578).fork()).ldelim();
|
|
6778
|
+
}
|
|
6651
6779
|
return writer;
|
|
6652
6780
|
},
|
|
6653
6781
|
decode(input, length) {
|
|
@@ -7083,6 +7211,12 @@ var Envelope = {
|
|
|
7083
7211
|
}
|
|
7084
7212
|
message.webhook_event = Webhook.decode(reader, reader.uint32());
|
|
7085
7213
|
continue;
|
|
7214
|
+
case 72:
|
|
7215
|
+
if (tag !== 578) {
|
|
7216
|
+
break;
|
|
7217
|
+
}
|
|
7218
|
+
message.noti_user_channel = NotificationUserChannel.decode(reader, reader.uint32());
|
|
7219
|
+
continue;
|
|
7086
7220
|
}
|
|
7087
7221
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7088
7222
|
break;
|
|
@@ -7163,7 +7297,8 @@ var Envelope = {
|
|
|
7163
7297
|
channel_app_event: isSet4(object.channel_app_event) ? ChannelAppEvent.fromJSON(object.channel_app_event) : void 0,
|
|
7164
7298
|
user_status_event: isSet4(object.user_status_event) ? UserStatusEvent.fromJSON(object.user_status_event) : void 0,
|
|
7165
7299
|
remove_friend: isSet4(object.remove_friend) ? RemoveFriend.fromJSON(object.remove_friend) : void 0,
|
|
7166
|
-
webhook_event: isSet4(object.webhook_event) ? Webhook.fromJSON(object.webhook_event) : void 0
|
|
7300
|
+
webhook_event: isSet4(object.webhook_event) ? Webhook.fromJSON(object.webhook_event) : void 0,
|
|
7301
|
+
noti_user_channel: isSet4(object.noti_user_channel) ? NotificationUserChannel.fromJSON(object.noti_user_channel) : void 0
|
|
7167
7302
|
};
|
|
7168
7303
|
},
|
|
7169
7304
|
toJSON(message) {
|
|
@@ -7381,6 +7516,9 @@ var Envelope = {
|
|
|
7381
7516
|
if (message.webhook_event !== void 0) {
|
|
7382
7517
|
obj.webhook_event = Webhook.toJSON(message.webhook_event);
|
|
7383
7518
|
}
|
|
7519
|
+
if (message.noti_user_channel !== void 0) {
|
|
7520
|
+
obj.noti_user_channel = NotificationUserChannel.toJSON(message.noti_user_channel);
|
|
7521
|
+
}
|
|
7384
7522
|
return obj;
|
|
7385
7523
|
},
|
|
7386
7524
|
create(base) {
|
|
@@ -7460,6 +7598,7 @@ var Envelope = {
|
|
|
7460
7598
|
message.user_status_event = object.user_status_event !== void 0 && object.user_status_event !== null ? UserStatusEvent.fromPartial(object.user_status_event) : void 0;
|
|
7461
7599
|
message.remove_friend = object.remove_friend !== void 0 && object.remove_friend !== null ? RemoveFriend.fromPartial(object.remove_friend) : void 0;
|
|
7462
7600
|
message.webhook_event = object.webhook_event !== void 0 && object.webhook_event !== null ? Webhook.fromPartial(object.webhook_event) : void 0;
|
|
7601
|
+
message.noti_user_channel = object.noti_user_channel !== void 0 && object.noti_user_channel !== null ? NotificationUserChannel.fromPartial(object.noti_user_channel) : void 0;
|
|
7463
7602
|
return message;
|
|
7464
7603
|
}
|
|
7465
7604
|
};
|
|
@@ -4188,7 +4188,7 @@ function createBaseChannelDescription() {
|
|
|
4188
4188
|
count_mess_unread: 0,
|
|
4189
4189
|
active: 0,
|
|
4190
4190
|
last_pin_message: "",
|
|
4191
|
-
usernames:
|
|
4191
|
+
usernames: [],
|
|
4192
4192
|
creator_name: "",
|
|
4193
4193
|
create_time_seconds: 0,
|
|
4194
4194
|
update_time_seconds: 0,
|
|
@@ -4199,7 +4199,8 @@ function createBaseChannelDescription() {
|
|
|
4199
4199
|
is_mute: false,
|
|
4200
4200
|
age_restricted: 0,
|
|
4201
4201
|
topic: "",
|
|
4202
|
-
e2ee: 0
|
|
4202
|
+
e2ee: 0,
|
|
4203
|
+
display_names: []
|
|
4203
4204
|
};
|
|
4204
4205
|
}
|
|
4205
4206
|
var ChannelDescription = {
|
|
@@ -4260,8 +4261,8 @@ var ChannelDescription = {
|
|
|
4260
4261
|
if (message.last_pin_message !== "") {
|
|
4261
4262
|
writer.uint32(146).string(message.last_pin_message);
|
|
4262
4263
|
}
|
|
4263
|
-
|
|
4264
|
-
writer.uint32(154).string(
|
|
4264
|
+
for (const v of message.usernames) {
|
|
4265
|
+
writer.uint32(154).string(v);
|
|
4265
4266
|
}
|
|
4266
4267
|
if (message.creator_name !== "") {
|
|
4267
4268
|
writer.uint32(162).string(message.creator_name);
|
|
@@ -4296,6 +4297,9 @@ var ChannelDescription = {
|
|
|
4296
4297
|
if (message.e2ee !== 0) {
|
|
4297
4298
|
writer.uint32(240).int32(message.e2ee);
|
|
4298
4299
|
}
|
|
4300
|
+
for (const v of message.display_names) {
|
|
4301
|
+
writer.uint32(250).string(v);
|
|
4302
|
+
}
|
|
4299
4303
|
return writer;
|
|
4300
4304
|
},
|
|
4301
4305
|
decode(input, length) {
|
|
@@ -4424,7 +4428,7 @@ var ChannelDescription = {
|
|
|
4424
4428
|
if (tag !== 154) {
|
|
4425
4429
|
break;
|
|
4426
4430
|
}
|
|
4427
|
-
message.usernames
|
|
4431
|
+
message.usernames.push(reader.string());
|
|
4428
4432
|
continue;
|
|
4429
4433
|
case 20:
|
|
4430
4434
|
if (tag !== 162) {
|
|
@@ -4492,6 +4496,12 @@ var ChannelDescription = {
|
|
|
4492
4496
|
}
|
|
4493
4497
|
message.e2ee = reader.int32();
|
|
4494
4498
|
continue;
|
|
4499
|
+
case 31:
|
|
4500
|
+
if (tag !== 250) {
|
|
4501
|
+
break;
|
|
4502
|
+
}
|
|
4503
|
+
message.display_names.push(reader.string());
|
|
4504
|
+
continue;
|
|
4495
4505
|
}
|
|
4496
4506
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4497
4507
|
break;
|
|
@@ -4520,7 +4530,7 @@ var ChannelDescription = {
|
|
|
4520
4530
|
count_mess_unread: isSet3(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
|
|
4521
4531
|
active: isSet3(object.active) ? globalThis.Number(object.active) : 0,
|
|
4522
4532
|
last_pin_message: isSet3(object.last_pin_message) ? globalThis.String(object.last_pin_message) : "",
|
|
4523
|
-
usernames:
|
|
4533
|
+
usernames: globalThis.Array.isArray(object == null ? void 0 : object.usernames) ? object.usernames.map((e) => globalThis.String(e)) : [],
|
|
4524
4534
|
creator_name: isSet3(object.creator_name) ? globalThis.String(object.creator_name) : "",
|
|
4525
4535
|
create_time_seconds: isSet3(object.create_time_seconds) ? globalThis.Number(object.create_time_seconds) : 0,
|
|
4526
4536
|
update_time_seconds: isSet3(object.update_time_seconds) ? globalThis.Number(object.update_time_seconds) : 0,
|
|
@@ -4531,11 +4541,12 @@ var ChannelDescription = {
|
|
|
4531
4541
|
is_mute: isSet3(object.is_mute) ? globalThis.Boolean(object.is_mute) : false,
|
|
4532
4542
|
age_restricted: isSet3(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
4533
4543
|
topic: isSet3(object.topic) ? globalThis.String(object.topic) : "",
|
|
4534
|
-
e2ee: isSet3(object.e2ee) ? globalThis.Number(object.e2ee) : 0
|
|
4544
|
+
e2ee: isSet3(object.e2ee) ? globalThis.Number(object.e2ee) : 0,
|
|
4545
|
+
display_names: globalThis.Array.isArray(object == null ? void 0 : object.display_names) ? object.display_names.map((e) => globalThis.String(e)) : []
|
|
4535
4546
|
};
|
|
4536
4547
|
},
|
|
4537
4548
|
toJSON(message) {
|
|
4538
|
-
var _a, _b, _c, _d, _e;
|
|
4549
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4539
4550
|
const obj = {};
|
|
4540
4551
|
if (message.clan_id !== "") {
|
|
4541
4552
|
obj.clan_id = message.clan_id;
|
|
@@ -4591,7 +4602,7 @@ var ChannelDescription = {
|
|
|
4591
4602
|
if (message.last_pin_message !== "") {
|
|
4592
4603
|
obj.last_pin_message = message.last_pin_message;
|
|
4593
4604
|
}
|
|
4594
|
-
if (message.usernames
|
|
4605
|
+
if ((_d = message.usernames) == null ? void 0 : _d.length) {
|
|
4595
4606
|
obj.usernames = message.usernames;
|
|
4596
4607
|
}
|
|
4597
4608
|
if (message.creator_name !== "") {
|
|
@@ -4603,10 +4614,10 @@ var ChannelDescription = {
|
|
|
4603
4614
|
if (message.update_time_seconds !== 0) {
|
|
4604
4615
|
obj.update_time_seconds = Math.round(message.update_time_seconds);
|
|
4605
4616
|
}
|
|
4606
|
-
if ((
|
|
4617
|
+
if ((_e = message.metadata) == null ? void 0 : _e.length) {
|
|
4607
4618
|
obj.metadata = message.metadata;
|
|
4608
4619
|
}
|
|
4609
|
-
if ((
|
|
4620
|
+
if ((_f = message.about_me) == null ? void 0 : _f.length) {
|
|
4610
4621
|
obj.about_me = message.about_me;
|
|
4611
4622
|
}
|
|
4612
4623
|
if (message.clan_name !== "") {
|
|
@@ -4627,13 +4638,16 @@ var ChannelDescription = {
|
|
|
4627
4638
|
if (message.e2ee !== 0) {
|
|
4628
4639
|
obj.e2ee = Math.round(message.e2ee);
|
|
4629
4640
|
}
|
|
4641
|
+
if ((_g = message.display_names) == null ? void 0 : _g.length) {
|
|
4642
|
+
obj.display_names = message.display_names;
|
|
4643
|
+
}
|
|
4630
4644
|
return obj;
|
|
4631
4645
|
},
|
|
4632
4646
|
create(base) {
|
|
4633
4647
|
return ChannelDescription.fromPartial(base != null ? base : {});
|
|
4634
4648
|
},
|
|
4635
4649
|
fromPartial(object) {
|
|
4636
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
|
|
4650
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C;
|
|
4637
4651
|
const message = createBaseChannelDescription();
|
|
4638
4652
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
4639
4653
|
message.parrent_id = (_b = object.parrent_id) != null ? _b : "";
|
|
@@ -4653,7 +4667,7 @@ var ChannelDescription = {
|
|
|
4653
4667
|
message.count_mess_unread = (_n = object.count_mess_unread) != null ? _n : 0;
|
|
4654
4668
|
message.active = (_o = object.active) != null ? _o : 0;
|
|
4655
4669
|
message.last_pin_message = (_p = object.last_pin_message) != null ? _p : "";
|
|
4656
|
-
message.usernames = (_q = object.usernames)
|
|
4670
|
+
message.usernames = ((_q = object.usernames) == null ? void 0 : _q.map((e) => e)) || [];
|
|
4657
4671
|
message.creator_name = (_r = object.creator_name) != null ? _r : "";
|
|
4658
4672
|
message.create_time_seconds = (_s = object.create_time_seconds) != null ? _s : 0;
|
|
4659
4673
|
message.update_time_seconds = (_t = object.update_time_seconds) != null ? _t : 0;
|
|
@@ -4665,6 +4679,7 @@ var ChannelDescription = {
|
|
|
4665
4679
|
message.age_restricted = (_z = object.age_restricted) != null ? _z : 0;
|
|
4666
4680
|
message.topic = (_A = object.topic) != null ? _A : "";
|
|
4667
4681
|
message.e2ee = (_B = object.e2ee) != null ? _B : 0;
|
|
4682
|
+
message.display_names = ((_C = object.display_names) == null ? void 0 : _C.map((e) => e)) || [];
|
|
4668
4683
|
return message;
|
|
4669
4684
|
}
|
|
4670
4685
|
};
|
|
@@ -5086,6 +5101,115 @@ var Permission = {
|
|
|
5086
5101
|
return message;
|
|
5087
5102
|
}
|
|
5088
5103
|
};
|
|
5104
|
+
function createBaseNotificationUserChannel() {
|
|
5105
|
+
return { id: "", notification_setting_type: 0, time_mute: void 0, active: 0, channel_id: "" };
|
|
5106
|
+
}
|
|
5107
|
+
var NotificationUserChannel = {
|
|
5108
|
+
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
5109
|
+
if (message.id !== "") {
|
|
5110
|
+
writer.uint32(10).string(message.id);
|
|
5111
|
+
}
|
|
5112
|
+
if (message.notification_setting_type !== 0) {
|
|
5113
|
+
writer.uint32(16).int32(message.notification_setting_type);
|
|
5114
|
+
}
|
|
5115
|
+
if (message.time_mute !== void 0) {
|
|
5116
|
+
Timestamp.encode(toTimestamp(message.time_mute), writer.uint32(26).fork()).ldelim();
|
|
5117
|
+
}
|
|
5118
|
+
if (message.active !== 0) {
|
|
5119
|
+
writer.uint32(32).int32(message.active);
|
|
5120
|
+
}
|
|
5121
|
+
if (message.channel_id !== "") {
|
|
5122
|
+
writer.uint32(42).string(message.channel_id);
|
|
5123
|
+
}
|
|
5124
|
+
return writer;
|
|
5125
|
+
},
|
|
5126
|
+
decode(input, length) {
|
|
5127
|
+
const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
|
|
5128
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5129
|
+
const message = createBaseNotificationUserChannel();
|
|
5130
|
+
while (reader.pos < end) {
|
|
5131
|
+
const tag = reader.uint32();
|
|
5132
|
+
switch (tag >>> 3) {
|
|
5133
|
+
case 1:
|
|
5134
|
+
if (tag !== 10) {
|
|
5135
|
+
break;
|
|
5136
|
+
}
|
|
5137
|
+
message.id = reader.string();
|
|
5138
|
+
continue;
|
|
5139
|
+
case 2:
|
|
5140
|
+
if (tag !== 16) {
|
|
5141
|
+
break;
|
|
5142
|
+
}
|
|
5143
|
+
message.notification_setting_type = reader.int32();
|
|
5144
|
+
continue;
|
|
5145
|
+
case 3:
|
|
5146
|
+
if (tag !== 26) {
|
|
5147
|
+
break;
|
|
5148
|
+
}
|
|
5149
|
+
message.time_mute = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
5150
|
+
continue;
|
|
5151
|
+
case 4:
|
|
5152
|
+
if (tag !== 32) {
|
|
5153
|
+
break;
|
|
5154
|
+
}
|
|
5155
|
+
message.active = reader.int32();
|
|
5156
|
+
continue;
|
|
5157
|
+
case 5:
|
|
5158
|
+
if (tag !== 42) {
|
|
5159
|
+
break;
|
|
5160
|
+
}
|
|
5161
|
+
message.channel_id = reader.string();
|
|
5162
|
+
continue;
|
|
5163
|
+
}
|
|
5164
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5165
|
+
break;
|
|
5166
|
+
}
|
|
5167
|
+
reader.skipType(tag & 7);
|
|
5168
|
+
}
|
|
5169
|
+
return message;
|
|
5170
|
+
},
|
|
5171
|
+
fromJSON(object) {
|
|
5172
|
+
return {
|
|
5173
|
+
id: isSet3(object.id) ? globalThis.String(object.id) : "",
|
|
5174
|
+
notification_setting_type: isSet3(object.notification_setting_type) ? globalThis.Number(object.notification_setting_type) : 0,
|
|
5175
|
+
time_mute: isSet3(object.time_mute) ? fromJsonTimestamp(object.time_mute) : void 0,
|
|
5176
|
+
active: isSet3(object.active) ? globalThis.Number(object.active) : 0,
|
|
5177
|
+
channel_id: isSet3(object.channel_id) ? globalThis.String(object.channel_id) : ""
|
|
5178
|
+
};
|
|
5179
|
+
},
|
|
5180
|
+
toJSON(message) {
|
|
5181
|
+
const obj = {};
|
|
5182
|
+
if (message.id !== "") {
|
|
5183
|
+
obj.id = message.id;
|
|
5184
|
+
}
|
|
5185
|
+
if (message.notification_setting_type !== 0) {
|
|
5186
|
+
obj.notification_setting_type = Math.round(message.notification_setting_type);
|
|
5187
|
+
}
|
|
5188
|
+
if (message.time_mute !== void 0) {
|
|
5189
|
+
obj.time_mute = message.time_mute.toISOString();
|
|
5190
|
+
}
|
|
5191
|
+
if (message.active !== 0) {
|
|
5192
|
+
obj.active = Math.round(message.active);
|
|
5193
|
+
}
|
|
5194
|
+
if (message.channel_id !== "") {
|
|
5195
|
+
obj.channel_id = message.channel_id;
|
|
5196
|
+
}
|
|
5197
|
+
return obj;
|
|
5198
|
+
},
|
|
5199
|
+
create(base) {
|
|
5200
|
+
return NotificationUserChannel.fromPartial(base != null ? base : {});
|
|
5201
|
+
},
|
|
5202
|
+
fromPartial(object) {
|
|
5203
|
+
var _a, _b, _c, _d, _e;
|
|
5204
|
+
const message = createBaseNotificationUserChannel();
|
|
5205
|
+
message.id = (_a = object.id) != null ? _a : "";
|
|
5206
|
+
message.notification_setting_type = (_b = object.notification_setting_type) != null ? _b : 0;
|
|
5207
|
+
message.time_mute = (_c = object.time_mute) != null ? _c : void 0;
|
|
5208
|
+
message.active = (_d = object.active) != null ? _d : 0;
|
|
5209
|
+
message.channel_id = (_e = object.channel_id) != null ? _e : "";
|
|
5210
|
+
return message;
|
|
5211
|
+
}
|
|
5212
|
+
};
|
|
5089
5213
|
function createBasePermissionList() {
|
|
5090
5214
|
return { permissions: [], max_level_permission: 0 };
|
|
5091
5215
|
}
|
|
@@ -6417,7 +6541,8 @@ function createBaseEnvelope() {
|
|
|
6417
6541
|
channel_app_event: void 0,
|
|
6418
6542
|
user_status_event: void 0,
|
|
6419
6543
|
remove_friend: void 0,
|
|
6420
|
-
webhook_event: void 0
|
|
6544
|
+
webhook_event: void 0,
|
|
6545
|
+
noti_user_channel: void 0
|
|
6421
6546
|
};
|
|
6422
6547
|
}
|
|
6423
6548
|
var Envelope = {
|
|
@@ -6635,6 +6760,9 @@ var Envelope = {
|
|
|
6635
6760
|
if (message.webhook_event !== void 0) {
|
|
6636
6761
|
Webhook.encode(message.webhook_event, writer.uint32(570).fork()).ldelim();
|
|
6637
6762
|
}
|
|
6763
|
+
if (message.noti_user_channel !== void 0) {
|
|
6764
|
+
NotificationUserChannel.encode(message.noti_user_channel, writer.uint32(578).fork()).ldelim();
|
|
6765
|
+
}
|
|
6638
6766
|
return writer;
|
|
6639
6767
|
},
|
|
6640
6768
|
decode(input, length) {
|
|
@@ -7070,6 +7198,12 @@ var Envelope = {
|
|
|
7070
7198
|
}
|
|
7071
7199
|
message.webhook_event = Webhook.decode(reader, reader.uint32());
|
|
7072
7200
|
continue;
|
|
7201
|
+
case 72:
|
|
7202
|
+
if (tag !== 578) {
|
|
7203
|
+
break;
|
|
7204
|
+
}
|
|
7205
|
+
message.noti_user_channel = NotificationUserChannel.decode(reader, reader.uint32());
|
|
7206
|
+
continue;
|
|
7073
7207
|
}
|
|
7074
7208
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7075
7209
|
break;
|
|
@@ -7150,7 +7284,8 @@ var Envelope = {
|
|
|
7150
7284
|
channel_app_event: isSet4(object.channel_app_event) ? ChannelAppEvent.fromJSON(object.channel_app_event) : void 0,
|
|
7151
7285
|
user_status_event: isSet4(object.user_status_event) ? UserStatusEvent.fromJSON(object.user_status_event) : void 0,
|
|
7152
7286
|
remove_friend: isSet4(object.remove_friend) ? RemoveFriend.fromJSON(object.remove_friend) : void 0,
|
|
7153
|
-
webhook_event: isSet4(object.webhook_event) ? Webhook.fromJSON(object.webhook_event) : void 0
|
|
7287
|
+
webhook_event: isSet4(object.webhook_event) ? Webhook.fromJSON(object.webhook_event) : void 0,
|
|
7288
|
+
noti_user_channel: isSet4(object.noti_user_channel) ? NotificationUserChannel.fromJSON(object.noti_user_channel) : void 0
|
|
7154
7289
|
};
|
|
7155
7290
|
},
|
|
7156
7291
|
toJSON(message) {
|
|
@@ -7368,6 +7503,9 @@ var Envelope = {
|
|
|
7368
7503
|
if (message.webhook_event !== void 0) {
|
|
7369
7504
|
obj.webhook_event = Webhook.toJSON(message.webhook_event);
|
|
7370
7505
|
}
|
|
7506
|
+
if (message.noti_user_channel !== void 0) {
|
|
7507
|
+
obj.noti_user_channel = NotificationUserChannel.toJSON(message.noti_user_channel);
|
|
7508
|
+
}
|
|
7371
7509
|
return obj;
|
|
7372
7510
|
},
|
|
7373
7511
|
create(base) {
|
|
@@ -7447,6 +7585,7 @@ var Envelope = {
|
|
|
7447
7585
|
message.user_status_event = object.user_status_event !== void 0 && object.user_status_event !== null ? UserStatusEvent.fromPartial(object.user_status_event) : void 0;
|
|
7448
7586
|
message.remove_friend = object.remove_friend !== void 0 && object.remove_friend !== null ? RemoveFriend.fromPartial(object.remove_friend) : void 0;
|
|
7449
7587
|
message.webhook_event = object.webhook_event !== void 0 && object.webhook_event !== null ? Webhook.fromPartial(object.webhook_event) : void 0;
|
|
7588
|
+
message.noti_user_channel = object.noti_user_channel !== void 0 && object.noti_user_channel !== null ? NotificationUserChannel.fromPartial(object.noti_user_channel) : void 0;
|
|
7450
7589
|
return message;
|
|
7451
7590
|
}
|
|
7452
7591
|
};
|
package/package.json
CHANGED