mezon-js-protobuf 1.8.52 → 1.8.54
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 +379 -103
- package/dist/mezon-js-protobuf/api/api.d.ts +202 -57
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +44 -96
- package/dist/mezon-js-protobuf.cjs.js +28 -41
- package/dist/mezon-js-protobuf.esm.mjs +28 -41
- package/package.json +1 -1
- package/rtapi/realtime.ts +18 -0
|
@@ -9778,21 +9778,15 @@ var NotificationChannelCategorySetting = {
|
|
|
9778
9778
|
}
|
|
9779
9779
|
};
|
|
9780
9780
|
function createBaseRoleList() {
|
|
9781
|
-
return { roles: [],
|
|
9781
|
+
return { roles: [], max_level_permission: 0 };
|
|
9782
9782
|
}
|
|
9783
9783
|
var RoleList = {
|
|
9784
9784
|
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
9785
9785
|
for (const v of message.roles) {
|
|
9786
9786
|
Role.encode(v, writer.uint32(10).fork()).ldelim();
|
|
9787
9787
|
}
|
|
9788
|
-
if (message.
|
|
9789
|
-
writer.uint32(
|
|
9790
|
-
}
|
|
9791
|
-
if (message.prev_cursor !== "") {
|
|
9792
|
-
writer.uint32(26).string(message.prev_cursor);
|
|
9793
|
-
}
|
|
9794
|
-
if (message.cacheable_cursor !== "") {
|
|
9795
|
-
writer.uint32(34).string(message.cacheable_cursor);
|
|
9788
|
+
if (message.max_level_permission !== 0) {
|
|
9789
|
+
writer.uint32(16).int32(message.max_level_permission);
|
|
9796
9790
|
}
|
|
9797
9791
|
return writer;
|
|
9798
9792
|
},
|
|
@@ -9810,22 +9804,10 @@ var RoleList = {
|
|
|
9810
9804
|
message.roles.push(Role.decode(reader, reader.uint32()));
|
|
9811
9805
|
continue;
|
|
9812
9806
|
case 2:
|
|
9813
|
-
if (tag !==
|
|
9814
|
-
break;
|
|
9815
|
-
}
|
|
9816
|
-
message.next_cursor = reader.string();
|
|
9817
|
-
continue;
|
|
9818
|
-
case 3:
|
|
9819
|
-
if (tag !== 26) {
|
|
9820
|
-
break;
|
|
9821
|
-
}
|
|
9822
|
-
message.prev_cursor = reader.string();
|
|
9823
|
-
continue;
|
|
9824
|
-
case 4:
|
|
9825
|
-
if (tag !== 34) {
|
|
9807
|
+
if (tag !== 16) {
|
|
9826
9808
|
break;
|
|
9827
9809
|
}
|
|
9828
|
-
message.
|
|
9810
|
+
message.max_level_permission = reader.int32();
|
|
9829
9811
|
continue;
|
|
9830
9812
|
}
|
|
9831
9813
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -9838,9 +9820,7 @@ var RoleList = {
|
|
|
9838
9820
|
fromJSON(object) {
|
|
9839
9821
|
return {
|
|
9840
9822
|
roles: globalThis.Array.isArray(object == null ? void 0 : object.roles) ? object.roles.map((e) => Role.fromJSON(e)) : [],
|
|
9841
|
-
|
|
9842
|
-
prev_cursor: isSet3(object.prev_cursor) ? globalThis.String(object.prev_cursor) : "",
|
|
9843
|
-
cacheable_cursor: isSet3(object.cacheable_cursor) ? globalThis.String(object.cacheable_cursor) : ""
|
|
9823
|
+
max_level_permission: isSet3(object.max_level_permission) ? globalThis.Number(object.max_level_permission) : 0
|
|
9844
9824
|
};
|
|
9845
9825
|
},
|
|
9846
9826
|
toJSON(message) {
|
|
@@ -9849,14 +9829,8 @@ var RoleList = {
|
|
|
9849
9829
|
if ((_a = message.roles) == null ? void 0 : _a.length) {
|
|
9850
9830
|
obj.roles = message.roles.map((e) => Role.toJSON(e));
|
|
9851
9831
|
}
|
|
9852
|
-
if (message.
|
|
9853
|
-
obj.
|
|
9854
|
-
}
|
|
9855
|
-
if (message.prev_cursor !== "") {
|
|
9856
|
-
obj.prev_cursor = message.prev_cursor;
|
|
9857
|
-
}
|
|
9858
|
-
if (message.cacheable_cursor !== "") {
|
|
9859
|
-
obj.cacheable_cursor = message.cacheable_cursor;
|
|
9832
|
+
if (message.max_level_permission !== 0) {
|
|
9833
|
+
obj.max_level_permission = Math.round(message.max_level_permission);
|
|
9860
9834
|
}
|
|
9861
9835
|
return obj;
|
|
9862
9836
|
},
|
|
@@ -9864,12 +9838,10 @@ var RoleList = {
|
|
|
9864
9838
|
return RoleList.fromPartial(base != null ? base : {});
|
|
9865
9839
|
},
|
|
9866
9840
|
fromPartial(object) {
|
|
9867
|
-
var _a, _b
|
|
9841
|
+
var _a, _b;
|
|
9868
9842
|
const message = createBaseRoleList();
|
|
9869
9843
|
message.roles = ((_a = object.roles) == null ? void 0 : _a.map((e) => Role.fromPartial(e))) || [];
|
|
9870
|
-
message.
|
|
9871
|
-
message.prev_cursor = (_c = object.prev_cursor) != null ? _c : "";
|
|
9872
|
-
message.cacheable_cursor = (_d = object.cacheable_cursor) != null ? _d : "";
|
|
9844
|
+
message.max_level_permission = (_b = object.max_level_permission) != null ? _b : 0;
|
|
9873
9845
|
return message;
|
|
9874
9846
|
}
|
|
9875
9847
|
};
|
|
@@ -20239,7 +20211,8 @@ function createBaseChannelCreatedEvent() {
|
|
|
20239
20211
|
channel_type: void 0,
|
|
20240
20212
|
status: 0,
|
|
20241
20213
|
app_id: "",
|
|
20242
|
-
clan_name: ""
|
|
20214
|
+
clan_name: "",
|
|
20215
|
+
channel_avatar: ""
|
|
20243
20216
|
};
|
|
20244
20217
|
}
|
|
20245
20218
|
var ChannelCreatedEvent = {
|
|
@@ -20277,6 +20250,9 @@ var ChannelCreatedEvent = {
|
|
|
20277
20250
|
if (message.clan_name !== "") {
|
|
20278
20251
|
writer.uint32(90).string(message.clan_name);
|
|
20279
20252
|
}
|
|
20253
|
+
if (message.channel_avatar !== "") {
|
|
20254
|
+
writer.uint32(98).string(message.channel_avatar);
|
|
20255
|
+
}
|
|
20280
20256
|
return writer;
|
|
20281
20257
|
},
|
|
20282
20258
|
decode(input, length) {
|
|
@@ -20352,6 +20328,12 @@ var ChannelCreatedEvent = {
|
|
|
20352
20328
|
}
|
|
20353
20329
|
message.clan_name = reader.string();
|
|
20354
20330
|
continue;
|
|
20331
|
+
case 12:
|
|
20332
|
+
if (tag !== 98) {
|
|
20333
|
+
break;
|
|
20334
|
+
}
|
|
20335
|
+
message.channel_avatar = reader.string();
|
|
20336
|
+
continue;
|
|
20355
20337
|
}
|
|
20356
20338
|
if ((tag & 7) === 4 || tag === 0) {
|
|
20357
20339
|
break;
|
|
@@ -20372,7 +20354,8 @@ var ChannelCreatedEvent = {
|
|
|
20372
20354
|
channel_type: isSet4(object.channel_type) ? Number(object.channel_type) : void 0,
|
|
20373
20355
|
status: isSet4(object.status) ? globalThis.Number(object.status) : 0,
|
|
20374
20356
|
app_id: isSet4(object.app_id) ? globalThis.String(object.app_id) : "",
|
|
20375
|
-
clan_name: isSet4(object.clan_name) ? globalThis.String(object.clan_name) : ""
|
|
20357
|
+
clan_name: isSet4(object.clan_name) ? globalThis.String(object.clan_name) : "",
|
|
20358
|
+
channel_avatar: isSet4(object.channel_avatar) ? globalThis.String(object.channel_avatar) : ""
|
|
20376
20359
|
};
|
|
20377
20360
|
},
|
|
20378
20361
|
toJSON(message) {
|
|
@@ -20410,13 +20393,16 @@ var ChannelCreatedEvent = {
|
|
|
20410
20393
|
if (message.clan_name !== "") {
|
|
20411
20394
|
obj.clan_name = message.clan_name;
|
|
20412
20395
|
}
|
|
20396
|
+
if (message.channel_avatar !== "") {
|
|
20397
|
+
obj.channel_avatar = message.channel_avatar;
|
|
20398
|
+
}
|
|
20413
20399
|
return obj;
|
|
20414
20400
|
},
|
|
20415
20401
|
create(base) {
|
|
20416
20402
|
return ChannelCreatedEvent.fromPartial(base != null ? base : {});
|
|
20417
20403
|
},
|
|
20418
20404
|
fromPartial(object) {
|
|
20419
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
20405
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
20420
20406
|
const message = createBaseChannelCreatedEvent();
|
|
20421
20407
|
message.clan_id = (_a = object.clan_id) != null ? _a : "";
|
|
20422
20408
|
message.category_id = (_b = object.category_id) != null ? _b : "";
|
|
@@ -20429,6 +20415,7 @@ var ChannelCreatedEvent = {
|
|
|
20429
20415
|
message.status = (_i = object.status) != null ? _i : 0;
|
|
20430
20416
|
message.app_id = (_j = object.app_id) != null ? _j : "";
|
|
20431
20417
|
message.clan_name = (_k = object.clan_name) != null ? _k : "";
|
|
20418
|
+
message.channel_avatar = (_l = object.channel_avatar) != null ? _l : "";
|
|
20432
20419
|
return message;
|
|
20433
20420
|
}
|
|
20434
20421
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mezon-js-protobuf",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.54",
|
|
4
4
|
"description": "Websocket adapter adding protocol buffer support to the Mezon Javascript client.",
|
|
5
5
|
"main": "dist/mezon-js-protobuf.cjs.js",
|
|
6
6
|
"module": "dist/mezon-js-protobuf.esm.mjs",
|
package/rtapi/realtime.ts
CHANGED
|
@@ -1156,6 +1156,8 @@ export interface ChannelCreatedEvent {
|
|
|
1156
1156
|
app_id: string;
|
|
1157
1157
|
/** clan_name */
|
|
1158
1158
|
clan_name: string;
|
|
1159
|
+
/** channel avatar */
|
|
1160
|
+
channel_avatar: string;
|
|
1159
1161
|
}
|
|
1160
1162
|
|
|
1161
1163
|
export interface CategoryEvent {
|
|
@@ -9124,6 +9126,7 @@ function createBaseChannelCreatedEvent(): ChannelCreatedEvent {
|
|
|
9124
9126
|
status: 0,
|
|
9125
9127
|
app_id: "",
|
|
9126
9128
|
clan_name: "",
|
|
9129
|
+
channel_avatar: "",
|
|
9127
9130
|
};
|
|
9128
9131
|
}
|
|
9129
9132
|
|
|
@@ -9162,6 +9165,9 @@ export const ChannelCreatedEvent = {
|
|
|
9162
9165
|
if (message.clan_name !== "") {
|
|
9163
9166
|
writer.uint32(90).string(message.clan_name);
|
|
9164
9167
|
}
|
|
9168
|
+
if (message.channel_avatar !== "") {
|
|
9169
|
+
writer.uint32(98).string(message.channel_avatar);
|
|
9170
|
+
}
|
|
9165
9171
|
return writer;
|
|
9166
9172
|
},
|
|
9167
9173
|
|
|
@@ -9249,6 +9255,13 @@ export const ChannelCreatedEvent = {
|
|
|
9249
9255
|
|
|
9250
9256
|
message.clan_name = reader.string();
|
|
9251
9257
|
continue;
|
|
9258
|
+
case 12:
|
|
9259
|
+
if (tag !== 98) {
|
|
9260
|
+
break;
|
|
9261
|
+
}
|
|
9262
|
+
|
|
9263
|
+
message.channel_avatar = reader.string();
|
|
9264
|
+
continue;
|
|
9252
9265
|
}
|
|
9253
9266
|
if ((tag & 7) === 4 || tag === 0) {
|
|
9254
9267
|
break;
|
|
@@ -9271,6 +9284,7 @@ export const ChannelCreatedEvent = {
|
|
|
9271
9284
|
status: isSet(object.status) ? globalThis.Number(object.status) : 0,
|
|
9272
9285
|
app_id: isSet(object.app_id) ? globalThis.String(object.app_id) : "",
|
|
9273
9286
|
clan_name: isSet(object.clan_name) ? globalThis.String(object.clan_name) : "",
|
|
9287
|
+
channel_avatar: isSet(object.channel_avatar) ? globalThis.String(object.channel_avatar) : "",
|
|
9274
9288
|
};
|
|
9275
9289
|
},
|
|
9276
9290
|
|
|
@@ -9309,6 +9323,9 @@ export const ChannelCreatedEvent = {
|
|
|
9309
9323
|
if (message.clan_name !== "") {
|
|
9310
9324
|
obj.clan_name = message.clan_name;
|
|
9311
9325
|
}
|
|
9326
|
+
if (message.channel_avatar !== "") {
|
|
9327
|
+
obj.channel_avatar = message.channel_avatar;
|
|
9328
|
+
}
|
|
9312
9329
|
return obj;
|
|
9313
9330
|
},
|
|
9314
9331
|
|
|
@@ -9328,6 +9345,7 @@ export const ChannelCreatedEvent = {
|
|
|
9328
9345
|
message.status = object.status ?? 0;
|
|
9329
9346
|
message.app_id = object.app_id ?? "";
|
|
9330
9347
|
message.clan_name = object.clan_name ?? "";
|
|
9348
|
+
message.channel_avatar = object.channel_avatar ?? "";
|
|
9331
9349
|
return message;
|
|
9332
9350
|
},
|
|
9333
9351
|
};
|