mezon-sdk 2.7.49 → 2.7.50
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 +109 -48
- package/dist/cjs/api/api.js +148 -141
- package/dist/cjs/api/api.js.map +1 -1
- package/dist/cjs/client.js +2 -2
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/google/protobuf/struct.d.ts +3 -3
- package/dist/cjs/google/protobuf/struct.js +2 -2
- package/dist/cjs/google/protobuf/timestamp.d.ts +1 -1
- package/dist/cjs/google/protobuf/timestamp.js +1 -1
- package/dist/cjs/google/protobuf/wrappers.js +1 -1
- package/dist/cjs/rtapi/realtime.d.ts +219 -128
- package/dist/cjs/rtapi/realtime.js +105 -3
- package/dist/cjs/rtapi/realtime.js.map +1 -1
- package/dist/esm/api/api.d.ts +109 -48
- package/dist/esm/api/api.js +129 -123
- package/dist/esm/api/api.js.map +1 -1
- package/dist/esm/client.js +2 -2
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/google/protobuf/struct.d.ts +3 -3
- package/dist/esm/google/protobuf/struct.js +2 -2
- package/dist/esm/google/protobuf/timestamp.d.ts +1 -1
- package/dist/esm/google/protobuf/timestamp.js +1 -1
- package/dist/esm/google/protobuf/wrappers.js +1 -1
- package/dist/esm/rtapi/realtime.d.ts +219 -128
- package/dist/esm/rtapi/realtime.js +101 -1
- 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
package/dist/esm/api/api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v1.181.
|
|
4
|
-
// protoc
|
|
3
|
+
// protoc-gen-ts_proto v1.181.2
|
|
4
|
+
// protoc v4.25.2
|
|
5
5
|
// source: api/api.proto
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
import Long from "long";
|
|
@@ -3006,6 +3006,56 @@ export const AuthenticateGameCenterRequest = {
|
|
|
3006
3006
|
return message;
|
|
3007
3007
|
},
|
|
3008
3008
|
};
|
|
3009
|
+
function createBaseAuthenticateGoogleRedirectRequest() {
|
|
3010
|
+
return { code: "" };
|
|
3011
|
+
}
|
|
3012
|
+
export const AuthenticateGoogleRedirectRequest = {
|
|
3013
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
3014
|
+
if (message.code !== "") {
|
|
3015
|
+
writer.uint32(10).string(message.code);
|
|
3016
|
+
}
|
|
3017
|
+
return writer;
|
|
3018
|
+
},
|
|
3019
|
+
decode(input, length) {
|
|
3020
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
3021
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3022
|
+
const message = createBaseAuthenticateGoogleRedirectRequest();
|
|
3023
|
+
while (reader.pos < end) {
|
|
3024
|
+
const tag = reader.uint32();
|
|
3025
|
+
switch (tag >>> 3) {
|
|
3026
|
+
case 1:
|
|
3027
|
+
if (tag !== 10) {
|
|
3028
|
+
break;
|
|
3029
|
+
}
|
|
3030
|
+
message.code = reader.string();
|
|
3031
|
+
continue;
|
|
3032
|
+
}
|
|
3033
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3034
|
+
break;
|
|
3035
|
+
}
|
|
3036
|
+
reader.skipType(tag & 7);
|
|
3037
|
+
}
|
|
3038
|
+
return message;
|
|
3039
|
+
},
|
|
3040
|
+
fromJSON(object) {
|
|
3041
|
+
return { code: isSet(object.code) ? globalThis.String(object.code) : "" };
|
|
3042
|
+
},
|
|
3043
|
+
toJSON(message) {
|
|
3044
|
+
const obj = {};
|
|
3045
|
+
if (message.code !== "") {
|
|
3046
|
+
obj.code = message.code;
|
|
3047
|
+
}
|
|
3048
|
+
return obj;
|
|
3049
|
+
},
|
|
3050
|
+
create(base) {
|
|
3051
|
+
return AuthenticateGoogleRedirectRequest.fromPartial(base ?? {});
|
|
3052
|
+
},
|
|
3053
|
+
fromPartial(object) {
|
|
3054
|
+
const message = createBaseAuthenticateGoogleRedirectRequest();
|
|
3055
|
+
message.code = object.code ?? "";
|
|
3056
|
+
return message;
|
|
3057
|
+
},
|
|
3058
|
+
};
|
|
3009
3059
|
function createBaseAuthenticateGoogleRequest() {
|
|
3010
3060
|
return { account: undefined, create: undefined, username: "" };
|
|
3011
3061
|
}
|
|
@@ -9857,21 +9907,18 @@ export const ClanDesc = {
|
|
|
9857
9907
|
},
|
|
9858
9908
|
};
|
|
9859
9909
|
function createBaseCreateClanDescRequest() {
|
|
9860
|
-
return {
|
|
9910
|
+
return { clan_name: "", logo: "", banner: "" };
|
|
9861
9911
|
}
|
|
9862
9912
|
export const CreateClanDescRequest = {
|
|
9863
9913
|
encode(message, writer = _m0.Writer.create()) {
|
|
9864
|
-
if (message.creator_id !== "") {
|
|
9865
|
-
writer.uint32(10).string(message.creator_id);
|
|
9866
|
-
}
|
|
9867
9914
|
if (message.clan_name !== "") {
|
|
9868
|
-
writer.uint32(
|
|
9915
|
+
writer.uint32(10).string(message.clan_name);
|
|
9869
9916
|
}
|
|
9870
9917
|
if (message.logo !== "") {
|
|
9871
|
-
writer.uint32(
|
|
9918
|
+
writer.uint32(18).string(message.logo);
|
|
9872
9919
|
}
|
|
9873
9920
|
if (message.banner !== "") {
|
|
9874
|
-
writer.uint32(
|
|
9921
|
+
writer.uint32(26).string(message.banner);
|
|
9875
9922
|
}
|
|
9876
9923
|
return writer;
|
|
9877
9924
|
},
|
|
@@ -9886,24 +9933,18 @@ export const CreateClanDescRequest = {
|
|
|
9886
9933
|
if (tag !== 10) {
|
|
9887
9934
|
break;
|
|
9888
9935
|
}
|
|
9889
|
-
message.
|
|
9936
|
+
message.clan_name = reader.string();
|
|
9890
9937
|
continue;
|
|
9891
9938
|
case 2:
|
|
9892
9939
|
if (tag !== 18) {
|
|
9893
9940
|
break;
|
|
9894
9941
|
}
|
|
9895
|
-
message.
|
|
9942
|
+
message.logo = reader.string();
|
|
9896
9943
|
continue;
|
|
9897
9944
|
case 3:
|
|
9898
9945
|
if (tag !== 26) {
|
|
9899
9946
|
break;
|
|
9900
9947
|
}
|
|
9901
|
-
message.logo = reader.string();
|
|
9902
|
-
continue;
|
|
9903
|
-
case 4:
|
|
9904
|
-
if (tag !== 34) {
|
|
9905
|
-
break;
|
|
9906
|
-
}
|
|
9907
9948
|
message.banner = reader.string();
|
|
9908
9949
|
continue;
|
|
9909
9950
|
}
|
|
@@ -9916,7 +9957,6 @@ export const CreateClanDescRequest = {
|
|
|
9916
9957
|
},
|
|
9917
9958
|
fromJSON(object) {
|
|
9918
9959
|
return {
|
|
9919
|
-
creator_id: isSet(object.creator_id) ? globalThis.String(object.creator_id) : "",
|
|
9920
9960
|
clan_name: isSet(object.clan_name) ? globalThis.String(object.clan_name) : "",
|
|
9921
9961
|
logo: isSet(object.logo) ? globalThis.String(object.logo) : "",
|
|
9922
9962
|
banner: isSet(object.banner) ? globalThis.String(object.banner) : "",
|
|
@@ -9924,9 +9964,6 @@ export const CreateClanDescRequest = {
|
|
|
9924
9964
|
},
|
|
9925
9965
|
toJSON(message) {
|
|
9926
9966
|
const obj = {};
|
|
9927
|
-
if (message.creator_id !== "") {
|
|
9928
|
-
obj.creator_id = message.creator_id;
|
|
9929
|
-
}
|
|
9930
9967
|
if (message.clan_name !== "") {
|
|
9931
9968
|
obj.clan_name = message.clan_name;
|
|
9932
9969
|
}
|
|
@@ -9943,7 +9980,6 @@ export const CreateClanDescRequest = {
|
|
|
9943
9980
|
},
|
|
9944
9981
|
fromPartial(object) {
|
|
9945
9982
|
const message = createBaseCreateClanDescRequest();
|
|
9946
|
-
message.creator_id = object.creator_id ?? "";
|
|
9947
9983
|
message.clan_name = object.clan_name ?? "";
|
|
9948
9984
|
message.logo = object.logo ?? "";
|
|
9949
9985
|
message.banner = object.banner ?? "";
|
|
@@ -11458,6 +11494,7 @@ function createBaseChannelMessageHeader() {
|
|
|
11458
11494
|
referece: "",
|
|
11459
11495
|
mention: "",
|
|
11460
11496
|
reaction: "",
|
|
11497
|
+
unread_count: 0,
|
|
11461
11498
|
};
|
|
11462
11499
|
}
|
|
11463
11500
|
export const ChannelMessageHeader = {
|
|
@@ -11486,6 +11523,9 @@ export const ChannelMessageHeader = {
|
|
|
11486
11523
|
if (message.reaction !== "") {
|
|
11487
11524
|
writer.uint32(66).string(message.reaction);
|
|
11488
11525
|
}
|
|
11526
|
+
if (message.unread_count !== 0) {
|
|
11527
|
+
writer.uint32(72).int32(message.unread_count);
|
|
11528
|
+
}
|
|
11489
11529
|
return writer;
|
|
11490
11530
|
},
|
|
11491
11531
|
decode(input, length) {
|
|
@@ -11543,6 +11583,12 @@ export const ChannelMessageHeader = {
|
|
|
11543
11583
|
}
|
|
11544
11584
|
message.reaction = reader.string();
|
|
11545
11585
|
continue;
|
|
11586
|
+
case 9:
|
|
11587
|
+
if (tag !== 72) {
|
|
11588
|
+
break;
|
|
11589
|
+
}
|
|
11590
|
+
message.unread_count = reader.int32();
|
|
11591
|
+
continue;
|
|
11546
11592
|
}
|
|
11547
11593
|
if ((tag & 7) === 4 || tag === 0) {
|
|
11548
11594
|
break;
|
|
@@ -11561,6 +11607,7 @@ export const ChannelMessageHeader = {
|
|
|
11561
11607
|
referece: isSet(object.referece) ? globalThis.String(object.referece) : "",
|
|
11562
11608
|
mention: isSet(object.mention) ? globalThis.String(object.mention) : "",
|
|
11563
11609
|
reaction: isSet(object.reaction) ? globalThis.String(object.reaction) : "",
|
|
11610
|
+
unread_count: isSet(object.unread_count) ? globalThis.Number(object.unread_count) : 0,
|
|
11564
11611
|
};
|
|
11565
11612
|
},
|
|
11566
11613
|
toJSON(message) {
|
|
@@ -11589,6 +11636,9 @@ export const ChannelMessageHeader = {
|
|
|
11589
11636
|
if (message.reaction !== "") {
|
|
11590
11637
|
obj.reaction = message.reaction;
|
|
11591
11638
|
}
|
|
11639
|
+
if (message.unread_count !== 0) {
|
|
11640
|
+
obj.unread_count = Math.round(message.unread_count);
|
|
11641
|
+
}
|
|
11592
11642
|
return obj;
|
|
11593
11643
|
},
|
|
11594
11644
|
create(base) {
|
|
@@ -11604,6 +11654,7 @@ export const ChannelMessageHeader = {
|
|
|
11604
11654
|
message.referece = object.referece ?? "";
|
|
11605
11655
|
message.mention = object.mention ?? "";
|
|
11606
11656
|
message.reaction = object.reaction ?? "";
|
|
11657
|
+
message.unread_count = object.unread_count ?? 0;
|
|
11607
11658
|
return message;
|
|
11608
11659
|
},
|
|
11609
11660
|
};
|
|
@@ -12232,7 +12283,7 @@ export const ListChannelDescsRequest = {
|
|
|
12232
12283
|
},
|
|
12233
12284
|
};
|
|
12234
12285
|
function createBaseAddRoleChannelDescRequest() {
|
|
12235
|
-
return { role_ids: [], channel_id: ""
|
|
12286
|
+
return { role_ids: [], channel_id: "" };
|
|
12236
12287
|
}
|
|
12237
12288
|
export const AddRoleChannelDescRequest = {
|
|
12238
12289
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -12242,9 +12293,6 @@ export const AddRoleChannelDescRequest = {
|
|
|
12242
12293
|
if (message.channel_id !== "") {
|
|
12243
12294
|
writer.uint32(18).string(message.channel_id);
|
|
12244
12295
|
}
|
|
12245
|
-
if (message.max_permission !== 0) {
|
|
12246
|
-
writer.uint32(24).int32(message.max_permission);
|
|
12247
|
-
}
|
|
12248
12296
|
return writer;
|
|
12249
12297
|
},
|
|
12250
12298
|
decode(input, length) {
|
|
@@ -12266,12 +12314,6 @@ export const AddRoleChannelDescRequest = {
|
|
|
12266
12314
|
}
|
|
12267
12315
|
message.channel_id = reader.string();
|
|
12268
12316
|
continue;
|
|
12269
|
-
case 3:
|
|
12270
|
-
if (tag !== 24) {
|
|
12271
|
-
break;
|
|
12272
|
-
}
|
|
12273
|
-
message.max_permission = reader.int32();
|
|
12274
|
-
continue;
|
|
12275
12317
|
}
|
|
12276
12318
|
if ((tag & 7) === 4 || tag === 0) {
|
|
12277
12319
|
break;
|
|
@@ -12284,7 +12326,6 @@ export const AddRoleChannelDescRequest = {
|
|
|
12284
12326
|
return {
|
|
12285
12327
|
role_ids: globalThis.Array.isArray(object?.role_ids) ? object.role_ids.map((e) => globalThis.String(e)) : [],
|
|
12286
12328
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
12287
|
-
max_permission: isSet(object.max_permission) ? globalThis.Number(object.max_permission) : 0,
|
|
12288
12329
|
};
|
|
12289
12330
|
},
|
|
12290
12331
|
toJSON(message) {
|
|
@@ -12295,9 +12336,6 @@ export const AddRoleChannelDescRequest = {
|
|
|
12295
12336
|
if (message.channel_id !== "") {
|
|
12296
12337
|
obj.channel_id = message.channel_id;
|
|
12297
12338
|
}
|
|
12298
|
-
if (message.max_permission !== 0) {
|
|
12299
|
-
obj.max_permission = Math.round(message.max_permission);
|
|
12300
|
-
}
|
|
12301
12339
|
return obj;
|
|
12302
12340
|
},
|
|
12303
12341
|
create(base) {
|
|
@@ -12307,7 +12345,6 @@ export const AddRoleChannelDescRequest = {
|
|
|
12307
12345
|
const message = createBaseAddRoleChannelDescRequest();
|
|
12308
12346
|
message.role_ids = object.role_ids?.map((e) => e) || [];
|
|
12309
12347
|
message.channel_id = object.channel_id ?? "";
|
|
12310
|
-
message.max_permission = object.max_permission ?? 0;
|
|
12311
12348
|
return message;
|
|
12312
12349
|
},
|
|
12313
12350
|
};
|
|
@@ -15429,9 +15466,9 @@ function createBaseCreateRoleRequest() {
|
|
|
15429
15466
|
clan_id: "",
|
|
15430
15467
|
display_online: 0,
|
|
15431
15468
|
allow_mention: 0,
|
|
15469
|
+
max_permission_id: "",
|
|
15432
15470
|
add_user_ids: [],
|
|
15433
15471
|
active_permission_ids: [],
|
|
15434
|
-
max_permission: 0,
|
|
15435
15472
|
};
|
|
15436
15473
|
}
|
|
15437
15474
|
export const CreateRoleRequest = {
|
|
@@ -15457,14 +15494,14 @@ export const CreateRoleRequest = {
|
|
|
15457
15494
|
if (message.allow_mention !== 0) {
|
|
15458
15495
|
writer.uint32(56).int32(message.allow_mention);
|
|
15459
15496
|
}
|
|
15460
|
-
|
|
15461
|
-
writer.uint32(66).string(
|
|
15497
|
+
if (message.max_permission_id !== "") {
|
|
15498
|
+
writer.uint32(66).string(message.max_permission_id);
|
|
15462
15499
|
}
|
|
15463
|
-
for (const v of message.
|
|
15500
|
+
for (const v of message.add_user_ids) {
|
|
15464
15501
|
writer.uint32(74).string(v);
|
|
15465
15502
|
}
|
|
15466
|
-
|
|
15467
|
-
writer.uint32(
|
|
15503
|
+
for (const v of message.active_permission_ids) {
|
|
15504
|
+
writer.uint32(82).string(v);
|
|
15468
15505
|
}
|
|
15469
15506
|
return writer;
|
|
15470
15507
|
},
|
|
@@ -15521,19 +15558,19 @@ export const CreateRoleRequest = {
|
|
|
15521
15558
|
if (tag !== 66) {
|
|
15522
15559
|
break;
|
|
15523
15560
|
}
|
|
15524
|
-
message.
|
|
15561
|
+
message.max_permission_id = reader.string();
|
|
15525
15562
|
continue;
|
|
15526
15563
|
case 9:
|
|
15527
15564
|
if (tag !== 74) {
|
|
15528
15565
|
break;
|
|
15529
15566
|
}
|
|
15530
|
-
message.
|
|
15567
|
+
message.add_user_ids.push(reader.string());
|
|
15531
15568
|
continue;
|
|
15532
15569
|
case 10:
|
|
15533
|
-
if (tag !==
|
|
15570
|
+
if (tag !== 82) {
|
|
15534
15571
|
break;
|
|
15535
15572
|
}
|
|
15536
|
-
message.
|
|
15573
|
+
message.active_permission_ids.push(reader.string());
|
|
15537
15574
|
continue;
|
|
15538
15575
|
}
|
|
15539
15576
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -15552,13 +15589,13 @@ export const CreateRoleRequest = {
|
|
|
15552
15589
|
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
15553
15590
|
display_online: isSet(object.display_online) ? globalThis.Number(object.display_online) : 0,
|
|
15554
15591
|
allow_mention: isSet(object.allow_mention) ? globalThis.Number(object.allow_mention) : 0,
|
|
15592
|
+
max_permission_id: isSet(object.max_permission_id) ? globalThis.String(object.max_permission_id) : "",
|
|
15555
15593
|
add_user_ids: globalThis.Array.isArray(object?.add_user_ids)
|
|
15556
15594
|
? object.add_user_ids.map((e) => globalThis.String(e))
|
|
15557
15595
|
: [],
|
|
15558
15596
|
active_permission_ids: globalThis.Array.isArray(object?.active_permission_ids)
|
|
15559
15597
|
? object.active_permission_ids.map((e) => globalThis.String(e))
|
|
15560
15598
|
: [],
|
|
15561
|
-
max_permission: isSet(object.max_permission) ? globalThis.Number(object.max_permission) : 0,
|
|
15562
15599
|
};
|
|
15563
15600
|
},
|
|
15564
15601
|
toJSON(message) {
|
|
@@ -15584,15 +15621,15 @@ export const CreateRoleRequest = {
|
|
|
15584
15621
|
if (message.allow_mention !== 0) {
|
|
15585
15622
|
obj.allow_mention = Math.round(message.allow_mention);
|
|
15586
15623
|
}
|
|
15624
|
+
if (message.max_permission_id !== "") {
|
|
15625
|
+
obj.max_permission_id = message.max_permission_id;
|
|
15626
|
+
}
|
|
15587
15627
|
if (message.add_user_ids?.length) {
|
|
15588
15628
|
obj.add_user_ids = message.add_user_ids;
|
|
15589
15629
|
}
|
|
15590
15630
|
if (message.active_permission_ids?.length) {
|
|
15591
15631
|
obj.active_permission_ids = message.active_permission_ids;
|
|
15592
15632
|
}
|
|
15593
|
-
if (message.max_permission !== 0) {
|
|
15594
|
-
obj.max_permission = Math.round(message.max_permission);
|
|
15595
|
-
}
|
|
15596
15633
|
return obj;
|
|
15597
15634
|
},
|
|
15598
15635
|
create(base) {
|
|
@@ -15607,9 +15644,9 @@ export const CreateRoleRequest = {
|
|
|
15607
15644
|
message.clan_id = object.clan_id ?? "";
|
|
15608
15645
|
message.display_online = object.display_online ?? 0;
|
|
15609
15646
|
message.allow_mention = object.allow_mention ?? 0;
|
|
15647
|
+
message.max_permission_id = object.max_permission_id ?? "";
|
|
15610
15648
|
message.add_user_ids = object.add_user_ids?.map((e) => e) || [];
|
|
15611
15649
|
message.active_permission_ids = object.active_permission_ids?.map((e) => e) || [];
|
|
15612
|
-
message.max_permission = object.max_permission ?? 0;
|
|
15613
15650
|
return message;
|
|
15614
15651
|
},
|
|
15615
15652
|
};
|
|
@@ -15977,7 +16014,7 @@ export const UpdateEventRequest = {
|
|
|
15977
16014
|
},
|
|
15978
16015
|
};
|
|
15979
16016
|
function createBaseDeleteRoleRequest() {
|
|
15980
|
-
return { role_id: "", channel_id: "", clan_id: ""
|
|
16017
|
+
return { role_id: "", channel_id: "", clan_id: "" };
|
|
15981
16018
|
}
|
|
15982
16019
|
export const DeleteRoleRequest = {
|
|
15983
16020
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -15990,9 +16027,6 @@ export const DeleteRoleRequest = {
|
|
|
15990
16027
|
if (message.clan_id !== "") {
|
|
15991
16028
|
writer.uint32(26).string(message.clan_id);
|
|
15992
16029
|
}
|
|
15993
|
-
if (message.max_permissions_level !== 0) {
|
|
15994
|
-
writer.uint32(32).int64(message.max_permissions_level);
|
|
15995
|
-
}
|
|
15996
16030
|
return writer;
|
|
15997
16031
|
},
|
|
15998
16032
|
decode(input, length) {
|
|
@@ -16020,12 +16054,6 @@ export const DeleteRoleRequest = {
|
|
|
16020
16054
|
}
|
|
16021
16055
|
message.clan_id = reader.string();
|
|
16022
16056
|
continue;
|
|
16023
|
-
case 4:
|
|
16024
|
-
if (tag !== 32) {
|
|
16025
|
-
break;
|
|
16026
|
-
}
|
|
16027
|
-
message.max_permissions_level = longToNumber(reader.int64());
|
|
16028
|
-
continue;
|
|
16029
16057
|
}
|
|
16030
16058
|
if ((tag & 7) === 4 || tag === 0) {
|
|
16031
16059
|
break;
|
|
@@ -16039,7 +16067,6 @@ export const DeleteRoleRequest = {
|
|
|
16039
16067
|
role_id: isSet(object.role_id) ? globalThis.String(object.role_id) : "",
|
|
16040
16068
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
16041
16069
|
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
16042
|
-
max_permissions_level: isSet(object.max_permissions_level) ? globalThis.Number(object.max_permissions_level) : 0,
|
|
16043
16070
|
};
|
|
16044
16071
|
},
|
|
16045
16072
|
toJSON(message) {
|
|
@@ -16053,9 +16080,6 @@ export const DeleteRoleRequest = {
|
|
|
16053
16080
|
if (message.clan_id !== "") {
|
|
16054
16081
|
obj.clan_id = message.clan_id;
|
|
16055
16082
|
}
|
|
16056
|
-
if (message.max_permissions_level !== 0) {
|
|
16057
|
-
obj.max_permissions_level = Math.round(message.max_permissions_level);
|
|
16058
|
-
}
|
|
16059
16083
|
return obj;
|
|
16060
16084
|
},
|
|
16061
16085
|
create(base) {
|
|
@@ -16066,7 +16090,6 @@ export const DeleteRoleRequest = {
|
|
|
16066
16090
|
message.role_id = object.role_id ?? "";
|
|
16067
16091
|
message.channel_id = object.channel_id ?? "";
|
|
16068
16092
|
message.clan_id = object.clan_id ?? "";
|
|
16069
|
-
message.max_permissions_level = object.max_permissions_level ?? 0;
|
|
16070
16093
|
return message;
|
|
16071
16094
|
},
|
|
16072
16095
|
};
|
|
@@ -16150,8 +16173,7 @@ function createBaseUpdateRoleRequest() {
|
|
|
16150
16173
|
remove_user_ids: [],
|
|
16151
16174
|
remove_permission_ids: [],
|
|
16152
16175
|
clan_id: "",
|
|
16153
|
-
|
|
16154
|
-
max_permission_updated: 0,
|
|
16176
|
+
max_permission_id: "",
|
|
16155
16177
|
};
|
|
16156
16178
|
}
|
|
16157
16179
|
export const UpdateRoleRequest = {
|
|
@@ -16192,11 +16214,8 @@ export const UpdateRoleRequest = {
|
|
|
16192
16214
|
if (message.clan_id !== "") {
|
|
16193
16215
|
writer.uint32(98).string(message.clan_id);
|
|
16194
16216
|
}
|
|
16195
|
-
if (message.
|
|
16196
|
-
writer.uint32(
|
|
16197
|
-
}
|
|
16198
|
-
if (message.max_permission_updated !== 0) {
|
|
16199
|
-
writer.uint32(112).int32(message.max_permission_updated);
|
|
16217
|
+
if (message.max_permission_id !== "") {
|
|
16218
|
+
writer.uint32(106).string(message.max_permission_id);
|
|
16200
16219
|
}
|
|
16201
16220
|
return writer;
|
|
16202
16221
|
},
|
|
@@ -16280,16 +16299,10 @@ export const UpdateRoleRequest = {
|
|
|
16280
16299
|
message.clan_id = reader.string();
|
|
16281
16300
|
continue;
|
|
16282
16301
|
case 13:
|
|
16283
|
-
if (tag !==
|
|
16284
|
-
break;
|
|
16285
|
-
}
|
|
16286
|
-
message.max_permission = reader.int32();
|
|
16287
|
-
continue;
|
|
16288
|
-
case 14:
|
|
16289
|
-
if (tag !== 112) {
|
|
16302
|
+
if (tag !== 106) {
|
|
16290
16303
|
break;
|
|
16291
16304
|
}
|
|
16292
|
-
message.
|
|
16305
|
+
message.max_permission_id = reader.string();
|
|
16293
16306
|
continue;
|
|
16294
16307
|
}
|
|
16295
16308
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -16321,10 +16334,7 @@ export const UpdateRoleRequest = {
|
|
|
16321
16334
|
? object.remove_permission_ids.map((e) => globalThis.String(e))
|
|
16322
16335
|
: [],
|
|
16323
16336
|
clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
|
|
16324
|
-
|
|
16325
|
-
max_permission_updated: isSet(object.max_permission_updated)
|
|
16326
|
-
? globalThis.Number(object.max_permission_updated)
|
|
16327
|
-
: 0,
|
|
16337
|
+
max_permission_id: isSet(object.max_permission_id) ? globalThis.String(object.max_permission_id) : "",
|
|
16328
16338
|
};
|
|
16329
16339
|
},
|
|
16330
16340
|
toJSON(message) {
|
|
@@ -16365,11 +16375,8 @@ export const UpdateRoleRequest = {
|
|
|
16365
16375
|
if (message.clan_id !== "") {
|
|
16366
16376
|
obj.clan_id = message.clan_id;
|
|
16367
16377
|
}
|
|
16368
|
-
if (message.
|
|
16369
|
-
obj.
|
|
16370
|
-
}
|
|
16371
|
-
if (message.max_permission_updated !== 0) {
|
|
16372
|
-
obj.max_permission_updated = Math.round(message.max_permission_updated);
|
|
16378
|
+
if (message.max_permission_id !== "") {
|
|
16379
|
+
obj.max_permission_id = message.max_permission_id;
|
|
16373
16380
|
}
|
|
16374
16381
|
return obj;
|
|
16375
16382
|
},
|
|
@@ -16390,13 +16397,12 @@ export const UpdateRoleRequest = {
|
|
|
16390
16397
|
message.remove_user_ids = object.remove_user_ids?.map((e) => e) || [];
|
|
16391
16398
|
message.remove_permission_ids = object.remove_permission_ids?.map((e) => e) || [];
|
|
16392
16399
|
message.clan_id = object.clan_id ?? "";
|
|
16393
|
-
message.
|
|
16394
|
-
message.max_permission_updated = object.max_permission_updated ?? 0;
|
|
16400
|
+
message.max_permission_id = object.max_permission_id ?? "";
|
|
16395
16401
|
return message;
|
|
16396
16402
|
},
|
|
16397
16403
|
};
|
|
16398
16404
|
function createBaseUpdateRoleChannelRequest() {
|
|
16399
|
-
return { role_id: "", permission_update: [],
|
|
16405
|
+
return { role_id: "", permission_update: [], max_permission_id: "", channel_id: "" };
|
|
16400
16406
|
}
|
|
16401
16407
|
export const UpdateRoleChannelRequest = {
|
|
16402
16408
|
encode(message, writer = _m0.Writer.create()) {
|
|
@@ -16406,14 +16412,11 @@ export const UpdateRoleChannelRequest = {
|
|
|
16406
16412
|
for (const v of message.permission_update) {
|
|
16407
16413
|
PermissionUpdate.encode(v, writer.uint32(18).fork()).ldelim();
|
|
16408
16414
|
}
|
|
16409
|
-
if (message.
|
|
16410
|
-
writer.uint32(26).string(message.
|
|
16415
|
+
if (message.max_permission_id !== "") {
|
|
16416
|
+
writer.uint32(26).string(message.max_permission_id);
|
|
16411
16417
|
}
|
|
16412
|
-
if (message.
|
|
16413
|
-
writer.uint32(
|
|
16414
|
-
}
|
|
16415
|
-
if (message.max_permission_update !== 0) {
|
|
16416
|
-
writer.uint32(40).int32(message.max_permission_update);
|
|
16418
|
+
if (message.channel_id !== "") {
|
|
16419
|
+
writer.uint32(34).string(message.channel_id);
|
|
16417
16420
|
}
|
|
16418
16421
|
return writer;
|
|
16419
16422
|
},
|
|
@@ -16440,19 +16443,13 @@ export const UpdateRoleChannelRequest = {
|
|
|
16440
16443
|
if (tag !== 26) {
|
|
16441
16444
|
break;
|
|
16442
16445
|
}
|
|
16443
|
-
message.
|
|
16446
|
+
message.max_permission_id = reader.string();
|
|
16444
16447
|
continue;
|
|
16445
16448
|
case 4:
|
|
16446
|
-
if (tag !==
|
|
16447
|
-
break;
|
|
16448
|
-
}
|
|
16449
|
-
message.max_permission = reader.int32();
|
|
16450
|
-
continue;
|
|
16451
|
-
case 5:
|
|
16452
|
-
if (tag !== 40) {
|
|
16449
|
+
if (tag !== 34) {
|
|
16453
16450
|
break;
|
|
16454
16451
|
}
|
|
16455
|
-
message.
|
|
16452
|
+
message.channel_id = reader.string();
|
|
16456
16453
|
continue;
|
|
16457
16454
|
}
|
|
16458
16455
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -16468,9 +16465,8 @@ export const UpdateRoleChannelRequest = {
|
|
|
16468
16465
|
permission_update: globalThis.Array.isArray(object?.permission_update)
|
|
16469
16466
|
? object.permission_update.map((e) => PermissionUpdate.fromJSON(e))
|
|
16470
16467
|
: [],
|
|
16468
|
+
max_permission_id: isSet(object.max_permission_id) ? globalThis.String(object.max_permission_id) : "",
|
|
16471
16469
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
16472
|
-
max_permission: isSet(object.max_permission) ? globalThis.Number(object.max_permission) : 0,
|
|
16473
|
-
max_permission_update: isSet(object.max_permission_update) ? globalThis.Number(object.max_permission_update) : 0,
|
|
16474
16470
|
};
|
|
16475
16471
|
},
|
|
16476
16472
|
toJSON(message) {
|
|
@@ -16481,15 +16477,12 @@ export const UpdateRoleChannelRequest = {
|
|
|
16481
16477
|
if (message.permission_update?.length) {
|
|
16482
16478
|
obj.permission_update = message.permission_update.map((e) => PermissionUpdate.toJSON(e));
|
|
16483
16479
|
}
|
|
16480
|
+
if (message.max_permission_id !== "") {
|
|
16481
|
+
obj.max_permission_id = message.max_permission_id;
|
|
16482
|
+
}
|
|
16484
16483
|
if (message.channel_id !== "") {
|
|
16485
16484
|
obj.channel_id = message.channel_id;
|
|
16486
16485
|
}
|
|
16487
|
-
if (message.max_permission !== 0) {
|
|
16488
|
-
obj.max_permission = Math.round(message.max_permission);
|
|
16489
|
-
}
|
|
16490
|
-
if (message.max_permission_update !== 0) {
|
|
16491
|
-
obj.max_permission_update = Math.round(message.max_permission_update);
|
|
16492
|
-
}
|
|
16493
16486
|
return obj;
|
|
16494
16487
|
},
|
|
16495
16488
|
create(base) {
|
|
@@ -16499,22 +16492,24 @@ export const UpdateRoleChannelRequest = {
|
|
|
16499
16492
|
const message = createBaseUpdateRoleChannelRequest();
|
|
16500
16493
|
message.role_id = object.role_id ?? "";
|
|
16501
16494
|
message.permission_update = object.permission_update?.map((e) => PermissionUpdate.fromPartial(e)) || [];
|
|
16495
|
+
message.max_permission_id = object.max_permission_id ?? "";
|
|
16502
16496
|
message.channel_id = object.channel_id ?? "";
|
|
16503
|
-
message.max_permission = object.max_permission ?? 0;
|
|
16504
|
-
message.max_permission_update = object.max_permission_update ?? 0;
|
|
16505
16497
|
return message;
|
|
16506
16498
|
},
|
|
16507
16499
|
};
|
|
16508
16500
|
function createBasePermissionUpdate() {
|
|
16509
|
-
return { permission_id: "", type: 0 };
|
|
16501
|
+
return { permission_id: "", slug: "", type: 0 };
|
|
16510
16502
|
}
|
|
16511
16503
|
export const PermissionUpdate = {
|
|
16512
16504
|
encode(message, writer = _m0.Writer.create()) {
|
|
16513
16505
|
if (message.permission_id !== "") {
|
|
16514
16506
|
writer.uint32(10).string(message.permission_id);
|
|
16515
16507
|
}
|
|
16508
|
+
if (message.slug !== "") {
|
|
16509
|
+
writer.uint32(18).string(message.slug);
|
|
16510
|
+
}
|
|
16516
16511
|
if (message.type !== 0) {
|
|
16517
|
-
writer.uint32(
|
|
16512
|
+
writer.uint32(24).int32(message.type);
|
|
16518
16513
|
}
|
|
16519
16514
|
return writer;
|
|
16520
16515
|
},
|
|
@@ -16532,7 +16527,13 @@ export const PermissionUpdate = {
|
|
|
16532
16527
|
message.permission_id = reader.string();
|
|
16533
16528
|
continue;
|
|
16534
16529
|
case 2:
|
|
16535
|
-
if (tag !==
|
|
16530
|
+
if (tag !== 18) {
|
|
16531
|
+
break;
|
|
16532
|
+
}
|
|
16533
|
+
message.slug = reader.string();
|
|
16534
|
+
continue;
|
|
16535
|
+
case 3:
|
|
16536
|
+
if (tag !== 24) {
|
|
16536
16537
|
break;
|
|
16537
16538
|
}
|
|
16538
16539
|
message.type = reader.int32();
|
|
@@ -16548,6 +16549,7 @@ export const PermissionUpdate = {
|
|
|
16548
16549
|
fromJSON(object) {
|
|
16549
16550
|
return {
|
|
16550
16551
|
permission_id: isSet(object.permission_id) ? globalThis.String(object.permission_id) : "",
|
|
16552
|
+
slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
|
|
16551
16553
|
type: isSet(object.type) ? globalThis.Number(object.type) : 0,
|
|
16552
16554
|
};
|
|
16553
16555
|
},
|
|
@@ -16556,6 +16558,9 @@ export const PermissionUpdate = {
|
|
|
16556
16558
|
if (message.permission_id !== "") {
|
|
16557
16559
|
obj.permission_id = message.permission_id;
|
|
16558
16560
|
}
|
|
16561
|
+
if (message.slug !== "") {
|
|
16562
|
+
obj.slug = message.slug;
|
|
16563
|
+
}
|
|
16559
16564
|
if (message.type !== 0) {
|
|
16560
16565
|
obj.type = Math.round(message.type);
|
|
16561
16566
|
}
|
|
@@ -16567,6 +16572,7 @@ export const PermissionUpdate = {
|
|
|
16567
16572
|
fromPartial(object) {
|
|
16568
16573
|
const message = createBasePermissionUpdate();
|
|
16569
16574
|
message.permission_id = object.permission_id ?? "";
|
|
16575
|
+
message.slug = object.slug ?? "";
|
|
16570
16576
|
message.type = object.type ?? 0;
|
|
16571
16577
|
return message;
|
|
16572
16578
|
},
|