mezon-js-protobuf 1.6.28 → 1.6.30
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 +303 -45
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +252 -0
- package/dist/mezon-js-protobuf.cjs.js +43 -6
- package/dist/mezon-js-protobuf.esm.mjs +43 -6
- package/package.json +1 -1
- package/rtapi/realtime.ts +180 -2
package/api/api.ts
CHANGED
|
@@ -3513,8 +3513,10 @@ export interface OnboardingItem {
|
|
|
3513
3513
|
title: string;
|
|
3514
3514
|
/** content */
|
|
3515
3515
|
content: string;
|
|
3516
|
+
/** image */
|
|
3517
|
+
image_url: string;
|
|
3516
3518
|
/** answers */
|
|
3517
|
-
answers:
|
|
3519
|
+
answers: OnboardingAnswer[];
|
|
3518
3520
|
/** The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created. */
|
|
3519
3521
|
create_time:
|
|
3520
3522
|
| Date
|
|
@@ -3523,13 +3525,15 @@ export interface OnboardingItem {
|
|
|
3523
3525
|
update_time: Date | undefined;
|
|
3524
3526
|
}
|
|
3525
3527
|
|
|
3526
|
-
export interface
|
|
3528
|
+
export interface OnboardingAnswer {
|
|
3527
3529
|
/** title */
|
|
3528
3530
|
title: string;
|
|
3529
3531
|
/** description */
|
|
3530
3532
|
description: string;
|
|
3531
|
-
/**
|
|
3532
|
-
|
|
3533
|
+
/** emoji */
|
|
3534
|
+
emoji: string;
|
|
3535
|
+
/** image */
|
|
3536
|
+
image_url: string;
|
|
3533
3537
|
}
|
|
3534
3538
|
|
|
3535
3539
|
export interface OnboardingContent {
|
|
@@ -3543,8 +3547,10 @@ export interface OnboardingContent {
|
|
|
3543
3547
|
title: string;
|
|
3544
3548
|
/** content */
|
|
3545
3549
|
content: string;
|
|
3550
|
+
/** image */
|
|
3551
|
+
image_url: string;
|
|
3546
3552
|
/** answers */
|
|
3547
|
-
answers:
|
|
3553
|
+
answers: OnboardingAnswer[];
|
|
3548
3554
|
}
|
|
3549
3555
|
|
|
3550
3556
|
export interface CreateOnboardingRequest {
|
|
@@ -3569,8 +3575,10 @@ export interface UpdateOnboardingRequest {
|
|
|
3569
3575
|
title: string;
|
|
3570
3576
|
/** content */
|
|
3571
3577
|
content: string;
|
|
3578
|
+
/** image */
|
|
3579
|
+
image_url: string;
|
|
3572
3580
|
/** answers */
|
|
3573
|
-
answers:
|
|
3581
|
+
answers: OnboardingAnswer[];
|
|
3574
3582
|
}
|
|
3575
3583
|
|
|
3576
3584
|
export interface OnboardingRequest {
|
|
@@ -3669,6 +3677,17 @@ export interface ClanWebhookHandlerRequest {
|
|
|
3669
3677
|
username: string;
|
|
3670
3678
|
}
|
|
3671
3679
|
|
|
3680
|
+
export interface UserStatus {
|
|
3681
|
+
user_id: string;
|
|
3682
|
+
status: string;
|
|
3683
|
+
}
|
|
3684
|
+
|
|
3685
|
+
export interface UserStatusUpdate {
|
|
3686
|
+
status: string;
|
|
3687
|
+
minutes: number;
|
|
3688
|
+
until_turn_on: boolean;
|
|
3689
|
+
}
|
|
3690
|
+
|
|
3672
3691
|
export interface OnboardingSteps {
|
|
3673
3692
|
/** id. */
|
|
3674
3693
|
id: string;
|
|
@@ -33857,6 +33876,7 @@ function createBaseOnboardingItem(): OnboardingItem {
|
|
|
33857
33876
|
channel_id: "",
|
|
33858
33877
|
title: "",
|
|
33859
33878
|
content: "",
|
|
33879
|
+
image_url: "",
|
|
33860
33880
|
answers: [],
|
|
33861
33881
|
create_time: undefined,
|
|
33862
33882
|
update_time: undefined,
|
|
@@ -33886,14 +33906,17 @@ export const OnboardingItem = {
|
|
|
33886
33906
|
if (message.content !== "") {
|
|
33887
33907
|
writer.uint32(58).string(message.content);
|
|
33888
33908
|
}
|
|
33909
|
+
if (message.image_url !== "") {
|
|
33910
|
+
writer.uint32(66).string(message.image_url);
|
|
33911
|
+
}
|
|
33889
33912
|
for (const v of message.answers) {
|
|
33890
|
-
|
|
33913
|
+
OnboardingAnswer.encode(v!, writer.uint32(74).fork()).ldelim();
|
|
33891
33914
|
}
|
|
33892
33915
|
if (message.create_time !== undefined) {
|
|
33893
|
-
Timestamp.encode(toTimestamp(message.create_time), writer.uint32(
|
|
33916
|
+
Timestamp.encode(toTimestamp(message.create_time), writer.uint32(82).fork()).ldelim();
|
|
33894
33917
|
}
|
|
33895
33918
|
if (message.update_time !== undefined) {
|
|
33896
|
-
Timestamp.encode(toTimestamp(message.update_time), writer.uint32(
|
|
33919
|
+
Timestamp.encode(toTimestamp(message.update_time), writer.uint32(90).fork()).ldelim();
|
|
33897
33920
|
}
|
|
33898
33921
|
return writer;
|
|
33899
33922
|
},
|
|
@@ -33959,20 +33982,27 @@ export const OnboardingItem = {
|
|
|
33959
33982
|
break;
|
|
33960
33983
|
}
|
|
33961
33984
|
|
|
33962
|
-
message.
|
|
33985
|
+
message.image_url = reader.string();
|
|
33963
33986
|
continue;
|
|
33964
33987
|
case 9:
|
|
33965
33988
|
if (tag !== 74) {
|
|
33966
33989
|
break;
|
|
33967
33990
|
}
|
|
33968
33991
|
|
|
33969
|
-
message.
|
|
33992
|
+
message.answers.push(OnboardingAnswer.decode(reader, reader.uint32()));
|
|
33970
33993
|
continue;
|
|
33971
33994
|
case 10:
|
|
33972
33995
|
if (tag !== 82) {
|
|
33973
33996
|
break;
|
|
33974
33997
|
}
|
|
33975
33998
|
|
|
33999
|
+
message.create_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
34000
|
+
continue;
|
|
34001
|
+
case 11:
|
|
34002
|
+
if (tag !== 90) {
|
|
34003
|
+
break;
|
|
34004
|
+
}
|
|
34005
|
+
|
|
33976
34006
|
message.update_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
33977
34007
|
continue;
|
|
33978
34008
|
}
|
|
@@ -33993,7 +34023,10 @@ export const OnboardingItem = {
|
|
|
33993
34023
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
33994
34024
|
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
33995
34025
|
content: isSet(object.content) ? globalThis.String(object.content) : "",
|
|
33996
|
-
|
|
34026
|
+
image_url: isSet(object.image_url) ? globalThis.String(object.image_url) : "",
|
|
34027
|
+
answers: globalThis.Array.isArray(object?.answers)
|
|
34028
|
+
? object.answers.map((e: any) => OnboardingAnswer.fromJSON(e))
|
|
34029
|
+
: [],
|
|
33997
34030
|
create_time: isSet(object.create_time) ? fromJsonTimestamp(object.create_time) : undefined,
|
|
33998
34031
|
update_time: isSet(object.update_time) ? fromJsonTimestamp(object.update_time) : undefined,
|
|
33999
34032
|
};
|
|
@@ -34022,8 +34055,11 @@ export const OnboardingItem = {
|
|
|
34022
34055
|
if (message.content !== "") {
|
|
34023
34056
|
obj.content = message.content;
|
|
34024
34057
|
}
|
|
34058
|
+
if (message.image_url !== "") {
|
|
34059
|
+
obj.image_url = message.image_url;
|
|
34060
|
+
}
|
|
34025
34061
|
if (message.answers?.length) {
|
|
34026
|
-
obj.answers = message.answers.map((e) =>
|
|
34062
|
+
obj.answers = message.answers.map((e) => OnboardingAnswer.toJSON(e));
|
|
34027
34063
|
}
|
|
34028
34064
|
if (message.create_time !== undefined) {
|
|
34029
34065
|
obj.create_time = message.create_time.toISOString();
|
|
@@ -34046,35 +34082,39 @@ export const OnboardingItem = {
|
|
|
34046
34082
|
message.channel_id = object.channel_id ?? "";
|
|
34047
34083
|
message.title = object.title ?? "";
|
|
34048
34084
|
message.content = object.content ?? "";
|
|
34049
|
-
message.
|
|
34085
|
+
message.image_url = object.image_url ?? "";
|
|
34086
|
+
message.answers = object.answers?.map((e) => OnboardingAnswer.fromPartial(e)) || [];
|
|
34050
34087
|
message.create_time = object.create_time ?? undefined;
|
|
34051
34088
|
message.update_time = object.update_time ?? undefined;
|
|
34052
34089
|
return message;
|
|
34053
34090
|
},
|
|
34054
34091
|
};
|
|
34055
34092
|
|
|
34056
|
-
function
|
|
34057
|
-
return { title: "", description: "",
|
|
34093
|
+
function createBaseOnboardingAnswer(): OnboardingAnswer {
|
|
34094
|
+
return { title: "", description: "", emoji: "", image_url: "" };
|
|
34058
34095
|
}
|
|
34059
34096
|
|
|
34060
|
-
export const
|
|
34061
|
-
encode(message:
|
|
34097
|
+
export const OnboardingAnswer = {
|
|
34098
|
+
encode(message: OnboardingAnswer, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
34062
34099
|
if (message.title !== "") {
|
|
34063
34100
|
writer.uint32(10).string(message.title);
|
|
34064
34101
|
}
|
|
34065
34102
|
if (message.description !== "") {
|
|
34066
34103
|
writer.uint32(18).string(message.description);
|
|
34067
34104
|
}
|
|
34068
|
-
if (message.
|
|
34069
|
-
writer.uint32(26).string(message.
|
|
34105
|
+
if (message.emoji !== "") {
|
|
34106
|
+
writer.uint32(26).string(message.emoji);
|
|
34107
|
+
}
|
|
34108
|
+
if (message.image_url !== "") {
|
|
34109
|
+
writer.uint32(34).string(message.image_url);
|
|
34070
34110
|
}
|
|
34071
34111
|
return writer;
|
|
34072
34112
|
},
|
|
34073
34113
|
|
|
34074
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
34114
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): OnboardingAnswer {
|
|
34075
34115
|
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
34076
34116
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
34077
|
-
const message =
|
|
34117
|
+
const message = createBaseOnboardingAnswer();
|
|
34078
34118
|
while (reader.pos < end) {
|
|
34079
34119
|
const tag = reader.uint32();
|
|
34080
34120
|
switch (tag >>> 3) {
|
|
@@ -34097,7 +34137,14 @@ export const Answer = {
|
|
|
34097
34137
|
break;
|
|
34098
34138
|
}
|
|
34099
34139
|
|
|
34100
|
-
message.
|
|
34140
|
+
message.emoji = reader.string();
|
|
34141
|
+
continue;
|
|
34142
|
+
case 4:
|
|
34143
|
+
if (tag !== 34) {
|
|
34144
|
+
break;
|
|
34145
|
+
}
|
|
34146
|
+
|
|
34147
|
+
message.image_url = reader.string();
|
|
34101
34148
|
continue;
|
|
34102
34149
|
}
|
|
34103
34150
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -34108,15 +34155,16 @@ export const Answer = {
|
|
|
34108
34155
|
return message;
|
|
34109
34156
|
},
|
|
34110
34157
|
|
|
34111
|
-
fromJSON(object: any):
|
|
34158
|
+
fromJSON(object: any): OnboardingAnswer {
|
|
34112
34159
|
return {
|
|
34113
34160
|
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
34114
34161
|
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
34115
|
-
|
|
34162
|
+
emoji: isSet(object.emoji) ? globalThis.String(object.emoji) : "",
|
|
34163
|
+
image_url: isSet(object.image_url) ? globalThis.String(object.image_url) : "",
|
|
34116
34164
|
};
|
|
34117
34165
|
},
|
|
34118
34166
|
|
|
34119
|
-
toJSON(message:
|
|
34167
|
+
toJSON(message: OnboardingAnswer): unknown {
|
|
34120
34168
|
const obj: any = {};
|
|
34121
34169
|
if (message.title !== "") {
|
|
34122
34170
|
obj.title = message.title;
|
|
@@ -34124,26 +34172,30 @@ export const Answer = {
|
|
|
34124
34172
|
if (message.description !== "") {
|
|
34125
34173
|
obj.description = message.description;
|
|
34126
34174
|
}
|
|
34127
|
-
if (message.
|
|
34128
|
-
obj.
|
|
34175
|
+
if (message.emoji !== "") {
|
|
34176
|
+
obj.emoji = message.emoji;
|
|
34177
|
+
}
|
|
34178
|
+
if (message.image_url !== "") {
|
|
34179
|
+
obj.image_url = message.image_url;
|
|
34129
34180
|
}
|
|
34130
34181
|
return obj;
|
|
34131
34182
|
},
|
|
34132
34183
|
|
|
34133
|
-
create<I extends Exact<DeepPartial<
|
|
34134
|
-
return
|
|
34184
|
+
create<I extends Exact<DeepPartial<OnboardingAnswer>, I>>(base?: I): OnboardingAnswer {
|
|
34185
|
+
return OnboardingAnswer.fromPartial(base ?? ({} as any));
|
|
34135
34186
|
},
|
|
34136
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
34137
|
-
const message =
|
|
34187
|
+
fromPartial<I extends Exact<DeepPartial<OnboardingAnswer>, I>>(object: I): OnboardingAnswer {
|
|
34188
|
+
const message = createBaseOnboardingAnswer();
|
|
34138
34189
|
message.title = object.title ?? "";
|
|
34139
34190
|
message.description = object.description ?? "";
|
|
34140
|
-
message.
|
|
34191
|
+
message.emoji = object.emoji ?? "";
|
|
34192
|
+
message.image_url = object.image_url ?? "";
|
|
34141
34193
|
return message;
|
|
34142
34194
|
},
|
|
34143
34195
|
};
|
|
34144
34196
|
|
|
34145
34197
|
function createBaseOnboardingContent(): OnboardingContent {
|
|
34146
|
-
return { guide_type: 0, task_type: 0, channel_id: "", title: "", content: "", answers: [] };
|
|
34198
|
+
return { guide_type: 0, task_type: 0, channel_id: "", title: "", content: "", image_url: "", answers: [] };
|
|
34147
34199
|
}
|
|
34148
34200
|
|
|
34149
34201
|
export const OnboardingContent = {
|
|
@@ -34163,8 +34215,11 @@ export const OnboardingContent = {
|
|
|
34163
34215
|
if (message.content !== "") {
|
|
34164
34216
|
writer.uint32(42).string(message.content);
|
|
34165
34217
|
}
|
|
34218
|
+
if (message.image_url !== "") {
|
|
34219
|
+
writer.uint32(50).string(message.image_url);
|
|
34220
|
+
}
|
|
34166
34221
|
for (const v of message.answers) {
|
|
34167
|
-
|
|
34222
|
+
OnboardingAnswer.encode(v!, writer.uint32(58).fork()).ldelim();
|
|
34168
34223
|
}
|
|
34169
34224
|
return writer;
|
|
34170
34225
|
},
|
|
@@ -34216,7 +34271,14 @@ export const OnboardingContent = {
|
|
|
34216
34271
|
break;
|
|
34217
34272
|
}
|
|
34218
34273
|
|
|
34219
|
-
message.
|
|
34274
|
+
message.image_url = reader.string();
|
|
34275
|
+
continue;
|
|
34276
|
+
case 7:
|
|
34277
|
+
if (tag !== 58) {
|
|
34278
|
+
break;
|
|
34279
|
+
}
|
|
34280
|
+
|
|
34281
|
+
message.answers.push(OnboardingAnswer.decode(reader, reader.uint32()));
|
|
34220
34282
|
continue;
|
|
34221
34283
|
}
|
|
34222
34284
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -34234,7 +34296,10 @@ export const OnboardingContent = {
|
|
|
34234
34296
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
34235
34297
|
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
34236
34298
|
content: isSet(object.content) ? globalThis.String(object.content) : "",
|
|
34237
|
-
|
|
34299
|
+
image_url: isSet(object.image_url) ? globalThis.String(object.image_url) : "",
|
|
34300
|
+
answers: globalThis.Array.isArray(object?.answers)
|
|
34301
|
+
? object.answers.map((e: any) => OnboardingAnswer.fromJSON(e))
|
|
34302
|
+
: [],
|
|
34238
34303
|
};
|
|
34239
34304
|
},
|
|
34240
34305
|
|
|
@@ -34255,8 +34320,11 @@ export const OnboardingContent = {
|
|
|
34255
34320
|
if (message.content !== "") {
|
|
34256
34321
|
obj.content = message.content;
|
|
34257
34322
|
}
|
|
34323
|
+
if (message.image_url !== "") {
|
|
34324
|
+
obj.image_url = message.image_url;
|
|
34325
|
+
}
|
|
34258
34326
|
if (message.answers?.length) {
|
|
34259
|
-
obj.answers = message.answers.map((e) =>
|
|
34327
|
+
obj.answers = message.answers.map((e) => OnboardingAnswer.toJSON(e));
|
|
34260
34328
|
}
|
|
34261
34329
|
return obj;
|
|
34262
34330
|
},
|
|
@@ -34271,7 +34339,8 @@ export const OnboardingContent = {
|
|
|
34271
34339
|
message.channel_id = object.channel_id ?? "";
|
|
34272
34340
|
message.title = object.title ?? "";
|
|
34273
34341
|
message.content = object.content ?? "";
|
|
34274
|
-
message.
|
|
34342
|
+
message.image_url = object.image_url ?? "";
|
|
34343
|
+
message.answers = object.answers?.map((e) => OnboardingAnswer.fromPartial(e)) || [];
|
|
34275
34344
|
return message;
|
|
34276
34345
|
},
|
|
34277
34346
|
};
|
|
@@ -34353,7 +34422,16 @@ export const CreateOnboardingRequest = {
|
|
|
34353
34422
|
};
|
|
34354
34423
|
|
|
34355
34424
|
function createBaseUpdateOnboardingRequest(): UpdateOnboardingRequest {
|
|
34356
|
-
return {
|
|
34425
|
+
return {
|
|
34426
|
+
id: "",
|
|
34427
|
+
clan_id: "",
|
|
34428
|
+
task_type: undefined,
|
|
34429
|
+
channel_id: "",
|
|
34430
|
+
title: "",
|
|
34431
|
+
content: "",
|
|
34432
|
+
image_url: "",
|
|
34433
|
+
answers: [],
|
|
34434
|
+
};
|
|
34357
34435
|
}
|
|
34358
34436
|
|
|
34359
34437
|
export const UpdateOnboardingRequest = {
|
|
@@ -34376,8 +34454,11 @@ export const UpdateOnboardingRequest = {
|
|
|
34376
34454
|
if (message.content !== "") {
|
|
34377
34455
|
writer.uint32(50).string(message.content);
|
|
34378
34456
|
}
|
|
34457
|
+
if (message.image_url !== "") {
|
|
34458
|
+
writer.uint32(58).string(message.image_url);
|
|
34459
|
+
}
|
|
34379
34460
|
for (const v of message.answers) {
|
|
34380
|
-
|
|
34461
|
+
OnboardingAnswer.encode(v!, writer.uint32(66).fork()).ldelim();
|
|
34381
34462
|
}
|
|
34382
34463
|
return writer;
|
|
34383
34464
|
},
|
|
@@ -34436,7 +34517,14 @@ export const UpdateOnboardingRequest = {
|
|
|
34436
34517
|
break;
|
|
34437
34518
|
}
|
|
34438
34519
|
|
|
34439
|
-
message.
|
|
34520
|
+
message.image_url = reader.string();
|
|
34521
|
+
continue;
|
|
34522
|
+
case 8:
|
|
34523
|
+
if (tag !== 66) {
|
|
34524
|
+
break;
|
|
34525
|
+
}
|
|
34526
|
+
|
|
34527
|
+
message.answers.push(OnboardingAnswer.decode(reader, reader.uint32()));
|
|
34440
34528
|
continue;
|
|
34441
34529
|
}
|
|
34442
34530
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -34455,7 +34543,10 @@ export const UpdateOnboardingRequest = {
|
|
|
34455
34543
|
channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
34456
34544
|
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
34457
34545
|
content: isSet(object.content) ? globalThis.String(object.content) : "",
|
|
34458
|
-
|
|
34546
|
+
image_url: isSet(object.image_url) ? globalThis.String(object.image_url) : "",
|
|
34547
|
+
answers: globalThis.Array.isArray(object?.answers)
|
|
34548
|
+
? object.answers.map((e: any) => OnboardingAnswer.fromJSON(e))
|
|
34549
|
+
: [],
|
|
34459
34550
|
};
|
|
34460
34551
|
},
|
|
34461
34552
|
|
|
@@ -34479,8 +34570,11 @@ export const UpdateOnboardingRequest = {
|
|
|
34479
34570
|
if (message.content !== "") {
|
|
34480
34571
|
obj.content = message.content;
|
|
34481
34572
|
}
|
|
34573
|
+
if (message.image_url !== "") {
|
|
34574
|
+
obj.image_url = message.image_url;
|
|
34575
|
+
}
|
|
34482
34576
|
if (message.answers?.length) {
|
|
34483
|
-
obj.answers = message.answers.map((e) =>
|
|
34577
|
+
obj.answers = message.answers.map((e) => OnboardingAnswer.toJSON(e));
|
|
34484
34578
|
}
|
|
34485
34579
|
return obj;
|
|
34486
34580
|
},
|
|
@@ -34496,7 +34590,8 @@ export const UpdateOnboardingRequest = {
|
|
|
34496
34590
|
message.channel_id = object.channel_id ?? "";
|
|
34497
34591
|
message.title = object.title ?? "";
|
|
34498
34592
|
message.content = object.content ?? "";
|
|
34499
|
-
message.
|
|
34593
|
+
message.image_url = object.image_url ?? "";
|
|
34594
|
+
message.answers = object.answers?.map((e) => OnboardingAnswer.fromPartial(e)) || [];
|
|
34500
34595
|
return message;
|
|
34501
34596
|
},
|
|
34502
34597
|
};
|
|
@@ -35435,6 +35530,169 @@ export const ClanWebhookHandlerRequest = {
|
|
|
35435
35530
|
},
|
|
35436
35531
|
};
|
|
35437
35532
|
|
|
35533
|
+
function createBaseUserStatus(): UserStatus {
|
|
35534
|
+
return { user_id: "", status: "" };
|
|
35535
|
+
}
|
|
35536
|
+
|
|
35537
|
+
export const UserStatus = {
|
|
35538
|
+
encode(message: UserStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
35539
|
+
if (message.user_id !== "") {
|
|
35540
|
+
writer.uint32(10).string(message.user_id);
|
|
35541
|
+
}
|
|
35542
|
+
if (message.status !== "") {
|
|
35543
|
+
writer.uint32(18).string(message.status);
|
|
35544
|
+
}
|
|
35545
|
+
return writer;
|
|
35546
|
+
},
|
|
35547
|
+
|
|
35548
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): UserStatus {
|
|
35549
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
35550
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
35551
|
+
const message = createBaseUserStatus();
|
|
35552
|
+
while (reader.pos < end) {
|
|
35553
|
+
const tag = reader.uint32();
|
|
35554
|
+
switch (tag >>> 3) {
|
|
35555
|
+
case 1:
|
|
35556
|
+
if (tag !== 10) {
|
|
35557
|
+
break;
|
|
35558
|
+
}
|
|
35559
|
+
|
|
35560
|
+
message.user_id = reader.string();
|
|
35561
|
+
continue;
|
|
35562
|
+
case 2:
|
|
35563
|
+
if (tag !== 18) {
|
|
35564
|
+
break;
|
|
35565
|
+
}
|
|
35566
|
+
|
|
35567
|
+
message.status = reader.string();
|
|
35568
|
+
continue;
|
|
35569
|
+
}
|
|
35570
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
35571
|
+
break;
|
|
35572
|
+
}
|
|
35573
|
+
reader.skipType(tag & 7);
|
|
35574
|
+
}
|
|
35575
|
+
return message;
|
|
35576
|
+
},
|
|
35577
|
+
|
|
35578
|
+
fromJSON(object: any): UserStatus {
|
|
35579
|
+
return {
|
|
35580
|
+
user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
35581
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
35582
|
+
};
|
|
35583
|
+
},
|
|
35584
|
+
|
|
35585
|
+
toJSON(message: UserStatus): unknown {
|
|
35586
|
+
const obj: any = {};
|
|
35587
|
+
if (message.user_id !== "") {
|
|
35588
|
+
obj.user_id = message.user_id;
|
|
35589
|
+
}
|
|
35590
|
+
if (message.status !== "") {
|
|
35591
|
+
obj.status = message.status;
|
|
35592
|
+
}
|
|
35593
|
+
return obj;
|
|
35594
|
+
},
|
|
35595
|
+
|
|
35596
|
+
create<I extends Exact<DeepPartial<UserStatus>, I>>(base?: I): UserStatus {
|
|
35597
|
+
return UserStatus.fromPartial(base ?? ({} as any));
|
|
35598
|
+
},
|
|
35599
|
+
fromPartial<I extends Exact<DeepPartial<UserStatus>, I>>(object: I): UserStatus {
|
|
35600
|
+
const message = createBaseUserStatus();
|
|
35601
|
+
message.user_id = object.user_id ?? "";
|
|
35602
|
+
message.status = object.status ?? "";
|
|
35603
|
+
return message;
|
|
35604
|
+
},
|
|
35605
|
+
};
|
|
35606
|
+
|
|
35607
|
+
function createBaseUserStatusUpdate(): UserStatusUpdate {
|
|
35608
|
+
return { status: "", minutes: 0, until_turn_on: false };
|
|
35609
|
+
}
|
|
35610
|
+
|
|
35611
|
+
export const UserStatusUpdate = {
|
|
35612
|
+
encode(message: UserStatusUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
35613
|
+
if (message.status !== "") {
|
|
35614
|
+
writer.uint32(10).string(message.status);
|
|
35615
|
+
}
|
|
35616
|
+
if (message.minutes !== 0) {
|
|
35617
|
+
writer.uint32(16).int32(message.minutes);
|
|
35618
|
+
}
|
|
35619
|
+
if (message.until_turn_on !== false) {
|
|
35620
|
+
writer.uint32(24).bool(message.until_turn_on);
|
|
35621
|
+
}
|
|
35622
|
+
return writer;
|
|
35623
|
+
},
|
|
35624
|
+
|
|
35625
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): UserStatusUpdate {
|
|
35626
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
35627
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
35628
|
+
const message = createBaseUserStatusUpdate();
|
|
35629
|
+
while (reader.pos < end) {
|
|
35630
|
+
const tag = reader.uint32();
|
|
35631
|
+
switch (tag >>> 3) {
|
|
35632
|
+
case 1:
|
|
35633
|
+
if (tag !== 10) {
|
|
35634
|
+
break;
|
|
35635
|
+
}
|
|
35636
|
+
|
|
35637
|
+
message.status = reader.string();
|
|
35638
|
+
continue;
|
|
35639
|
+
case 2:
|
|
35640
|
+
if (tag !== 16) {
|
|
35641
|
+
break;
|
|
35642
|
+
}
|
|
35643
|
+
|
|
35644
|
+
message.minutes = reader.int32();
|
|
35645
|
+
continue;
|
|
35646
|
+
case 3:
|
|
35647
|
+
if (tag !== 24) {
|
|
35648
|
+
break;
|
|
35649
|
+
}
|
|
35650
|
+
|
|
35651
|
+
message.until_turn_on = reader.bool();
|
|
35652
|
+
continue;
|
|
35653
|
+
}
|
|
35654
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
35655
|
+
break;
|
|
35656
|
+
}
|
|
35657
|
+
reader.skipType(tag & 7);
|
|
35658
|
+
}
|
|
35659
|
+
return message;
|
|
35660
|
+
},
|
|
35661
|
+
|
|
35662
|
+
fromJSON(object: any): UserStatusUpdate {
|
|
35663
|
+
return {
|
|
35664
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
35665
|
+
minutes: isSet(object.minutes) ? globalThis.Number(object.minutes) : 0,
|
|
35666
|
+
until_turn_on: isSet(object.until_turn_on) ? globalThis.Boolean(object.until_turn_on) : false,
|
|
35667
|
+
};
|
|
35668
|
+
},
|
|
35669
|
+
|
|
35670
|
+
toJSON(message: UserStatusUpdate): unknown {
|
|
35671
|
+
const obj: any = {};
|
|
35672
|
+
if (message.status !== "") {
|
|
35673
|
+
obj.status = message.status;
|
|
35674
|
+
}
|
|
35675
|
+
if (message.minutes !== 0) {
|
|
35676
|
+
obj.minutes = Math.round(message.minutes);
|
|
35677
|
+
}
|
|
35678
|
+
if (message.until_turn_on !== false) {
|
|
35679
|
+
obj.until_turn_on = message.until_turn_on;
|
|
35680
|
+
}
|
|
35681
|
+
return obj;
|
|
35682
|
+
},
|
|
35683
|
+
|
|
35684
|
+
create<I extends Exact<DeepPartial<UserStatusUpdate>, I>>(base?: I): UserStatusUpdate {
|
|
35685
|
+
return UserStatusUpdate.fromPartial(base ?? ({} as any));
|
|
35686
|
+
},
|
|
35687
|
+
fromPartial<I extends Exact<DeepPartial<UserStatusUpdate>, I>>(object: I): UserStatusUpdate {
|
|
35688
|
+
const message = createBaseUserStatusUpdate();
|
|
35689
|
+
message.status = object.status ?? "";
|
|
35690
|
+
message.minutes = object.minutes ?? 0;
|
|
35691
|
+
message.until_turn_on = object.until_turn_on ?? false;
|
|
35692
|
+
return message;
|
|
35693
|
+
},
|
|
35694
|
+
};
|
|
35695
|
+
|
|
35438
35696
|
function createBaseOnboardingSteps(): OnboardingSteps {
|
|
35439
35697
|
return { id: "", user_id: "", clan_id: "", onboarding_step: 0 };
|
|
35440
35698
|
}
|