mezon-sdk 2.7.73 → 2.7.75
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/dist/cjs/api/api.d.ts +624 -42
- package/dist/cjs/api/api.js +208 -72
- package/dist/cjs/api/api.js.map +1 -1
- package/dist/cjs/client.js +2 -6
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/constants/enum.d.ts +19 -0
- package/dist/cjs/constants/enum.js +19 -0
- package/dist/cjs/constants/enum.js.map +1 -1
- package/dist/cjs/interfaces/socket.d.ts +31 -6
- package/dist/cjs/message-socket-events/user_channel_added.js +1 -1
- package/dist/cjs/message-socket-events/user_channel_added.js.map +1 -1
- package/dist/cjs/rtapi/realtime.d.ts +1697 -268
- package/dist/cjs/rtapi/realtime.js +296 -65
- package/dist/cjs/rtapi/realtime.js.map +1 -1
- package/dist/esm/api/api.d.ts +624 -42
- package/dist/esm/api/api.js +196 -61
- package/dist/esm/api/api.js.map +1 -1
- package/dist/esm/client.js +2 -6
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/constants/enum.d.ts +19 -0
- package/dist/esm/constants/enum.js +19 -0
- package/dist/esm/constants/enum.js.map +1 -1
- package/dist/esm/interfaces/socket.d.ts +31 -6
- package/dist/esm/message-socket-events/user_channel_added.js +1 -1
- package/dist/esm/message-socket-events/user_channel_added.js.map +1 -1
- package/dist/esm/rtapi/realtime.d.ts +1697 -268
- package/dist/esm/rtapi/realtime.js +283 -54
- package/dist/esm/rtapi/realtime.js.map +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// source: rtapi/realtime.proto
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
import _m0 from "protobufjs/minimal";
|
|
8
|
-
import { ChannelMessage, ChannelMessageHeader, CreateEventRequest, GiveCoffeeEvent, MessageAttachment, MessageMention, MessageReaction, MessageRef, Notification, PermissionUpdate, Role, Rpc, TokenSentEvent, UserActivity, } from "../api/api";
|
|
8
|
+
import { ChannelDescription as ChannelDescription1, ChannelMessage, ChannelMessageHeader, CreateEventRequest, GiveCoffeeEvent, MessageAttachment, MessageMention, MessageReaction, MessageRef, Notification, PermissionUpdate, Role, Rpc, TokenSentEvent, UserActivity, } from "../api/api";
|
|
9
9
|
import { Timestamp } from "../google/protobuf/timestamp";
|
|
10
10
|
import { BoolValue, Int32Value, StringValue } from "../google/protobuf/wrappers";
|
|
11
11
|
export const protobufPackage = "mezon.realtime";
|
|
@@ -157,6 +157,7 @@ function createBaseEnvelope() {
|
|
|
157
157
|
ptt_joined_event: undefined,
|
|
158
158
|
ptt_leaved_event: undefined,
|
|
159
159
|
sd_topic_event: undefined,
|
|
160
|
+
follow_event: undefined,
|
|
160
161
|
};
|
|
161
162
|
}
|
|
162
163
|
export const Envelope = {
|
|
@@ -371,6 +372,9 @@ export const Envelope = {
|
|
|
371
372
|
if (message.sd_topic_event !== undefined) {
|
|
372
373
|
SdTopicEvent.encode(message.sd_topic_event, writer.uint32(562).fork()).ldelim();
|
|
373
374
|
}
|
|
375
|
+
if (message.follow_event !== undefined) {
|
|
376
|
+
FollowEvent.encode(message.follow_event, writer.uint32(570).fork()).ldelim();
|
|
377
|
+
}
|
|
374
378
|
return writer;
|
|
375
379
|
},
|
|
376
380
|
decode(input, length) {
|
|
@@ -800,6 +804,12 @@ export const Envelope = {
|
|
|
800
804
|
}
|
|
801
805
|
message.sd_topic_event = SdTopicEvent.decode(reader, reader.uint32());
|
|
802
806
|
continue;
|
|
807
|
+
case 71:
|
|
808
|
+
if (tag !== 570) {
|
|
809
|
+
break;
|
|
810
|
+
}
|
|
811
|
+
message.follow_event = FollowEvent.decode(reader, reader.uint32());
|
|
812
|
+
continue;
|
|
803
813
|
}
|
|
804
814
|
if ((tag & 7) === 4 || tag === 0) {
|
|
805
815
|
break;
|
|
@@ -968,6 +978,7 @@ export const Envelope = {
|
|
|
968
978
|
ptt_joined_event: isSet(object.ptt_joined_event) ? PTTJoinedEvent.fromJSON(object.ptt_joined_event) : undefined,
|
|
969
979
|
ptt_leaved_event: isSet(object.ptt_leaved_event) ? PTTLeavedEvent.fromJSON(object.ptt_leaved_event) : undefined,
|
|
970
980
|
sd_topic_event: isSet(object.sd_topic_event) ? SdTopicEvent.fromJSON(object.sd_topic_event) : undefined,
|
|
981
|
+
follow_event: isSet(object.follow_event) ? FollowEvent.fromJSON(object.follow_event) : undefined,
|
|
971
982
|
};
|
|
972
983
|
},
|
|
973
984
|
toJSON(message) {
|
|
@@ -1182,6 +1193,9 @@ export const Envelope = {
|
|
|
1182
1193
|
if (message.sd_topic_event !== undefined) {
|
|
1183
1194
|
obj.sd_topic_event = SdTopicEvent.toJSON(message.sd_topic_event);
|
|
1184
1195
|
}
|
|
1196
|
+
if (message.follow_event !== undefined) {
|
|
1197
|
+
obj.follow_event = FollowEvent.toJSON(message.follow_event);
|
|
1198
|
+
}
|
|
1185
1199
|
return obj;
|
|
1186
1200
|
},
|
|
1187
1201
|
create(base) {
|
|
@@ -1413,6 +1427,46 @@ export const Envelope = {
|
|
|
1413
1427
|
message.sd_topic_event = (object.sd_topic_event !== undefined && object.sd_topic_event !== null)
|
|
1414
1428
|
? SdTopicEvent.fromPartial(object.sd_topic_event)
|
|
1415
1429
|
: undefined;
|
|
1430
|
+
message.follow_event = (object.follow_event !== undefined && object.follow_event !== null)
|
|
1431
|
+
? FollowEvent.fromPartial(object.follow_event)
|
|
1432
|
+
: undefined;
|
|
1433
|
+
return message;
|
|
1434
|
+
},
|
|
1435
|
+
};
|
|
1436
|
+
function createBaseFollowEvent() {
|
|
1437
|
+
return {};
|
|
1438
|
+
}
|
|
1439
|
+
export const FollowEvent = {
|
|
1440
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
1441
|
+
return writer;
|
|
1442
|
+
},
|
|
1443
|
+
decode(input, length) {
|
|
1444
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1445
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1446
|
+
const message = createBaseFollowEvent();
|
|
1447
|
+
while (reader.pos < end) {
|
|
1448
|
+
const tag = reader.uint32();
|
|
1449
|
+
switch (tag >>> 3) {
|
|
1450
|
+
}
|
|
1451
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1452
|
+
break;
|
|
1453
|
+
}
|
|
1454
|
+
reader.skipType(tag & 7);
|
|
1455
|
+
}
|
|
1456
|
+
return message;
|
|
1457
|
+
},
|
|
1458
|
+
fromJSON(_) {
|
|
1459
|
+
return {};
|
|
1460
|
+
},
|
|
1461
|
+
toJSON(_) {
|
|
1462
|
+
const obj = {};
|
|
1463
|
+
return obj;
|
|
1464
|
+
},
|
|
1465
|
+
create(base) {
|
|
1466
|
+
return FollowEvent.fromPartial(base ?? {});
|
|
1467
|
+
},
|
|
1468
|
+
fromPartial(_) {
|
|
1469
|
+
const message = createBaseFollowEvent();
|
|
1416
1470
|
return message;
|
|
1417
1471
|
},
|
|
1418
1472
|
};
|
|
@@ -3126,6 +3180,7 @@ function createBaseChannelMessageUpdate() {
|
|
|
3126
3180
|
mode: 0,
|
|
3127
3181
|
is_public: false,
|
|
3128
3182
|
hide_editted: false,
|
|
3183
|
+
topic_id: "",
|
|
3129
3184
|
};
|
|
3130
3185
|
}
|
|
3131
3186
|
export const ChannelMessageUpdate = {
|
|
@@ -3157,6 +3212,9 @@ export const ChannelMessageUpdate = {
|
|
|
3157
3212
|
if (message.hide_editted !== false) {
|
|
3158
3213
|
writer.uint32(72).bool(message.hide_editted);
|
|
3159
3214
|
}
|
|
3215
|
+
if (message.topic_id !== "") {
|
|
3216
|
+
writer.uint32(82).string(message.topic_id);
|
|
3217
|
+
}
|
|
3160
3218
|
return writer;
|
|
3161
3219
|
},
|
|
3162
3220
|
decode(input, length) {
|
|
@@ -3220,6 +3278,12 @@ export const ChannelMessageUpdate = {
|
|
|
3220
3278
|
}
|
|
3221
3279
|
message.hide_editted = reader.bool();
|
|
3222
3280
|
continue;
|
|
3281
|
+
case 10:
|
|
3282
|
+
if (tag !== 82) {
|
|
3283
|
+
break;
|
|
3284
|
+
}
|
|
3285
|
+
message.topic_id = reader.string();
|
|
3286
|
+
continue;
|
|
3223
3287
|
}
|
|
3224
3288
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3225
3289
|
break;
|
|
@@ -3243,6 +3307,7 @@ export const ChannelMessageUpdate = {
|
|
|
3243
3307
|
mode: isSet(object.mode) ? globalThis.Number(object.mode) : 0,
|
|
3244
3308
|
is_public: isSet(object.is_public) ? globalThis.Boolean(object.is_public) : false,
|
|
3245
3309
|
hide_editted: isSet(object.hide_editted) ? globalThis.Boolean(object.hide_editted) : false,
|
|
3310
|
+
topic_id: isSet(object.topic_id) ? globalThis.String(object.topic_id) : "",
|
|
3246
3311
|
};
|
|
3247
3312
|
},
|
|
3248
3313
|
toJSON(message) {
|
|
@@ -3274,6 +3339,9 @@ export const ChannelMessageUpdate = {
|
|
|
3274
3339
|
if (message.hide_editted !== false) {
|
|
3275
3340
|
obj.hide_editted = message.hide_editted;
|
|
3276
3341
|
}
|
|
3342
|
+
if (message.topic_id !== "") {
|
|
3343
|
+
obj.topic_id = message.topic_id;
|
|
3344
|
+
}
|
|
3277
3345
|
return obj;
|
|
3278
3346
|
},
|
|
3279
3347
|
create(base) {
|
|
@@ -3290,11 +3358,12 @@ export const ChannelMessageUpdate = {
|
|
|
3290
3358
|
message.mode = object.mode ?? 0;
|
|
3291
3359
|
message.is_public = object.is_public ?? false;
|
|
3292
3360
|
message.hide_editted = object.hide_editted ?? false;
|
|
3361
|
+
message.topic_id = object.topic_id ?? "";
|
|
3293
3362
|
return message;
|
|
3294
3363
|
},
|
|
3295
3364
|
};
|
|
3296
3365
|
function createBaseChannelMessageRemove() {
|
|
3297
|
-
return { clan_id: "", channel_id: "", message_id: "", mode: 0, is_public: false };
|
|
3366
|
+
return { clan_id: "", channel_id: "", message_id: "", mode: 0, is_public: false, has_attachment: false };
|
|
3298
3367
|
}
|
|
3299
3368
|
export const ChannelMessageRemove = {
|
|
3300
3369
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -3313,6 +3382,9 @@ export const ChannelMessageRemove = {
|
|
|
3313
3382
|
if (message.is_public !== false) {
|
|
3314
3383
|
writer.uint32(40).bool(message.is_public);
|
|
3315
3384
|
}
|
|
3385
|
+
if (message.has_attachment !== false) {
|
|
3386
|
+
writer.uint32(48).bool(message.has_attachment);
|
|
3387
|
+
}
|
|
3316
3388
|
return writer;
|
|
3317
3389
|
},
|
|
3318
3390
|
decode(input, length) {
|
|
@@ -3352,6 +3424,12 @@ export const ChannelMessageRemove = {
|
|
|
3352
3424
|
}
|
|
3353
3425
|
message.is_public = reader.bool();
|
|
3354
3426
|
continue;
|
|
3427
|
+
case 6:
|
|
3428
|
+
if (tag !== 48) {
|
|
3429
|
+
break;
|
|
3430
|
+
}
|
|
3431
|
+
message.has_attachment = reader.bool();
|
|
3432
|
+
continue;
|
|
3355
3433
|
}
|
|
3356
3434
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3357
3435
|
break;
|
|
@@ -3367,6 +3445,7 @@ export const ChannelMessageRemove = {
|
|
|
3367
3445
|
message_id: isSet(object.message_id) ? globalThis.String(object.message_id) : "",
|
|
3368
3446
|
mode: isSet(object.mode) ? globalThis.Number(object.mode) : 0,
|
|
3369
3447
|
is_public: isSet(object.is_public) ? globalThis.Boolean(object.is_public) : false,
|
|
3448
|
+
has_attachment: isSet(object.has_attachment) ? globalThis.Boolean(object.has_attachment) : false,
|
|
3370
3449
|
};
|
|
3371
3450
|
},
|
|
3372
3451
|
toJSON(message) {
|
|
@@ -3386,6 +3465,9 @@ export const ChannelMessageRemove = {
|
|
|
3386
3465
|
if (message.is_public !== false) {
|
|
3387
3466
|
obj.is_public = message.is_public;
|
|
3388
3467
|
}
|
|
3468
|
+
if (message.has_attachment !== false) {
|
|
3469
|
+
obj.has_attachment = message.has_attachment;
|
|
3470
|
+
}
|
|
3389
3471
|
return obj;
|
|
3390
3472
|
},
|
|
3391
3473
|
create(base) {
|
|
@@ -3398,6 +3480,7 @@ export const ChannelMessageRemove = {
|
|
|
3398
3480
|
message.message_id = object.message_id ?? "";
|
|
3399
3481
|
message.mode = object.mode ?? 0;
|
|
3400
3482
|
message.is_public = object.is_public ?? false;
|
|
3483
|
+
message.has_attachment = object.has_attachment ?? false;
|
|
3401
3484
|
return message;
|
|
3402
3485
|
},
|
|
3403
3486
|
};
|
|
@@ -5382,7 +5465,15 @@ export const ChannelCreatedEvent = {
|
|
|
5382
5465
|
},
|
|
5383
5466
|
};
|
|
5384
5467
|
function createBaseRoleEvent() {
|
|
5385
|
-
return {
|
|
5468
|
+
return {
|
|
5469
|
+
role: undefined,
|
|
5470
|
+
status: 0,
|
|
5471
|
+
user_id: "",
|
|
5472
|
+
user_add_ids: [],
|
|
5473
|
+
user_remove_ids: [],
|
|
5474
|
+
active_permission_ids: [],
|
|
5475
|
+
remove_permission_ids: [],
|
|
5476
|
+
};
|
|
5386
5477
|
}
|
|
5387
5478
|
export const RoleEvent = {
|
|
5388
5479
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -5395,6 +5486,18 @@ export const RoleEvent = {
|
|
|
5395
5486
|
if (message.user_id !== "") {
|
|
5396
5487
|
writer.uint32(26).string(message.user_id);
|
|
5397
5488
|
}
|
|
5489
|
+
for (const v of message.user_add_ids) {
|
|
5490
|
+
writer.uint32(34).string(v);
|
|
5491
|
+
}
|
|
5492
|
+
for (const v of message.user_remove_ids) {
|
|
5493
|
+
writer.uint32(42).string(v);
|
|
5494
|
+
}
|
|
5495
|
+
for (const v of message.active_permission_ids) {
|
|
5496
|
+
writer.uint32(50).string(v);
|
|
5497
|
+
}
|
|
5498
|
+
for (const v of message.remove_permission_ids) {
|
|
5499
|
+
writer.uint32(58).string(v);
|
|
5500
|
+
}
|
|
5398
5501
|
return writer;
|
|
5399
5502
|
},
|
|
5400
5503
|
decode(input, length) {
|
|
@@ -5422,6 +5525,30 @@ export const RoleEvent = {
|
|
|
5422
5525
|
}
|
|
5423
5526
|
message.user_id = reader.string();
|
|
5424
5527
|
continue;
|
|
5528
|
+
case 4:
|
|
5529
|
+
if (tag !== 34) {
|
|
5530
|
+
break;
|
|
5531
|
+
}
|
|
5532
|
+
message.user_add_ids.push(reader.string());
|
|
5533
|
+
continue;
|
|
5534
|
+
case 5:
|
|
5535
|
+
if (tag !== 42) {
|
|
5536
|
+
break;
|
|
5537
|
+
}
|
|
5538
|
+
message.user_remove_ids.push(reader.string());
|
|
5539
|
+
continue;
|
|
5540
|
+
case 6:
|
|
5541
|
+
if (tag !== 50) {
|
|
5542
|
+
break;
|
|
5543
|
+
}
|
|
5544
|
+
message.active_permission_ids.push(reader.string());
|
|
5545
|
+
continue;
|
|
5546
|
+
case 7:
|
|
5547
|
+
if (tag !== 58) {
|
|
5548
|
+
break;
|
|
5549
|
+
}
|
|
5550
|
+
message.remove_permission_ids.push(reader.string());
|
|
5551
|
+
continue;
|
|
5425
5552
|
}
|
|
5426
5553
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5427
5554
|
break;
|
|
@@ -5435,6 +5562,18 @@ export const RoleEvent = {
|
|
|
5435
5562
|
role: isSet(object.role) ? Role.fromJSON(object.role) : undefined,
|
|
5436
5563
|
status: isSet(object.status) ? globalThis.Number(object.status) : 0,
|
|
5437
5564
|
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
5565
|
+
user_add_ids: globalThis.Array.isArray(object?.user_add_ids)
|
|
5566
|
+
? object.user_add_ids.map((e) => globalThis.String(e))
|
|
5567
|
+
: [],
|
|
5568
|
+
user_remove_ids: globalThis.Array.isArray(object?.user_remove_ids)
|
|
5569
|
+
? object.user_remove_ids.map((e) => globalThis.String(e))
|
|
5570
|
+
: [],
|
|
5571
|
+
active_permission_ids: globalThis.Array.isArray(object?.active_permission_ids)
|
|
5572
|
+
? object.active_permission_ids.map((e) => globalThis.String(e))
|
|
5573
|
+
: [],
|
|
5574
|
+
remove_permission_ids: globalThis.Array.isArray(object?.remove_permission_ids)
|
|
5575
|
+
? object.remove_permission_ids.map((e) => globalThis.String(e))
|
|
5576
|
+
: [],
|
|
5438
5577
|
};
|
|
5439
5578
|
},
|
|
5440
5579
|
toJSON(message) {
|
|
@@ -5448,6 +5587,18 @@ export const RoleEvent = {
|
|
|
5448
5587
|
if (message.user_id !== "") {
|
|
5449
5588
|
obj.user_id = message.user_id;
|
|
5450
5589
|
}
|
|
5590
|
+
if (message.user_add_ids?.length) {
|
|
5591
|
+
obj.user_add_ids = message.user_add_ids;
|
|
5592
|
+
}
|
|
5593
|
+
if (message.user_remove_ids?.length) {
|
|
5594
|
+
obj.user_remove_ids = message.user_remove_ids;
|
|
5595
|
+
}
|
|
5596
|
+
if (message.active_permission_ids?.length) {
|
|
5597
|
+
obj.active_permission_ids = message.active_permission_ids;
|
|
5598
|
+
}
|
|
5599
|
+
if (message.remove_permission_ids?.length) {
|
|
5600
|
+
obj.remove_permission_ids = message.remove_permission_ids;
|
|
5601
|
+
}
|
|
5451
5602
|
return obj;
|
|
5452
5603
|
},
|
|
5453
5604
|
create(base) {
|
|
@@ -5458,6 +5609,10 @@ export const RoleEvent = {
|
|
|
5458
5609
|
message.role = (object.role !== undefined && object.role !== null) ? Role.fromPartial(object.role) : undefined;
|
|
5459
5610
|
message.status = object.status ?? 0;
|
|
5460
5611
|
message.user_id = object.user_id ?? "";
|
|
5612
|
+
message.user_add_ids = object.user_add_ids?.map((e) => e) || [];
|
|
5613
|
+
message.user_remove_ids = object.user_remove_ids?.map((e) => e) || [];
|
|
5614
|
+
message.active_permission_ids = object.active_permission_ids?.map((e) => e) || [];
|
|
5615
|
+
message.remove_permission_ids = object.remove_permission_ids?.map((e) => e) || [];
|
|
5461
5616
|
return message;
|
|
5462
5617
|
},
|
|
5463
5618
|
};
|
|
@@ -6819,12 +6974,20 @@ export const CustomStatusEvent = {
|
|
|
6819
6974
|
},
|
|
6820
6975
|
};
|
|
6821
6976
|
function createBaseUserChannelAdded() {
|
|
6822
|
-
return {
|
|
6977
|
+
return {
|
|
6978
|
+
channel_desc: undefined,
|
|
6979
|
+
users: [],
|
|
6980
|
+
status: "",
|
|
6981
|
+
clan_id: "",
|
|
6982
|
+
caller: undefined,
|
|
6983
|
+
create_time_second: 0,
|
|
6984
|
+
active: 0,
|
|
6985
|
+
};
|
|
6823
6986
|
}
|
|
6824
6987
|
export const UserChannelAdded = {
|
|
6825
6988
|
encode(message, writer = _m0.Writer.create()) {
|
|
6826
|
-
if (message.
|
|
6827
|
-
writer.uint32(10).
|
|
6989
|
+
if (message.channel_desc !== undefined) {
|
|
6990
|
+
ChannelDescription1.encode(message.channel_desc, writer.uint32(10).fork()).ldelim();
|
|
6828
6991
|
}
|
|
6829
6992
|
for (const v of message.users) {
|
|
6830
6993
|
UserProfileRedis.encode(v, writer.uint32(18).fork()).ldelim();
|
|
@@ -6835,14 +6998,14 @@ export const UserChannelAdded = {
|
|
|
6835
6998
|
if (message.clan_id !== "") {
|
|
6836
6999
|
writer.uint32(34).string(message.clan_id);
|
|
6837
7000
|
}
|
|
6838
|
-
if (message.
|
|
6839
|
-
writer.uint32(
|
|
7001
|
+
if (message.caller !== undefined) {
|
|
7002
|
+
UserProfileRedis.encode(message.caller, writer.uint32(42).fork()).ldelim();
|
|
6840
7003
|
}
|
|
6841
|
-
if (message.
|
|
6842
|
-
writer.uint32(48).
|
|
7004
|
+
if (message.create_time_second !== 0) {
|
|
7005
|
+
writer.uint32(48).uint32(message.create_time_second);
|
|
6843
7006
|
}
|
|
6844
|
-
if (message.
|
|
6845
|
-
writer.uint32(
|
|
7007
|
+
if (message.active !== 0) {
|
|
7008
|
+
writer.uint32(56).int32(message.active);
|
|
6846
7009
|
}
|
|
6847
7010
|
return writer;
|
|
6848
7011
|
},
|
|
@@ -6857,7 +7020,7 @@ export const UserChannelAdded = {
|
|
|
6857
7020
|
if (tag !== 10) {
|
|
6858
7021
|
break;
|
|
6859
7022
|
}
|
|
6860
|
-
message.
|
|
7023
|
+
message.channel_desc = ChannelDescription1.decode(reader, reader.uint32());
|
|
6861
7024
|
continue;
|
|
6862
7025
|
case 2:
|
|
6863
7026
|
if (tag !== 18) {
|
|
@@ -6878,22 +7041,22 @@ export const UserChannelAdded = {
|
|
|
6878
7041
|
message.clan_id = reader.string();
|
|
6879
7042
|
continue;
|
|
6880
7043
|
case 5:
|
|
6881
|
-
if (tag !==
|
|
7044
|
+
if (tag !== 42) {
|
|
6882
7045
|
break;
|
|
6883
7046
|
}
|
|
6884
|
-
message.
|
|
7047
|
+
message.caller = UserProfileRedis.decode(reader, reader.uint32());
|
|
6885
7048
|
continue;
|
|
6886
7049
|
case 6:
|
|
6887
7050
|
if (tag !== 48) {
|
|
6888
7051
|
break;
|
|
6889
7052
|
}
|
|
6890
|
-
message.
|
|
7053
|
+
message.create_time_second = reader.uint32();
|
|
6891
7054
|
continue;
|
|
6892
7055
|
case 7:
|
|
6893
|
-
if (tag !==
|
|
7056
|
+
if (tag !== 56) {
|
|
6894
7057
|
break;
|
|
6895
7058
|
}
|
|
6896
|
-
message.
|
|
7059
|
+
message.active = reader.int32();
|
|
6897
7060
|
continue;
|
|
6898
7061
|
}
|
|
6899
7062
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -6905,19 +7068,19 @@ export const UserChannelAdded = {
|
|
|
6905
7068
|
},
|
|
6906
7069
|
fromJSON(object) {
|
|
6907
7070
|
return {
|
|
6908
|
-
|
|
7071
|
+
channel_desc: isSet(object.channel_desc) ? ChannelDescription1.fromJSON(object.channel_desc) : undefined,
|
|
6909
7072
|
users: globalThis.Array.isArray(object?.users) ? object.users.map((e) => UserProfileRedis.fromJSON(e)) : [],
|
|
6910
7073
|
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
6911
7074
|
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
7075
|
+
caller: isSet(object.caller) ? UserProfileRedis.fromJSON(object.caller) : undefined,
|
|
7076
|
+
create_time_second: isSet(object.create_time_second) ? globalThis.Number(object.create_time_second) : 0,
|
|
7077
|
+
active: isSet(object.active) ? globalThis.Number(object.active) : 0,
|
|
6915
7078
|
};
|
|
6916
7079
|
},
|
|
6917
7080
|
toJSON(message) {
|
|
6918
7081
|
const obj = {};
|
|
6919
|
-
if (message.
|
|
6920
|
-
obj.
|
|
7082
|
+
if (message.channel_desc !== undefined) {
|
|
7083
|
+
obj.channel_desc = ChannelDescription1.toJSON(message.channel_desc);
|
|
6921
7084
|
}
|
|
6922
7085
|
if (message.users?.length) {
|
|
6923
7086
|
obj.users = message.users.map((e) => UserProfileRedis.toJSON(e));
|
|
@@ -6928,14 +7091,14 @@ export const UserChannelAdded = {
|
|
|
6928
7091
|
if (message.clan_id !== "") {
|
|
6929
7092
|
obj.clan_id = message.clan_id;
|
|
6930
7093
|
}
|
|
6931
|
-
if (message.
|
|
6932
|
-
obj.
|
|
7094
|
+
if (message.caller !== undefined) {
|
|
7095
|
+
obj.caller = UserProfileRedis.toJSON(message.caller);
|
|
6933
7096
|
}
|
|
6934
|
-
if (message.
|
|
6935
|
-
obj.
|
|
7097
|
+
if (message.create_time_second !== 0) {
|
|
7098
|
+
obj.create_time_second = Math.round(message.create_time_second);
|
|
6936
7099
|
}
|
|
6937
|
-
if (message.
|
|
6938
|
-
obj.
|
|
7100
|
+
if (message.active !== 0) {
|
|
7101
|
+
obj.active = Math.round(message.active);
|
|
6939
7102
|
}
|
|
6940
7103
|
return obj;
|
|
6941
7104
|
},
|
|
@@ -6944,13 +7107,17 @@ export const UserChannelAdded = {
|
|
|
6944
7107
|
},
|
|
6945
7108
|
fromPartial(object) {
|
|
6946
7109
|
const message = createBaseUserChannelAdded();
|
|
6947
|
-
message.
|
|
7110
|
+
message.channel_desc = (object.channel_desc !== undefined && object.channel_desc !== null)
|
|
7111
|
+
? ChannelDescription1.fromPartial(object.channel_desc)
|
|
7112
|
+
: undefined;
|
|
6948
7113
|
message.users = object.users?.map((e) => UserProfileRedis.fromPartial(e)) || [];
|
|
6949
7114
|
message.status = object.status ?? "";
|
|
6950
7115
|
message.clan_id = object.clan_id ?? "";
|
|
6951
|
-
message.
|
|
6952
|
-
|
|
6953
|
-
|
|
7116
|
+
message.caller = (object.caller !== undefined && object.caller !== null)
|
|
7117
|
+
? UserProfileRedis.fromPartial(object.caller)
|
|
7118
|
+
: undefined;
|
|
7119
|
+
message.create_time_second = object.create_time_second ?? 0;
|
|
7120
|
+
message.active = object.active ?? 0;
|
|
6954
7121
|
return message;
|
|
6955
7122
|
},
|
|
6956
7123
|
};
|
|
@@ -8175,7 +8342,7 @@ export const PermissionSetEvent = {
|
|
|
8175
8342
|
},
|
|
8176
8343
|
};
|
|
8177
8344
|
function createBasePermissionChangedEvent() {
|
|
8178
|
-
return { user_id: "", channel_id: "" };
|
|
8345
|
+
return { user_id: "", channel_id: "", add_permissions: [], remove_permissions: [], default_permissions: [] };
|
|
8179
8346
|
}
|
|
8180
8347
|
export const PermissionChangedEvent = {
|
|
8181
8348
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -8185,6 +8352,15 @@ export const PermissionChangedEvent = {
|
|
|
8185
8352
|
if (message.channel_id !== "") {
|
|
8186
8353
|
writer.uint32(18).string(message.channel_id);
|
|
8187
8354
|
}
|
|
8355
|
+
for (const v of message.add_permissions) {
|
|
8356
|
+
PermissionUpdate.encode(v, writer.uint32(26).fork()).ldelim();
|
|
8357
|
+
}
|
|
8358
|
+
for (const v of message.remove_permissions) {
|
|
8359
|
+
PermissionUpdate.encode(v, writer.uint32(34).fork()).ldelim();
|
|
8360
|
+
}
|
|
8361
|
+
for (const v of message.default_permissions) {
|
|
8362
|
+
PermissionUpdate.encode(v, writer.uint32(42).fork()).ldelim();
|
|
8363
|
+
}
|
|
8188
8364
|
return writer;
|
|
8189
8365
|
},
|
|
8190
8366
|
decode(input, length) {
|
|
@@ -8206,6 +8382,24 @@ export const PermissionChangedEvent = {
|
|
|
8206
8382
|
}
|
|
8207
8383
|
message.channel_id = reader.string();
|
|
8208
8384
|
continue;
|
|
8385
|
+
case 3:
|
|
8386
|
+
if (tag !== 26) {
|
|
8387
|
+
break;
|
|
8388
|
+
}
|
|
8389
|
+
message.add_permissions.push(PermissionUpdate.decode(reader, reader.uint32()));
|
|
8390
|
+
continue;
|
|
8391
|
+
case 4:
|
|
8392
|
+
if (tag !== 34) {
|
|
8393
|
+
break;
|
|
8394
|
+
}
|
|
8395
|
+
message.remove_permissions.push(PermissionUpdate.decode(reader, reader.uint32()));
|
|
8396
|
+
continue;
|
|
8397
|
+
case 5:
|
|
8398
|
+
if (tag !== 42) {
|
|
8399
|
+
break;
|
|
8400
|
+
}
|
|
8401
|
+
message.default_permissions.push(PermissionUpdate.decode(reader, reader.uint32()));
|
|
8402
|
+
continue;
|
|
8209
8403
|
}
|
|
8210
8404
|
if ((tag & 7) === 4 || tag === 0) {
|
|
8211
8405
|
break;
|
|
@@ -8218,6 +8412,15 @@ export const PermissionChangedEvent = {
|
|
|
8218
8412
|
return {
|
|
8219
8413
|
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
8220
8414
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
8415
|
+
add_permissions: globalThis.Array.isArray(object?.add_permissions)
|
|
8416
|
+
? object.add_permissions.map((e) => PermissionUpdate.fromJSON(e))
|
|
8417
|
+
: [],
|
|
8418
|
+
remove_permissions: globalThis.Array.isArray(object?.remove_permissions)
|
|
8419
|
+
? object.remove_permissions.map((e) => PermissionUpdate.fromJSON(e))
|
|
8420
|
+
: [],
|
|
8421
|
+
default_permissions: globalThis.Array.isArray(object?.default_permissions)
|
|
8422
|
+
? object.default_permissions.map((e) => PermissionUpdate.fromJSON(e))
|
|
8423
|
+
: [],
|
|
8221
8424
|
};
|
|
8222
8425
|
},
|
|
8223
8426
|
toJSON(message) {
|
|
@@ -8228,6 +8431,15 @@ export const PermissionChangedEvent = {
|
|
|
8228
8431
|
if (message.channel_id !== "") {
|
|
8229
8432
|
obj.channel_id = message.channel_id;
|
|
8230
8433
|
}
|
|
8434
|
+
if (message.add_permissions?.length) {
|
|
8435
|
+
obj.add_permissions = message.add_permissions.map((e) => PermissionUpdate.toJSON(e));
|
|
8436
|
+
}
|
|
8437
|
+
if (message.remove_permissions?.length) {
|
|
8438
|
+
obj.remove_permissions = message.remove_permissions.map((e) => PermissionUpdate.toJSON(e));
|
|
8439
|
+
}
|
|
8440
|
+
if (message.default_permissions?.length) {
|
|
8441
|
+
obj.default_permissions = message.default_permissions.map((e) => PermissionUpdate.toJSON(e));
|
|
8442
|
+
}
|
|
8231
8443
|
return obj;
|
|
8232
8444
|
},
|
|
8233
8445
|
create(base) {
|
|
@@ -8237,6 +8449,9 @@ export const PermissionChangedEvent = {
|
|
|
8237
8449
|
const message = createBasePermissionChangedEvent();
|
|
8238
8450
|
message.user_id = object.user_id ?? "";
|
|
8239
8451
|
message.channel_id = object.channel_id ?? "";
|
|
8452
|
+
message.add_permissions = object.add_permissions?.map((e) => PermissionUpdate.fromPartial(e)) || [];
|
|
8453
|
+
message.remove_permissions = object.remove_permissions?.map((e) => PermissionUpdate.fromPartial(e)) || [];
|
|
8454
|
+
message.default_permissions = object.default_permissions?.map((e) => PermissionUpdate.fromPartial(e)) || [];
|
|
8240
8455
|
return message;
|
|
8241
8456
|
},
|
|
8242
8457
|
};
|
|
@@ -8443,7 +8658,7 @@ export const UnmuteEvent = {
|
|
|
8443
8658
|
},
|
|
8444
8659
|
};
|
|
8445
8660
|
function createBaseJoinPTTChannel() {
|
|
8446
|
-
return { channel_id: "", data_type: 0, json_data: "",
|
|
8661
|
+
return { channel_id: "", data_type: 0, json_data: "", user_id: "", clan_id: "" };
|
|
8447
8662
|
}
|
|
8448
8663
|
export const JoinPTTChannel = {
|
|
8449
8664
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -8456,8 +8671,8 @@ export const JoinPTTChannel = {
|
|
|
8456
8671
|
if (message.json_data !== "") {
|
|
8457
8672
|
writer.uint32(26).string(message.json_data);
|
|
8458
8673
|
}
|
|
8459
|
-
if (message.
|
|
8460
|
-
writer.uint32(34).string(message.
|
|
8674
|
+
if (message.user_id !== "") {
|
|
8675
|
+
writer.uint32(34).string(message.user_id);
|
|
8461
8676
|
}
|
|
8462
8677
|
if (message.clan_id !== "") {
|
|
8463
8678
|
writer.uint32(42).string(message.clan_id);
|
|
@@ -8493,7 +8708,7 @@ export const JoinPTTChannel = {
|
|
|
8493
8708
|
if (tag !== 34) {
|
|
8494
8709
|
break;
|
|
8495
8710
|
}
|
|
8496
|
-
message.
|
|
8711
|
+
message.user_id = reader.string();
|
|
8497
8712
|
continue;
|
|
8498
8713
|
case 5:
|
|
8499
8714
|
if (tag !== 42) {
|
|
@@ -8514,7 +8729,7 @@ export const JoinPTTChannel = {
|
|
|
8514
8729
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
8515
8730
|
data_type: isSet(object.data_type) ? globalThis.Number(object.data_type) : 0,
|
|
8516
8731
|
json_data: isSet(object.json_data) ? globalThis.String(object.json_data) : "",
|
|
8517
|
-
|
|
8732
|
+
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
8518
8733
|
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
8519
8734
|
};
|
|
8520
8735
|
},
|
|
@@ -8529,8 +8744,8 @@ export const JoinPTTChannel = {
|
|
|
8529
8744
|
if (message.json_data !== "") {
|
|
8530
8745
|
obj.json_data = message.json_data;
|
|
8531
8746
|
}
|
|
8532
|
-
if (message.
|
|
8533
|
-
obj.
|
|
8747
|
+
if (message.user_id !== "") {
|
|
8748
|
+
obj.user_id = message.user_id;
|
|
8534
8749
|
}
|
|
8535
8750
|
if (message.clan_id !== "") {
|
|
8536
8751
|
obj.clan_id = message.clan_id;
|
|
@@ -8545,24 +8760,27 @@ export const JoinPTTChannel = {
|
|
|
8545
8760
|
message.channel_id = object.channel_id ?? "";
|
|
8546
8761
|
message.data_type = object.data_type ?? 0;
|
|
8547
8762
|
message.json_data = object.json_data ?? "";
|
|
8548
|
-
message.
|
|
8763
|
+
message.user_id = object.user_id ?? "";
|
|
8549
8764
|
message.clan_id = object.clan_id ?? "";
|
|
8550
8765
|
return message;
|
|
8551
8766
|
},
|
|
8552
8767
|
};
|
|
8553
8768
|
function createBaseTalkPTTChannel() {
|
|
8554
|
-
return { user_id: "", channel_id: "",
|
|
8769
|
+
return { user_id: "", clan_id: "", channel_id: "", is_talk: false };
|
|
8555
8770
|
}
|
|
8556
8771
|
export const TalkPTTChannel = {
|
|
8557
8772
|
encode(message, writer = _m0.Writer.create()) {
|
|
8558
8773
|
if (message.user_id !== "") {
|
|
8559
8774
|
writer.uint32(10).string(message.user_id);
|
|
8560
8775
|
}
|
|
8776
|
+
if (message.clan_id !== "") {
|
|
8777
|
+
writer.uint32(18).string(message.clan_id);
|
|
8778
|
+
}
|
|
8561
8779
|
if (message.channel_id !== "") {
|
|
8562
|
-
writer.uint32(
|
|
8780
|
+
writer.uint32(26).string(message.channel_id);
|
|
8563
8781
|
}
|
|
8564
|
-
if (message.
|
|
8565
|
-
writer.uint32(
|
|
8782
|
+
if (message.is_talk !== false) {
|
|
8783
|
+
writer.uint32(32).bool(message.is_talk);
|
|
8566
8784
|
}
|
|
8567
8785
|
return writer;
|
|
8568
8786
|
},
|
|
@@ -8583,13 +8801,19 @@ export const TalkPTTChannel = {
|
|
|
8583
8801
|
if (tag !== 18) {
|
|
8584
8802
|
break;
|
|
8585
8803
|
}
|
|
8586
|
-
message.
|
|
8804
|
+
message.clan_id = reader.string();
|
|
8587
8805
|
continue;
|
|
8588
8806
|
case 3:
|
|
8589
|
-
if (tag !==
|
|
8807
|
+
if (tag !== 26) {
|
|
8590
8808
|
break;
|
|
8591
8809
|
}
|
|
8592
|
-
message.
|
|
8810
|
+
message.channel_id = reader.string();
|
|
8811
|
+
continue;
|
|
8812
|
+
case 4:
|
|
8813
|
+
if (tag !== 32) {
|
|
8814
|
+
break;
|
|
8815
|
+
}
|
|
8816
|
+
message.is_talk = reader.bool();
|
|
8593
8817
|
continue;
|
|
8594
8818
|
}
|
|
8595
8819
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -8602,8 +8826,9 @@ export const TalkPTTChannel = {
|
|
|
8602
8826
|
fromJSON(object) {
|
|
8603
8827
|
return {
|
|
8604
8828
|
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
8829
|
+
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
8605
8830
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
8606
|
-
|
|
8831
|
+
is_talk: isSet(object.is_talk) ? globalThis.Boolean(object.is_talk) : false,
|
|
8607
8832
|
};
|
|
8608
8833
|
},
|
|
8609
8834
|
toJSON(message) {
|
|
@@ -8611,11 +8836,14 @@ export const TalkPTTChannel = {
|
|
|
8611
8836
|
if (message.user_id !== "") {
|
|
8612
8837
|
obj.user_id = message.user_id;
|
|
8613
8838
|
}
|
|
8839
|
+
if (message.clan_id !== "") {
|
|
8840
|
+
obj.clan_id = message.clan_id;
|
|
8841
|
+
}
|
|
8614
8842
|
if (message.channel_id !== "") {
|
|
8615
8843
|
obj.channel_id = message.channel_id;
|
|
8616
8844
|
}
|
|
8617
|
-
if (message.
|
|
8618
|
-
obj.
|
|
8845
|
+
if (message.is_talk !== false) {
|
|
8846
|
+
obj.is_talk = message.is_talk;
|
|
8619
8847
|
}
|
|
8620
8848
|
return obj;
|
|
8621
8849
|
},
|
|
@@ -8625,8 +8853,9 @@ export const TalkPTTChannel = {
|
|
|
8625
8853
|
fromPartial(object) {
|
|
8626
8854
|
const message = createBaseTalkPTTChannel();
|
|
8627
8855
|
message.user_id = object.user_id ?? "";
|
|
8856
|
+
message.clan_id = object.clan_id ?? "";
|
|
8628
8857
|
message.channel_id = object.channel_id ?? "";
|
|
8629
|
-
message.
|
|
8858
|
+
message.is_talk = object.is_talk ?? false;
|
|
8630
8859
|
return message;
|
|
8631
8860
|
},
|
|
8632
8861
|
};
|