mezon-js-protobuf 1.8.47 → 1.8.49
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 +91 -49
- package/dist/mezon-js-protobuf/api/api.d.ts +21 -7
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +0 -210
- package/dist/mezon-js-protobuf.cjs.js +13 -35
- package/dist/mezon-js-protobuf.esm.mjs +13 -35
- package/package.json +1 -1
- package/rtapi/realtime.ts +9 -34
package/api/api.ts
CHANGED
|
@@ -1004,12 +1004,13 @@ export interface Session {
|
|
|
1004
1004
|
is_remember: boolean;
|
|
1005
1005
|
}
|
|
1006
1006
|
|
|
1007
|
+
/** Update username */
|
|
1008
|
+
export interface UpdateUsernameRequest {
|
|
1009
|
+
username: string;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1007
1012
|
/** Update a user's account details. */
|
|
1008
1013
|
export interface UpdateAccountRequest {
|
|
1009
|
-
/** The username of the user's account. */
|
|
1010
|
-
username:
|
|
1011
|
-
| string
|
|
1012
|
-
| undefined;
|
|
1013
1014
|
/** The display name of the user. */
|
|
1014
1015
|
display_name:
|
|
1015
1016
|
| string
|
|
@@ -1687,7 +1688,7 @@ export interface UpdateChannelDescRequest {
|
|
|
1687
1688
|
/** */
|
|
1688
1689
|
e2ee: number;
|
|
1689
1690
|
/** channel avatar */
|
|
1690
|
-
channel_avatar: string;
|
|
1691
|
+
channel_avatar: string | undefined;
|
|
1691
1692
|
}
|
|
1692
1693
|
|
|
1693
1694
|
/** Update fields in a given channel. */
|
|
@@ -10229,9 +10230,65 @@ export const Session = {
|
|
|
10229
10230
|
},
|
|
10230
10231
|
};
|
|
10231
10232
|
|
|
10233
|
+
function createBaseUpdateUsernameRequest(): UpdateUsernameRequest {
|
|
10234
|
+
return { username: "" };
|
|
10235
|
+
}
|
|
10236
|
+
|
|
10237
|
+
export const UpdateUsernameRequest = {
|
|
10238
|
+
encode(message: UpdateUsernameRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
10239
|
+
if (message.username !== "") {
|
|
10240
|
+
writer.uint32(10).string(message.username);
|
|
10241
|
+
}
|
|
10242
|
+
return writer;
|
|
10243
|
+
},
|
|
10244
|
+
|
|
10245
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUsernameRequest {
|
|
10246
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
10247
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
10248
|
+
const message = createBaseUpdateUsernameRequest();
|
|
10249
|
+
while (reader.pos < end) {
|
|
10250
|
+
const tag = reader.uint32();
|
|
10251
|
+
switch (tag >>> 3) {
|
|
10252
|
+
case 1:
|
|
10253
|
+
if (tag !== 10) {
|
|
10254
|
+
break;
|
|
10255
|
+
}
|
|
10256
|
+
|
|
10257
|
+
message.username = reader.string();
|
|
10258
|
+
continue;
|
|
10259
|
+
}
|
|
10260
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
10261
|
+
break;
|
|
10262
|
+
}
|
|
10263
|
+
reader.skipType(tag & 7);
|
|
10264
|
+
}
|
|
10265
|
+
return message;
|
|
10266
|
+
},
|
|
10267
|
+
|
|
10268
|
+
fromJSON(object: any): UpdateUsernameRequest {
|
|
10269
|
+
return { username: isSet(object.username) ? globalThis.String(object.username) : "" };
|
|
10270
|
+
},
|
|
10271
|
+
|
|
10272
|
+
toJSON(message: UpdateUsernameRequest): unknown {
|
|
10273
|
+
const obj: any = {};
|
|
10274
|
+
if (message.username !== "") {
|
|
10275
|
+
obj.username = message.username;
|
|
10276
|
+
}
|
|
10277
|
+
return obj;
|
|
10278
|
+
},
|
|
10279
|
+
|
|
10280
|
+
create<I extends Exact<DeepPartial<UpdateUsernameRequest>, I>>(base?: I): UpdateUsernameRequest {
|
|
10281
|
+
return UpdateUsernameRequest.fromPartial(base ?? ({} as any));
|
|
10282
|
+
},
|
|
10283
|
+
fromPartial<I extends Exact<DeepPartial<UpdateUsernameRequest>, I>>(object: I): UpdateUsernameRequest {
|
|
10284
|
+
const message = createBaseUpdateUsernameRequest();
|
|
10285
|
+
message.username = object.username ?? "";
|
|
10286
|
+
return message;
|
|
10287
|
+
},
|
|
10288
|
+
};
|
|
10289
|
+
|
|
10232
10290
|
function createBaseUpdateAccountRequest(): UpdateAccountRequest {
|
|
10233
10291
|
return {
|
|
10234
|
-
username: undefined,
|
|
10235
10292
|
display_name: undefined,
|
|
10236
10293
|
avatar_url: undefined,
|
|
10237
10294
|
lang_tag: undefined,
|
|
@@ -10248,41 +10305,38 @@ function createBaseUpdateAccountRequest(): UpdateAccountRequest {
|
|
|
10248
10305
|
|
|
10249
10306
|
export const UpdateAccountRequest = {
|
|
10250
10307
|
encode(message: UpdateAccountRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
10251
|
-
if (message.username !== undefined) {
|
|
10252
|
-
StringValue.encode({ value: message.username! }, writer.uint32(10).fork()).ldelim();
|
|
10253
|
-
}
|
|
10254
10308
|
if (message.display_name !== undefined) {
|
|
10255
|
-
StringValue.encode({ value: message.display_name! }, writer.uint32(
|
|
10309
|
+
StringValue.encode({ value: message.display_name! }, writer.uint32(10).fork()).ldelim();
|
|
10256
10310
|
}
|
|
10257
10311
|
if (message.avatar_url !== undefined) {
|
|
10258
|
-
StringValue.encode({ value: message.avatar_url! }, writer.uint32(
|
|
10312
|
+
StringValue.encode({ value: message.avatar_url! }, writer.uint32(18).fork()).ldelim();
|
|
10259
10313
|
}
|
|
10260
10314
|
if (message.lang_tag !== undefined) {
|
|
10261
|
-
StringValue.encode({ value: message.lang_tag! }, writer.uint32(
|
|
10315
|
+
StringValue.encode({ value: message.lang_tag! }, writer.uint32(26).fork()).ldelim();
|
|
10262
10316
|
}
|
|
10263
10317
|
if (message.location !== undefined) {
|
|
10264
|
-
StringValue.encode({ value: message.location! }, writer.uint32(
|
|
10318
|
+
StringValue.encode({ value: message.location! }, writer.uint32(34).fork()).ldelim();
|
|
10265
10319
|
}
|
|
10266
10320
|
if (message.timezone !== undefined) {
|
|
10267
|
-
StringValue.encode({ value: message.timezone! }, writer.uint32(
|
|
10321
|
+
StringValue.encode({ value: message.timezone! }, writer.uint32(42).fork()).ldelim();
|
|
10268
10322
|
}
|
|
10269
10323
|
if (message.about_me !== undefined) {
|
|
10270
|
-
StringValue.encode({ value: message.about_me! }, writer.uint32(
|
|
10324
|
+
StringValue.encode({ value: message.about_me! }, writer.uint32(50).fork()).ldelim();
|
|
10271
10325
|
}
|
|
10272
10326
|
if (message.dob !== undefined) {
|
|
10273
|
-
Timestamp.encode(toTimestamp(message.dob), writer.uint32(
|
|
10327
|
+
Timestamp.encode(toTimestamp(message.dob), writer.uint32(58).fork()).ldelim();
|
|
10274
10328
|
}
|
|
10275
10329
|
if (message.logo !== undefined) {
|
|
10276
|
-
StringValue.encode({ value: message.logo! }, writer.uint32(
|
|
10330
|
+
StringValue.encode({ value: message.logo! }, writer.uint32(66).fork()).ldelim();
|
|
10277
10331
|
}
|
|
10278
10332
|
if (message.splash_screen !== undefined) {
|
|
10279
|
-
StringValue.encode({ value: message.splash_screen! }, writer.uint32(
|
|
10333
|
+
StringValue.encode({ value: message.splash_screen! }, writer.uint32(74).fork()).ldelim();
|
|
10280
10334
|
}
|
|
10281
10335
|
if (message.encrypt_private_key !== "") {
|
|
10282
|
-
writer.uint32(
|
|
10336
|
+
writer.uint32(82).string(message.encrypt_private_key);
|
|
10283
10337
|
}
|
|
10284
10338
|
if (message.email !== undefined) {
|
|
10285
|
-
StringValue.encode({ value: message.email! }, writer.uint32(
|
|
10339
|
+
StringValue.encode({ value: message.email! }, writer.uint32(90).fork()).ldelim();
|
|
10286
10340
|
}
|
|
10287
10341
|
return writer;
|
|
10288
10342
|
},
|
|
@@ -10299,83 +10353,76 @@ export const UpdateAccountRequest = {
|
|
|
10299
10353
|
break;
|
|
10300
10354
|
}
|
|
10301
10355
|
|
|
10302
|
-
message.
|
|
10356
|
+
message.display_name = StringValue.decode(reader, reader.uint32()).value;
|
|
10303
10357
|
continue;
|
|
10304
10358
|
case 2:
|
|
10305
10359
|
if (tag !== 18) {
|
|
10306
10360
|
break;
|
|
10307
10361
|
}
|
|
10308
10362
|
|
|
10309
|
-
message.
|
|
10363
|
+
message.avatar_url = StringValue.decode(reader, reader.uint32()).value;
|
|
10310
10364
|
continue;
|
|
10311
10365
|
case 3:
|
|
10312
10366
|
if (tag !== 26) {
|
|
10313
10367
|
break;
|
|
10314
10368
|
}
|
|
10315
10369
|
|
|
10316
|
-
message.
|
|
10370
|
+
message.lang_tag = StringValue.decode(reader, reader.uint32()).value;
|
|
10317
10371
|
continue;
|
|
10318
10372
|
case 4:
|
|
10319
10373
|
if (tag !== 34) {
|
|
10320
10374
|
break;
|
|
10321
10375
|
}
|
|
10322
10376
|
|
|
10323
|
-
message.
|
|
10377
|
+
message.location = StringValue.decode(reader, reader.uint32()).value;
|
|
10324
10378
|
continue;
|
|
10325
10379
|
case 5:
|
|
10326
10380
|
if (tag !== 42) {
|
|
10327
10381
|
break;
|
|
10328
10382
|
}
|
|
10329
10383
|
|
|
10330
|
-
message.
|
|
10384
|
+
message.timezone = StringValue.decode(reader, reader.uint32()).value;
|
|
10331
10385
|
continue;
|
|
10332
10386
|
case 6:
|
|
10333
10387
|
if (tag !== 50) {
|
|
10334
10388
|
break;
|
|
10335
10389
|
}
|
|
10336
10390
|
|
|
10337
|
-
message.
|
|
10391
|
+
message.about_me = StringValue.decode(reader, reader.uint32()).value;
|
|
10338
10392
|
continue;
|
|
10339
10393
|
case 7:
|
|
10340
10394
|
if (tag !== 58) {
|
|
10341
10395
|
break;
|
|
10342
10396
|
}
|
|
10343
10397
|
|
|
10344
|
-
message.
|
|
10398
|
+
message.dob = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
10345
10399
|
continue;
|
|
10346
10400
|
case 8:
|
|
10347
10401
|
if (tag !== 66) {
|
|
10348
10402
|
break;
|
|
10349
10403
|
}
|
|
10350
10404
|
|
|
10351
|
-
message.
|
|
10405
|
+
message.logo = StringValue.decode(reader, reader.uint32()).value;
|
|
10352
10406
|
continue;
|
|
10353
10407
|
case 9:
|
|
10354
10408
|
if (tag !== 74) {
|
|
10355
10409
|
break;
|
|
10356
10410
|
}
|
|
10357
10411
|
|
|
10358
|
-
message.
|
|
10412
|
+
message.splash_screen = StringValue.decode(reader, reader.uint32()).value;
|
|
10359
10413
|
continue;
|
|
10360
10414
|
case 10:
|
|
10361
10415
|
if (tag !== 82) {
|
|
10362
10416
|
break;
|
|
10363
10417
|
}
|
|
10364
10418
|
|
|
10365
|
-
message.
|
|
10419
|
+
message.encrypt_private_key = reader.string();
|
|
10366
10420
|
continue;
|
|
10367
10421
|
case 11:
|
|
10368
10422
|
if (tag !== 90) {
|
|
10369
10423
|
break;
|
|
10370
10424
|
}
|
|
10371
10425
|
|
|
10372
|
-
message.encrypt_private_key = reader.string();
|
|
10373
|
-
continue;
|
|
10374
|
-
case 12:
|
|
10375
|
-
if (tag !== 98) {
|
|
10376
|
-
break;
|
|
10377
|
-
}
|
|
10378
|
-
|
|
10379
10426
|
message.email = StringValue.decode(reader, reader.uint32()).value;
|
|
10380
10427
|
continue;
|
|
10381
10428
|
}
|
|
@@ -10389,7 +10436,6 @@ export const UpdateAccountRequest = {
|
|
|
10389
10436
|
|
|
10390
10437
|
fromJSON(object: any): UpdateAccountRequest {
|
|
10391
10438
|
return {
|
|
10392
|
-
username: isSet(object.username) ? String(object.username) : undefined,
|
|
10393
10439
|
display_name: isSet(object.display_name) ? String(object.display_name) : undefined,
|
|
10394
10440
|
avatar_url: isSet(object.avatar_url) ? String(object.avatar_url) : undefined,
|
|
10395
10441
|
lang_tag: isSet(object.lang_tag) ? String(object.lang_tag) : undefined,
|
|
@@ -10406,9 +10452,6 @@ export const UpdateAccountRequest = {
|
|
|
10406
10452
|
|
|
10407
10453
|
toJSON(message: UpdateAccountRequest): unknown {
|
|
10408
10454
|
const obj: any = {};
|
|
10409
|
-
if (message.username !== undefined) {
|
|
10410
|
-
obj.username = message.username;
|
|
10411
|
-
}
|
|
10412
10455
|
if (message.display_name !== undefined) {
|
|
10413
10456
|
obj.display_name = message.display_name;
|
|
10414
10457
|
}
|
|
@@ -10450,7 +10493,6 @@ export const UpdateAccountRequest = {
|
|
|
10450
10493
|
},
|
|
10451
10494
|
fromPartial<I extends Exact<DeepPartial<UpdateAccountRequest>, I>>(object: I): UpdateAccountRequest {
|
|
10452
10495
|
const message = createBaseUpdateAccountRequest();
|
|
10453
|
-
message.username = object.username ?? undefined;
|
|
10454
10496
|
message.display_name = object.display_name ?? undefined;
|
|
10455
10497
|
message.avatar_url = object.avatar_url ?? undefined;
|
|
10456
10498
|
message.lang_tag = object.lang_tag ?? undefined;
|
|
@@ -15699,7 +15741,7 @@ function createBaseUpdateChannelDescRequest(): UpdateChannelDescRequest {
|
|
|
15699
15741
|
topic: "",
|
|
15700
15742
|
age_restricted: 0,
|
|
15701
15743
|
e2ee: 0,
|
|
15702
|
-
channel_avatar:
|
|
15744
|
+
channel_avatar: undefined,
|
|
15703
15745
|
};
|
|
15704
15746
|
}
|
|
15705
15747
|
|
|
@@ -15729,8 +15771,8 @@ export const UpdateChannelDescRequest = {
|
|
|
15729
15771
|
if (message.e2ee !== 0) {
|
|
15730
15772
|
writer.uint32(64).int32(message.e2ee);
|
|
15731
15773
|
}
|
|
15732
|
-
if (message.channel_avatar !==
|
|
15733
|
-
writer.uint32(74).
|
|
15774
|
+
if (message.channel_avatar !== undefined) {
|
|
15775
|
+
StringValue.encode({ value: message.channel_avatar! }, writer.uint32(74).fork()).ldelim();
|
|
15734
15776
|
}
|
|
15735
15777
|
return writer;
|
|
15736
15778
|
},
|
|
@@ -15803,7 +15845,7 @@ export const UpdateChannelDescRequest = {
|
|
|
15803
15845
|
break;
|
|
15804
15846
|
}
|
|
15805
15847
|
|
|
15806
|
-
message.channel_avatar = reader.
|
|
15848
|
+
message.channel_avatar = StringValue.decode(reader, reader.uint32()).value;
|
|
15807
15849
|
continue;
|
|
15808
15850
|
}
|
|
15809
15851
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -15824,7 +15866,7 @@ export const UpdateChannelDescRequest = {
|
|
|
15824
15866
|
topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
|
|
15825
15867
|
age_restricted: isSet(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
|
|
15826
15868
|
e2ee: isSet(object.e2ee) ? globalThis.Number(object.e2ee) : 0,
|
|
15827
|
-
channel_avatar: isSet(object.channel_avatar) ?
|
|
15869
|
+
channel_avatar: isSet(object.channel_avatar) ? String(object.channel_avatar) : undefined,
|
|
15828
15870
|
};
|
|
15829
15871
|
},
|
|
15830
15872
|
|
|
@@ -15854,7 +15896,7 @@ export const UpdateChannelDescRequest = {
|
|
|
15854
15896
|
if (message.e2ee !== 0) {
|
|
15855
15897
|
obj.e2ee = Math.round(message.e2ee);
|
|
15856
15898
|
}
|
|
15857
|
-
if (message.channel_avatar !==
|
|
15899
|
+
if (message.channel_avatar !== undefined) {
|
|
15858
15900
|
obj.channel_avatar = message.channel_avatar;
|
|
15859
15901
|
}
|
|
15860
15902
|
return obj;
|
|
@@ -15873,7 +15915,7 @@ export const UpdateChannelDescRequest = {
|
|
|
15873
15915
|
message.topic = object.topic ?? "";
|
|
15874
15916
|
message.age_restricted = object.age_restricted ?? 0;
|
|
15875
15917
|
message.e2ee = object.e2ee ?? 0;
|
|
15876
|
-
message.channel_avatar = object.channel_avatar ??
|
|
15918
|
+
message.channel_avatar = object.channel_avatar ?? undefined;
|
|
15877
15919
|
return message;
|
|
15878
15920
|
},
|
|
15879
15921
|
};
|
|
@@ -735,10 +735,12 @@ export interface Session {
|
|
|
735
735
|
/** Whether to enable "Remember Me" for extended session duration. */
|
|
736
736
|
is_remember: boolean;
|
|
737
737
|
}
|
|
738
|
+
/** Update username */
|
|
739
|
+
export interface UpdateUsernameRequest {
|
|
740
|
+
username: string;
|
|
741
|
+
}
|
|
738
742
|
/** Update a user's account details. */
|
|
739
743
|
export interface UpdateAccountRequest {
|
|
740
|
-
/** The username of the user's account. */
|
|
741
|
-
username: string | undefined;
|
|
742
744
|
/** The display name of the user. */
|
|
743
745
|
display_name: string | undefined;
|
|
744
746
|
/** A URL for an avatar image. */
|
|
@@ -1294,7 +1296,7 @@ export interface UpdateChannelDescRequest {
|
|
|
1294
1296
|
/** */
|
|
1295
1297
|
e2ee: number;
|
|
1296
1298
|
/** channel avatar */
|
|
1297
|
-
channel_avatar: string;
|
|
1299
|
+
channel_avatar: string | undefined;
|
|
1298
1300
|
}
|
|
1299
1301
|
/** Update fields in a given channel. */
|
|
1300
1302
|
export interface ChangeChannelPrivateRequest {
|
|
@@ -7992,13 +7994,28 @@ export declare const Session: {
|
|
|
7992
7994
|
is_remember?: boolean | undefined;
|
|
7993
7995
|
} & { [K_1 in Exclude<keyof I_1, keyof Session>]: never; }>(object: I_1): Session;
|
|
7994
7996
|
};
|
|
7997
|
+
export declare const UpdateUsernameRequest: {
|
|
7998
|
+
encode(message: UpdateUsernameRequest, writer?: _m0.Writer): _m0.Writer;
|
|
7999
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUsernameRequest;
|
|
8000
|
+
fromJSON(object: any): UpdateUsernameRequest;
|
|
8001
|
+
toJSON(message: UpdateUsernameRequest): unknown;
|
|
8002
|
+
create<I extends {
|
|
8003
|
+
username?: string | undefined;
|
|
8004
|
+
} & {
|
|
8005
|
+
username?: string | undefined;
|
|
8006
|
+
} & { [K in Exclude<keyof I, "username">]: never; }>(base?: I | undefined): UpdateUsernameRequest;
|
|
8007
|
+
fromPartial<I_1 extends {
|
|
8008
|
+
username?: string | undefined;
|
|
8009
|
+
} & {
|
|
8010
|
+
username?: string | undefined;
|
|
8011
|
+
} & { [K_1 in Exclude<keyof I_1, "username">]: never; }>(object: I_1): UpdateUsernameRequest;
|
|
8012
|
+
};
|
|
7995
8013
|
export declare const UpdateAccountRequest: {
|
|
7996
8014
|
encode(message: UpdateAccountRequest, writer?: _m0.Writer): _m0.Writer;
|
|
7997
8015
|
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateAccountRequest;
|
|
7998
8016
|
fromJSON(object: any): UpdateAccountRequest;
|
|
7999
8017
|
toJSON(message: UpdateAccountRequest): unknown;
|
|
8000
8018
|
create<I extends {
|
|
8001
|
-
username?: string | undefined;
|
|
8002
8019
|
display_name?: string | undefined;
|
|
8003
8020
|
avatar_url?: string | undefined;
|
|
8004
8021
|
lang_tag?: string | undefined;
|
|
@@ -8011,7 +8028,6 @@ export declare const UpdateAccountRequest: {
|
|
|
8011
8028
|
encrypt_private_key?: string | undefined;
|
|
8012
8029
|
email?: string | undefined;
|
|
8013
8030
|
} & {
|
|
8014
|
-
username?: string | undefined;
|
|
8015
8031
|
display_name?: string | undefined;
|
|
8016
8032
|
avatar_url?: string | undefined;
|
|
8017
8033
|
lang_tag?: string | undefined;
|
|
@@ -8025,7 +8041,6 @@ export declare const UpdateAccountRequest: {
|
|
|
8025
8041
|
email?: string | undefined;
|
|
8026
8042
|
} & { [K in Exclude<keyof I, keyof UpdateAccountRequest>]: never; }>(base?: I | undefined): UpdateAccountRequest;
|
|
8027
8043
|
fromPartial<I_1 extends {
|
|
8028
|
-
username?: string | undefined;
|
|
8029
8044
|
display_name?: string | undefined;
|
|
8030
8045
|
avatar_url?: string | undefined;
|
|
8031
8046
|
lang_tag?: string | undefined;
|
|
@@ -8038,7 +8053,6 @@ export declare const UpdateAccountRequest: {
|
|
|
8038
8053
|
encrypt_private_key?: string | undefined;
|
|
8039
8054
|
email?: string | undefined;
|
|
8040
8055
|
} & {
|
|
8041
|
-
username?: string | undefined;
|
|
8042
8056
|
display_name?: string | undefined;
|
|
8043
8057
|
avatar_url?: string | undefined;
|
|
8044
8058
|
lang_tag?: string | undefined;
|