mezon-js 2.13.71 → 2.13.73
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 +177 -24
- package/api.gen.ts +41 -83
- package/dist/api/api.d.ts +151 -7
- package/dist/api.gen.d.ts +11 -22
- package/dist/mezon-js.cjs.js +595 -73
- package/dist/mezon-js.esm.mjs +595 -73
- package/package.json +1 -1
package/dist/mezon-js.esm.mjs
CHANGED
|
@@ -1549,7 +1549,7 @@ var require_minimal = __commonJS({
|
|
|
1549
1549
|
util.isString = function isString(value) {
|
|
1550
1550
|
return typeof value === "string" || value instanceof String;
|
|
1551
1551
|
};
|
|
1552
|
-
util.isObject = function
|
|
1552
|
+
util.isObject = function isObject2(value) {
|
|
1553
1553
|
return value && typeof value === "object";
|
|
1554
1554
|
};
|
|
1555
1555
|
util.isset = /**
|
|
@@ -3088,6 +3088,57 @@ var Int32Value = {
|
|
|
3088
3088
|
return message;
|
|
3089
3089
|
}
|
|
3090
3090
|
};
|
|
3091
|
+
function createBaseBoolValue() {
|
|
3092
|
+
return { value: false };
|
|
3093
|
+
}
|
|
3094
|
+
var BoolValue = {
|
|
3095
|
+
encode(message, writer = import_minimal3.default.Writer.create()) {
|
|
3096
|
+
if (message.value !== false) {
|
|
3097
|
+
writer.uint32(8).bool(message.value);
|
|
3098
|
+
}
|
|
3099
|
+
return writer;
|
|
3100
|
+
},
|
|
3101
|
+
decode(input, length) {
|
|
3102
|
+
const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
|
|
3103
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3104
|
+
const message = createBaseBoolValue();
|
|
3105
|
+
while (reader.pos < end) {
|
|
3106
|
+
const tag = reader.uint32();
|
|
3107
|
+
switch (tag >>> 3) {
|
|
3108
|
+
case 1:
|
|
3109
|
+
if (tag !== 8) {
|
|
3110
|
+
break;
|
|
3111
|
+
}
|
|
3112
|
+
message.value = reader.bool();
|
|
3113
|
+
continue;
|
|
3114
|
+
}
|
|
3115
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3116
|
+
break;
|
|
3117
|
+
}
|
|
3118
|
+
reader.skipType(tag & 7);
|
|
3119
|
+
}
|
|
3120
|
+
return message;
|
|
3121
|
+
},
|
|
3122
|
+
fromJSON(object) {
|
|
3123
|
+
return { value: isSet2(object.value) ? globalThis.Boolean(object.value) : false };
|
|
3124
|
+
},
|
|
3125
|
+
toJSON(message) {
|
|
3126
|
+
const obj = {};
|
|
3127
|
+
if (message.value !== false) {
|
|
3128
|
+
obj.value = message.value;
|
|
3129
|
+
}
|
|
3130
|
+
return obj;
|
|
3131
|
+
},
|
|
3132
|
+
create(base) {
|
|
3133
|
+
return BoolValue.fromPartial(base != null ? base : {});
|
|
3134
|
+
},
|
|
3135
|
+
fromPartial(object) {
|
|
3136
|
+
var _a;
|
|
3137
|
+
const message = createBaseBoolValue();
|
|
3138
|
+
message.value = (_a = object.value) != null ? _a : false;
|
|
3139
|
+
return message;
|
|
3140
|
+
}
|
|
3141
|
+
};
|
|
3091
3142
|
if (import_minimal3.default.util.Long !== import_long2.default) {
|
|
3092
3143
|
import_minimal3.default.util.Long = import_long2.default;
|
|
3093
3144
|
import_minimal3.default.configure();
|
|
@@ -3272,6 +3323,171 @@ var Account = {
|
|
|
3272
3323
|
return message;
|
|
3273
3324
|
}
|
|
3274
3325
|
};
|
|
3326
|
+
function createBaseSessionRefreshRequest() {
|
|
3327
|
+
return { token: "", vars: {}, is_remember: void 0 };
|
|
3328
|
+
}
|
|
3329
|
+
var SessionRefreshRequest = {
|
|
3330
|
+
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
3331
|
+
if (message.token !== "") {
|
|
3332
|
+
writer.uint32(10).string(message.token);
|
|
3333
|
+
}
|
|
3334
|
+
Object.entries(message.vars).forEach(([key, value]) => {
|
|
3335
|
+
SessionRefreshRequest_VarsEntry.encode({ key, value }, writer.uint32(18).fork()).ldelim();
|
|
3336
|
+
});
|
|
3337
|
+
if (message.is_remember !== void 0) {
|
|
3338
|
+
BoolValue.encode({ value: message.is_remember }, writer.uint32(26).fork()).ldelim();
|
|
3339
|
+
}
|
|
3340
|
+
return writer;
|
|
3341
|
+
},
|
|
3342
|
+
decode(input, length) {
|
|
3343
|
+
const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
|
|
3344
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3345
|
+
const message = createBaseSessionRefreshRequest();
|
|
3346
|
+
while (reader.pos < end) {
|
|
3347
|
+
const tag = reader.uint32();
|
|
3348
|
+
switch (tag >>> 3) {
|
|
3349
|
+
case 1:
|
|
3350
|
+
if (tag !== 10) {
|
|
3351
|
+
break;
|
|
3352
|
+
}
|
|
3353
|
+
message.token = reader.string();
|
|
3354
|
+
continue;
|
|
3355
|
+
case 2:
|
|
3356
|
+
if (tag !== 18) {
|
|
3357
|
+
break;
|
|
3358
|
+
}
|
|
3359
|
+
const entry2 = SessionRefreshRequest_VarsEntry.decode(reader, reader.uint32());
|
|
3360
|
+
if (entry2.value !== void 0) {
|
|
3361
|
+
message.vars[entry2.key] = entry2.value;
|
|
3362
|
+
}
|
|
3363
|
+
continue;
|
|
3364
|
+
case 3:
|
|
3365
|
+
if (tag !== 26) {
|
|
3366
|
+
break;
|
|
3367
|
+
}
|
|
3368
|
+
message.is_remember = BoolValue.decode(reader, reader.uint32()).value;
|
|
3369
|
+
continue;
|
|
3370
|
+
}
|
|
3371
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3372
|
+
break;
|
|
3373
|
+
}
|
|
3374
|
+
reader.skipType(tag & 7);
|
|
3375
|
+
}
|
|
3376
|
+
return message;
|
|
3377
|
+
},
|
|
3378
|
+
fromJSON(object) {
|
|
3379
|
+
return {
|
|
3380
|
+
token: isSet3(object.token) ? globalThis.String(object.token) : "",
|
|
3381
|
+
vars: isObject(object.vars) ? Object.entries(object.vars).reduce((acc, [key, value]) => {
|
|
3382
|
+
acc[key] = String(value);
|
|
3383
|
+
return acc;
|
|
3384
|
+
}, {}) : {},
|
|
3385
|
+
is_remember: isSet3(object.is_remember) ? Boolean(object.is_remember) : void 0
|
|
3386
|
+
};
|
|
3387
|
+
},
|
|
3388
|
+
toJSON(message) {
|
|
3389
|
+
const obj = {};
|
|
3390
|
+
if (message.token !== "") {
|
|
3391
|
+
obj.token = message.token;
|
|
3392
|
+
}
|
|
3393
|
+
if (message.vars) {
|
|
3394
|
+
const entries = Object.entries(message.vars);
|
|
3395
|
+
if (entries.length > 0) {
|
|
3396
|
+
obj.vars = {};
|
|
3397
|
+
entries.forEach(([k, v]) => {
|
|
3398
|
+
obj.vars[k] = v;
|
|
3399
|
+
});
|
|
3400
|
+
}
|
|
3401
|
+
}
|
|
3402
|
+
if (message.is_remember !== void 0) {
|
|
3403
|
+
obj.is_remember = message.is_remember;
|
|
3404
|
+
}
|
|
3405
|
+
return obj;
|
|
3406
|
+
},
|
|
3407
|
+
create(base) {
|
|
3408
|
+
return SessionRefreshRequest.fromPartial(base != null ? base : {});
|
|
3409
|
+
},
|
|
3410
|
+
fromPartial(object) {
|
|
3411
|
+
var _a, _b, _c;
|
|
3412
|
+
const message = createBaseSessionRefreshRequest();
|
|
3413
|
+
message.token = (_a = object.token) != null ? _a : "";
|
|
3414
|
+
message.vars = Object.entries((_b = object.vars) != null ? _b : {}).reduce((acc, [key, value]) => {
|
|
3415
|
+
if (value !== void 0) {
|
|
3416
|
+
acc[key] = globalThis.String(value);
|
|
3417
|
+
}
|
|
3418
|
+
return acc;
|
|
3419
|
+
}, {});
|
|
3420
|
+
message.is_remember = (_c = object.is_remember) != null ? _c : void 0;
|
|
3421
|
+
return message;
|
|
3422
|
+
}
|
|
3423
|
+
};
|
|
3424
|
+
function createBaseSessionRefreshRequest_VarsEntry() {
|
|
3425
|
+
return { key: "", value: "" };
|
|
3426
|
+
}
|
|
3427
|
+
var SessionRefreshRequest_VarsEntry = {
|
|
3428
|
+
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
3429
|
+
if (message.key !== "") {
|
|
3430
|
+
writer.uint32(10).string(message.key);
|
|
3431
|
+
}
|
|
3432
|
+
if (message.value !== "") {
|
|
3433
|
+
writer.uint32(18).string(message.value);
|
|
3434
|
+
}
|
|
3435
|
+
return writer;
|
|
3436
|
+
},
|
|
3437
|
+
decode(input, length) {
|
|
3438
|
+
const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
|
|
3439
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3440
|
+
const message = createBaseSessionRefreshRequest_VarsEntry();
|
|
3441
|
+
while (reader.pos < end) {
|
|
3442
|
+
const tag = reader.uint32();
|
|
3443
|
+
switch (tag >>> 3) {
|
|
3444
|
+
case 1:
|
|
3445
|
+
if (tag !== 10) {
|
|
3446
|
+
break;
|
|
3447
|
+
}
|
|
3448
|
+
message.key = reader.string();
|
|
3449
|
+
continue;
|
|
3450
|
+
case 2:
|
|
3451
|
+
if (tag !== 18) {
|
|
3452
|
+
break;
|
|
3453
|
+
}
|
|
3454
|
+
message.value = reader.string();
|
|
3455
|
+
continue;
|
|
3456
|
+
}
|
|
3457
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3458
|
+
break;
|
|
3459
|
+
}
|
|
3460
|
+
reader.skipType(tag & 7);
|
|
3461
|
+
}
|
|
3462
|
+
return message;
|
|
3463
|
+
},
|
|
3464
|
+
fromJSON(object) {
|
|
3465
|
+
return {
|
|
3466
|
+
key: isSet3(object.key) ? globalThis.String(object.key) : "",
|
|
3467
|
+
value: isSet3(object.value) ? globalThis.String(object.value) : ""
|
|
3468
|
+
};
|
|
3469
|
+
},
|
|
3470
|
+
toJSON(message) {
|
|
3471
|
+
const obj = {};
|
|
3472
|
+
if (message.key !== "") {
|
|
3473
|
+
obj.key = message.key;
|
|
3474
|
+
}
|
|
3475
|
+
if (message.value !== "") {
|
|
3476
|
+
obj.value = message.value;
|
|
3477
|
+
}
|
|
3478
|
+
return obj;
|
|
3479
|
+
},
|
|
3480
|
+
create(base) {
|
|
3481
|
+
return SessionRefreshRequest_VarsEntry.fromPartial(base != null ? base : {});
|
|
3482
|
+
},
|
|
3483
|
+
fromPartial(object) {
|
|
3484
|
+
var _a, _b;
|
|
3485
|
+
const message = createBaseSessionRefreshRequest_VarsEntry();
|
|
3486
|
+
message.key = (_a = object.key) != null ? _a : "";
|
|
3487
|
+
message.value = (_b = object.value) != null ? _b : "";
|
|
3488
|
+
return message;
|
|
3489
|
+
}
|
|
3490
|
+
};
|
|
3275
3491
|
function createBaseIsBannedResponse() {
|
|
3276
3492
|
return { is_banned: false, expired_ban_time: 0 };
|
|
3277
3493
|
}
|
|
@@ -4887,6 +5103,87 @@ var ClanUserList_ClanUser = {
|
|
|
4887
5103
|
return message;
|
|
4888
5104
|
}
|
|
4889
5105
|
};
|
|
5106
|
+
function createBaseRegistFcmDeviceTokenResponse() {
|
|
5107
|
+
return { token: "", device_id: "", platform: "" };
|
|
5108
|
+
}
|
|
5109
|
+
var RegistFcmDeviceTokenResponse = {
|
|
5110
|
+
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
5111
|
+
if (message.token !== "") {
|
|
5112
|
+
writer.uint32(10).string(message.token);
|
|
5113
|
+
}
|
|
5114
|
+
if (message.device_id !== "") {
|
|
5115
|
+
writer.uint32(18).string(message.device_id);
|
|
5116
|
+
}
|
|
5117
|
+
if (message.platform !== "") {
|
|
5118
|
+
writer.uint32(26).string(message.platform);
|
|
5119
|
+
}
|
|
5120
|
+
return writer;
|
|
5121
|
+
},
|
|
5122
|
+
decode(input, length) {
|
|
5123
|
+
const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
|
|
5124
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5125
|
+
const message = createBaseRegistFcmDeviceTokenResponse();
|
|
5126
|
+
while (reader.pos < end) {
|
|
5127
|
+
const tag = reader.uint32();
|
|
5128
|
+
switch (tag >>> 3) {
|
|
5129
|
+
case 1:
|
|
5130
|
+
if (tag !== 10) {
|
|
5131
|
+
break;
|
|
5132
|
+
}
|
|
5133
|
+
message.token = reader.string();
|
|
5134
|
+
continue;
|
|
5135
|
+
case 2:
|
|
5136
|
+
if (tag !== 18) {
|
|
5137
|
+
break;
|
|
5138
|
+
}
|
|
5139
|
+
message.device_id = reader.string();
|
|
5140
|
+
continue;
|
|
5141
|
+
case 3:
|
|
5142
|
+
if (tag !== 26) {
|
|
5143
|
+
break;
|
|
5144
|
+
}
|
|
5145
|
+
message.platform = reader.string();
|
|
5146
|
+
continue;
|
|
5147
|
+
}
|
|
5148
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5149
|
+
break;
|
|
5150
|
+
}
|
|
5151
|
+
reader.skipType(tag & 7);
|
|
5152
|
+
}
|
|
5153
|
+
return message;
|
|
5154
|
+
},
|
|
5155
|
+
fromJSON(object) {
|
|
5156
|
+
return {
|
|
5157
|
+
token: isSet3(object.token) ? globalThis.String(object.token) : "",
|
|
5158
|
+
device_id: isSet3(object.device_id) ? globalThis.String(object.device_id) : "",
|
|
5159
|
+
platform: isSet3(object.platform) ? globalThis.String(object.platform) : ""
|
|
5160
|
+
};
|
|
5161
|
+
},
|
|
5162
|
+
toJSON(message) {
|
|
5163
|
+
const obj = {};
|
|
5164
|
+
if (message.token !== "") {
|
|
5165
|
+
obj.token = message.token;
|
|
5166
|
+
}
|
|
5167
|
+
if (message.device_id !== "") {
|
|
5168
|
+
obj.device_id = message.device_id;
|
|
5169
|
+
}
|
|
5170
|
+
if (message.platform !== "") {
|
|
5171
|
+
obj.platform = message.platform;
|
|
5172
|
+
}
|
|
5173
|
+
return obj;
|
|
5174
|
+
},
|
|
5175
|
+
create(base) {
|
|
5176
|
+
return RegistFcmDeviceTokenResponse.fromPartial(base != null ? base : {});
|
|
5177
|
+
},
|
|
5178
|
+
fromPartial(object) {
|
|
5179
|
+
var _a, _b, _c;
|
|
5180
|
+
const message = createBaseRegistFcmDeviceTokenResponse();
|
|
5181
|
+
message.token = (_a = object.token) != null ? _a : "";
|
|
5182
|
+
message.device_id = (_b = object.device_id) != null ? _b : "";
|
|
5183
|
+
message.platform = (_c = object.platform) != null ? _c : "";
|
|
5184
|
+
return message;
|
|
5185
|
+
}
|
|
5186
|
+
};
|
|
4890
5187
|
function createBaseNotification() {
|
|
4891
5188
|
return {
|
|
4892
5189
|
id: "",
|
|
@@ -5340,6 +5637,115 @@ var NotificationList = {
|
|
|
5340
5637
|
return message;
|
|
5341
5638
|
}
|
|
5342
5639
|
};
|
|
5640
|
+
function createBaseSession() {
|
|
5641
|
+
return { created: false, token: "", refresh_token: "", user_id: "", is_remember: false };
|
|
5642
|
+
}
|
|
5643
|
+
var Session = {
|
|
5644
|
+
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
5645
|
+
if (message.created !== false) {
|
|
5646
|
+
writer.uint32(8).bool(message.created);
|
|
5647
|
+
}
|
|
5648
|
+
if (message.token !== "") {
|
|
5649
|
+
writer.uint32(18).string(message.token);
|
|
5650
|
+
}
|
|
5651
|
+
if (message.refresh_token !== "") {
|
|
5652
|
+
writer.uint32(26).string(message.refresh_token);
|
|
5653
|
+
}
|
|
5654
|
+
if (message.user_id !== "") {
|
|
5655
|
+
writer.uint32(34).string(message.user_id);
|
|
5656
|
+
}
|
|
5657
|
+
if (message.is_remember !== false) {
|
|
5658
|
+
writer.uint32(40).bool(message.is_remember);
|
|
5659
|
+
}
|
|
5660
|
+
return writer;
|
|
5661
|
+
},
|
|
5662
|
+
decode(input, length) {
|
|
5663
|
+
const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
|
|
5664
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5665
|
+
const message = createBaseSession();
|
|
5666
|
+
while (reader.pos < end) {
|
|
5667
|
+
const tag = reader.uint32();
|
|
5668
|
+
switch (tag >>> 3) {
|
|
5669
|
+
case 1:
|
|
5670
|
+
if (tag !== 8) {
|
|
5671
|
+
break;
|
|
5672
|
+
}
|
|
5673
|
+
message.created = reader.bool();
|
|
5674
|
+
continue;
|
|
5675
|
+
case 2:
|
|
5676
|
+
if (tag !== 18) {
|
|
5677
|
+
break;
|
|
5678
|
+
}
|
|
5679
|
+
message.token = reader.string();
|
|
5680
|
+
continue;
|
|
5681
|
+
case 3:
|
|
5682
|
+
if (tag !== 26) {
|
|
5683
|
+
break;
|
|
5684
|
+
}
|
|
5685
|
+
message.refresh_token = reader.string();
|
|
5686
|
+
continue;
|
|
5687
|
+
case 4:
|
|
5688
|
+
if (tag !== 34) {
|
|
5689
|
+
break;
|
|
5690
|
+
}
|
|
5691
|
+
message.user_id = reader.string();
|
|
5692
|
+
continue;
|
|
5693
|
+
case 5:
|
|
5694
|
+
if (tag !== 40) {
|
|
5695
|
+
break;
|
|
5696
|
+
}
|
|
5697
|
+
message.is_remember = reader.bool();
|
|
5698
|
+
continue;
|
|
5699
|
+
}
|
|
5700
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5701
|
+
break;
|
|
5702
|
+
}
|
|
5703
|
+
reader.skipType(tag & 7);
|
|
5704
|
+
}
|
|
5705
|
+
return message;
|
|
5706
|
+
},
|
|
5707
|
+
fromJSON(object) {
|
|
5708
|
+
return {
|
|
5709
|
+
created: isSet3(object.created) ? globalThis.Boolean(object.created) : false,
|
|
5710
|
+
token: isSet3(object.token) ? globalThis.String(object.token) : "",
|
|
5711
|
+
refresh_token: isSet3(object.refresh_token) ? globalThis.String(object.refresh_token) : "",
|
|
5712
|
+
user_id: isSet3(object.user_id) ? globalThis.String(object.user_id) : "",
|
|
5713
|
+
is_remember: isSet3(object.is_remember) ? globalThis.Boolean(object.is_remember) : false
|
|
5714
|
+
};
|
|
5715
|
+
},
|
|
5716
|
+
toJSON(message) {
|
|
5717
|
+
const obj = {};
|
|
5718
|
+
if (message.created !== false) {
|
|
5719
|
+
obj.created = message.created;
|
|
5720
|
+
}
|
|
5721
|
+
if (message.token !== "") {
|
|
5722
|
+
obj.token = message.token;
|
|
5723
|
+
}
|
|
5724
|
+
if (message.refresh_token !== "") {
|
|
5725
|
+
obj.refresh_token = message.refresh_token;
|
|
5726
|
+
}
|
|
5727
|
+
if (message.user_id !== "") {
|
|
5728
|
+
obj.user_id = message.user_id;
|
|
5729
|
+
}
|
|
5730
|
+
if (message.is_remember !== false) {
|
|
5731
|
+
obj.is_remember = message.is_remember;
|
|
5732
|
+
}
|
|
5733
|
+
return obj;
|
|
5734
|
+
},
|
|
5735
|
+
create(base) {
|
|
5736
|
+
return Session.fromPartial(base != null ? base : {});
|
|
5737
|
+
},
|
|
5738
|
+
fromPartial(object) {
|
|
5739
|
+
var _a, _b, _c, _d, _e;
|
|
5740
|
+
const message = createBaseSession();
|
|
5741
|
+
message.created = (_a = object.created) != null ? _a : false;
|
|
5742
|
+
message.token = (_b = object.token) != null ? _b : "";
|
|
5743
|
+
message.refresh_token = (_c = object.refresh_token) != null ? _c : "";
|
|
5744
|
+
message.user_id = (_d = object.user_id) != null ? _d : "";
|
|
5745
|
+
message.is_remember = (_e = object.is_remember) != null ? _e : false;
|
|
5746
|
+
return message;
|
|
5747
|
+
}
|
|
5748
|
+
};
|
|
5343
5749
|
function createBaseUser() {
|
|
5344
5750
|
return {
|
|
5345
5751
|
id: "",
|
|
@@ -14346,28 +14752,107 @@ var QuickMenuAccessList = {
|
|
|
14346
14752
|
}
|
|
14347
14753
|
};
|
|
14348
14754
|
function createBaseLogedDeviceList() {
|
|
14349
|
-
return {
|
|
14755
|
+
return { devices: [] };
|
|
14350
14756
|
}
|
|
14351
14757
|
var LogedDeviceList = {
|
|
14352
14758
|
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
14759
|
+
for (const v of message.devices) {
|
|
14760
|
+
LogedDevice.encode(v, writer.uint32(10).fork()).ldelim();
|
|
14761
|
+
}
|
|
14762
|
+
return writer;
|
|
14763
|
+
},
|
|
14764
|
+
decode(input, length) {
|
|
14765
|
+
const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
|
|
14766
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14767
|
+
const message = createBaseLogedDeviceList();
|
|
14768
|
+
while (reader.pos < end) {
|
|
14769
|
+
const tag = reader.uint32();
|
|
14770
|
+
switch (tag >>> 3) {
|
|
14771
|
+
case 1:
|
|
14772
|
+
if (tag !== 10) {
|
|
14773
|
+
break;
|
|
14774
|
+
}
|
|
14775
|
+
message.devices.push(LogedDevice.decode(reader, reader.uint32()));
|
|
14776
|
+
continue;
|
|
14777
|
+
}
|
|
14778
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
14779
|
+
break;
|
|
14780
|
+
}
|
|
14781
|
+
reader.skipType(tag & 7);
|
|
14782
|
+
}
|
|
14783
|
+
return message;
|
|
14784
|
+
},
|
|
14785
|
+
fromJSON(object) {
|
|
14786
|
+
return {
|
|
14787
|
+
devices: globalThis.Array.isArray(object == null ? void 0 : object.devices) ? object.devices.map((e) => LogedDevice.fromJSON(e)) : []
|
|
14788
|
+
};
|
|
14789
|
+
},
|
|
14790
|
+
toJSON(message) {
|
|
14791
|
+
var _a;
|
|
14792
|
+
const obj = {};
|
|
14793
|
+
if ((_a = message.devices) == null ? void 0 : _a.length) {
|
|
14794
|
+
obj.devices = message.devices.map((e) => LogedDevice.toJSON(e));
|
|
14795
|
+
}
|
|
14796
|
+
return obj;
|
|
14797
|
+
},
|
|
14798
|
+
create(base) {
|
|
14799
|
+
return LogedDeviceList.fromPartial(base != null ? base : {});
|
|
14800
|
+
},
|
|
14801
|
+
fromPartial(object) {
|
|
14802
|
+
var _a;
|
|
14803
|
+
const message = createBaseLogedDeviceList();
|
|
14804
|
+
message.devices = ((_a = object.devices) == null ? void 0 : _a.map((e) => LogedDevice.fromPartial(e))) || [];
|
|
14805
|
+
return message;
|
|
14806
|
+
}
|
|
14807
|
+
};
|
|
14808
|
+
function createBaseLogedDevice() {
|
|
14809
|
+
return {
|
|
14810
|
+
device_id: "",
|
|
14811
|
+
device_name: "",
|
|
14812
|
+
login_at: void 0,
|
|
14813
|
+
status: 0,
|
|
14814
|
+
platform: "",
|
|
14815
|
+
ip: "",
|
|
14816
|
+
last_active: void 0,
|
|
14817
|
+
location: "",
|
|
14818
|
+
is_current_device: false
|
|
14819
|
+
};
|
|
14820
|
+
}
|
|
14821
|
+
var LogedDevice = {
|
|
14822
|
+
encode(message, writer = import_minimal4.default.Writer.create()) {
|
|
14823
|
+
if (message.device_id !== "") {
|
|
14824
|
+
writer.uint32(10).string(message.device_id);
|
|
14825
|
+
}
|
|
14353
14826
|
if (message.device_name !== "") {
|
|
14354
|
-
writer.uint32(
|
|
14827
|
+
writer.uint32(18).string(message.device_name);
|
|
14355
14828
|
}
|
|
14356
|
-
if (message.
|
|
14357
|
-
Timestamp.encode(toTimestamp(message.
|
|
14829
|
+
if (message.login_at !== void 0) {
|
|
14830
|
+
Timestamp.encode(toTimestamp(message.login_at), writer.uint32(26).fork()).ldelim();
|
|
14358
14831
|
}
|
|
14359
14832
|
if (message.status !== 0) {
|
|
14360
|
-
writer.uint32(
|
|
14833
|
+
writer.uint32(32).int32(message.status);
|
|
14361
14834
|
}
|
|
14362
14835
|
if (message.platform !== "") {
|
|
14363
|
-
writer.uint32(
|
|
14836
|
+
writer.uint32(42).string(message.platform);
|
|
14837
|
+
}
|
|
14838
|
+
if (message.ip !== "") {
|
|
14839
|
+
writer.uint32(50).string(message.ip);
|
|
14840
|
+
}
|
|
14841
|
+
if (message.last_active !== void 0) {
|
|
14842
|
+
Timestamp.encode(toTimestamp(message.last_active), writer.uint32(58).fork()).ldelim();
|
|
14843
|
+
}
|
|
14844
|
+
if (message.location !== "") {
|
|
14845
|
+
writer.uint32(66).string(message.location);
|
|
14846
|
+
}
|
|
14847
|
+
if (message.is_current_device !== false) {
|
|
14848
|
+
writer.uint32(72).bool(message.is_current_device);
|
|
14364
14849
|
}
|
|
14365
14850
|
return writer;
|
|
14366
14851
|
},
|
|
14367
14852
|
decode(input, length) {
|
|
14368
14853
|
const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
|
|
14369
14854
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
14370
|
-
const message =
|
|
14855
|
+
const message = createBaseLogedDevice();
|
|
14371
14856
|
while (reader.pos < end) {
|
|
14372
14857
|
const tag = reader.uint32();
|
|
14373
14858
|
switch (tag >>> 3) {
|
|
@@ -14375,26 +14860,56 @@ var LogedDeviceList = {
|
|
|
14375
14860
|
if (tag !== 10) {
|
|
14376
14861
|
break;
|
|
14377
14862
|
}
|
|
14378
|
-
message.
|
|
14863
|
+
message.device_id = reader.string();
|
|
14379
14864
|
continue;
|
|
14380
14865
|
case 2:
|
|
14381
14866
|
if (tag !== 18) {
|
|
14382
14867
|
break;
|
|
14383
14868
|
}
|
|
14384
|
-
message.
|
|
14869
|
+
message.device_name = reader.string();
|
|
14385
14870
|
continue;
|
|
14386
14871
|
case 3:
|
|
14387
|
-
if (tag !==
|
|
14872
|
+
if (tag !== 26) {
|
|
14388
14873
|
break;
|
|
14389
14874
|
}
|
|
14390
|
-
message.
|
|
14875
|
+
message.login_at = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
14391
14876
|
continue;
|
|
14392
14877
|
case 4:
|
|
14393
|
-
if (tag !==
|
|
14878
|
+
if (tag !== 32) {
|
|
14879
|
+
break;
|
|
14880
|
+
}
|
|
14881
|
+
message.status = reader.int32();
|
|
14882
|
+
continue;
|
|
14883
|
+
case 5:
|
|
14884
|
+
if (tag !== 42) {
|
|
14394
14885
|
break;
|
|
14395
14886
|
}
|
|
14396
14887
|
message.platform = reader.string();
|
|
14397
14888
|
continue;
|
|
14889
|
+
case 6:
|
|
14890
|
+
if (tag !== 50) {
|
|
14891
|
+
break;
|
|
14892
|
+
}
|
|
14893
|
+
message.ip = reader.string();
|
|
14894
|
+
continue;
|
|
14895
|
+
case 7:
|
|
14896
|
+
if (tag !== 58) {
|
|
14897
|
+
break;
|
|
14898
|
+
}
|
|
14899
|
+
message.last_active = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
14900
|
+
continue;
|
|
14901
|
+
case 8:
|
|
14902
|
+
if (tag !== 66) {
|
|
14903
|
+
break;
|
|
14904
|
+
}
|
|
14905
|
+
message.location = reader.string();
|
|
14906
|
+
continue;
|
|
14907
|
+
case 9:
|
|
14908
|
+
if (tag !== 72) {
|
|
14909
|
+
break;
|
|
14910
|
+
}
|
|
14911
|
+
message.is_current_device = reader.bool();
|
|
14912
|
+
continue;
|
|
14398
14913
|
}
|
|
14399
14914
|
if ((tag & 7) === 4 || tag === 0) {
|
|
14400
14915
|
break;
|
|
@@ -14405,19 +14920,27 @@ var LogedDeviceList = {
|
|
|
14405
14920
|
},
|
|
14406
14921
|
fromJSON(object) {
|
|
14407
14922
|
return {
|
|
14923
|
+
device_id: isSet3(object.device_id) ? globalThis.String(object.device_id) : "",
|
|
14408
14924
|
device_name: isSet3(object.device_name) ? globalThis.String(object.device_name) : "",
|
|
14409
|
-
|
|
14925
|
+
login_at: isSet3(object.login_at) ? fromJsonTimestamp(object.login_at) : void 0,
|
|
14410
14926
|
status: isSet3(object.status) ? globalThis.Number(object.status) : 0,
|
|
14411
|
-
platform: isSet3(object.platform) ? globalThis.String(object.platform) : ""
|
|
14927
|
+
platform: isSet3(object.platform) ? globalThis.String(object.platform) : "",
|
|
14928
|
+
ip: isSet3(object.ip) ? globalThis.String(object.ip) : "",
|
|
14929
|
+
last_active: isSet3(object.last_active) ? fromJsonTimestamp(object.last_active) : void 0,
|
|
14930
|
+
location: isSet3(object.location) ? globalThis.String(object.location) : "",
|
|
14931
|
+
is_current_device: isSet3(object.is_current_device) ? globalThis.Boolean(object.is_current_device) : false
|
|
14412
14932
|
};
|
|
14413
14933
|
},
|
|
14414
14934
|
toJSON(message) {
|
|
14415
14935
|
const obj = {};
|
|
14936
|
+
if (message.device_id !== "") {
|
|
14937
|
+
obj.device_id = message.device_id;
|
|
14938
|
+
}
|
|
14416
14939
|
if (message.device_name !== "") {
|
|
14417
14940
|
obj.device_name = message.device_name;
|
|
14418
14941
|
}
|
|
14419
|
-
if (message.
|
|
14420
|
-
obj.
|
|
14942
|
+
if (message.login_at !== void 0) {
|
|
14943
|
+
obj.login_at = message.login_at.toISOString();
|
|
14421
14944
|
}
|
|
14422
14945
|
if (message.status !== 0) {
|
|
14423
14946
|
obj.status = Math.round(message.status);
|
|
@@ -14425,18 +14948,35 @@ var LogedDeviceList = {
|
|
|
14425
14948
|
if (message.platform !== "") {
|
|
14426
14949
|
obj.platform = message.platform;
|
|
14427
14950
|
}
|
|
14951
|
+
if (message.ip !== "") {
|
|
14952
|
+
obj.ip = message.ip;
|
|
14953
|
+
}
|
|
14954
|
+
if (message.last_active !== void 0) {
|
|
14955
|
+
obj.last_active = message.last_active.toISOString();
|
|
14956
|
+
}
|
|
14957
|
+
if (message.location !== "") {
|
|
14958
|
+
obj.location = message.location;
|
|
14959
|
+
}
|
|
14960
|
+
if (message.is_current_device !== false) {
|
|
14961
|
+
obj.is_current_device = message.is_current_device;
|
|
14962
|
+
}
|
|
14428
14963
|
return obj;
|
|
14429
14964
|
},
|
|
14430
14965
|
create(base) {
|
|
14431
|
-
return
|
|
14966
|
+
return LogedDevice.fromPartial(base != null ? base : {});
|
|
14432
14967
|
},
|
|
14433
14968
|
fromPartial(object) {
|
|
14434
|
-
var _a, _b, _c, _d;
|
|
14435
|
-
const message =
|
|
14436
|
-
message.
|
|
14437
|
-
message.
|
|
14438
|
-
message.
|
|
14439
|
-
message.
|
|
14969
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
14970
|
+
const message = createBaseLogedDevice();
|
|
14971
|
+
message.device_id = (_a = object.device_id) != null ? _a : "";
|
|
14972
|
+
message.device_name = (_b = object.device_name) != null ? _b : "";
|
|
14973
|
+
message.login_at = (_c = object.login_at) != null ? _c : void 0;
|
|
14974
|
+
message.status = (_d = object.status) != null ? _d : 0;
|
|
14975
|
+
message.platform = (_e = object.platform) != null ? _e : "";
|
|
14976
|
+
message.ip = (_f = object.ip) != null ? _f : "";
|
|
14977
|
+
message.last_active = (_g = object.last_active) != null ? _g : void 0;
|
|
14978
|
+
message.location = (_h = object.location) != null ? _h : "";
|
|
14979
|
+
message.is_current_device = (_i = object.is_current_device) != null ? _i : false;
|
|
14440
14980
|
return message;
|
|
14441
14981
|
}
|
|
14442
14982
|
};
|
|
@@ -14472,6 +15012,9 @@ if (import_minimal4.default.util.Long !== import_long3.default) {
|
|
|
14472
15012
|
import_minimal4.default.util.Long = import_long3.default;
|
|
14473
15013
|
import_minimal4.default.configure();
|
|
14474
15014
|
}
|
|
15015
|
+
function isObject(value) {
|
|
15016
|
+
return typeof value === "object" && value !== null;
|
|
15017
|
+
}
|
|
14475
15018
|
function isSet3(value) {
|
|
14476
15019
|
return value !== null && value !== void 0;
|
|
14477
15020
|
}
|
|
@@ -14964,25 +15507,31 @@ var MezonApi = class {
|
|
|
14964
15507
|
}
|
|
14965
15508
|
const urlPath = "/v2/account/session/refresh";
|
|
14966
15509
|
const queryParams = /* @__PURE__ */ new Map();
|
|
14967
|
-
|
|
14968
|
-
|
|
15510
|
+
const bodyWriter = SessionRefreshRequest.encode(
|
|
15511
|
+
SessionRefreshRequest.fromPartial(body)
|
|
15512
|
+
);
|
|
15513
|
+
const encodedBody = bodyWriter.finish();
|
|
14969
15514
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
14970
|
-
const fetchOptions = buildFetchOptions("POST", options,
|
|
15515
|
+
const fetchOptions = buildFetchOptions("POST", options, "");
|
|
15516
|
+
fetchOptions.body = encodedBody;
|
|
14971
15517
|
if (basicAuthUsername) {
|
|
14972
15518
|
fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
|
|
14973
15519
|
}
|
|
15520
|
+
fetchOptions.headers["Content-Type"] = "application/x-protobuf";
|
|
15521
|
+
fetchOptions.headers["Accept"] = "application/x-protobuf";
|
|
14974
15522
|
return Promise.race([
|
|
14975
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
|
15523
|
+
fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
|
|
14976
15524
|
if (response.status == 204) {
|
|
14977
|
-
return
|
|
15525
|
+
return {};
|
|
14978
15526
|
} else if (response.status >= 200 && response.status < 300) {
|
|
14979
|
-
|
|
15527
|
+
const buffer = yield response.arrayBuffer();
|
|
15528
|
+
return Session.decode(new Uint8Array(buffer));
|
|
14980
15529
|
} else {
|
|
14981
15530
|
throw response;
|
|
14982
15531
|
}
|
|
14983
|
-
}),
|
|
15532
|
+
})),
|
|
14984
15533
|
new Promise(
|
|
14985
|
-
(_, reject) => setTimeout(reject
|
|
15534
|
+
(_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
|
|
14986
15535
|
)
|
|
14987
15536
|
]);
|
|
14988
15537
|
}
|
|
@@ -16607,18 +17156,20 @@ var MezonApi = class {
|
|
|
16607
17156
|
if (bearerToken) {
|
|
16608
17157
|
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
|
16609
17158
|
}
|
|
17159
|
+
fetchOptions.headers["Accept"] = "application/x-protobuf";
|
|
16610
17160
|
return Promise.race([
|
|
16611
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
|
17161
|
+
fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
|
|
16612
17162
|
if (response.status == 204) {
|
|
16613
|
-
return
|
|
17163
|
+
return {};
|
|
16614
17164
|
} else if (response.status >= 200 && response.status < 300) {
|
|
16615
|
-
|
|
17165
|
+
const buffer = yield response.arrayBuffer();
|
|
17166
|
+
return RegistFcmDeviceTokenResponse.decode(new Uint8Array(buffer));
|
|
16616
17167
|
} else {
|
|
16617
17168
|
throw response;
|
|
16618
17169
|
}
|
|
16619
|
-
}),
|
|
17170
|
+
})),
|
|
16620
17171
|
new Promise(
|
|
16621
|
-
(_, reject) => setTimeout(reject
|
|
17172
|
+
(_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
|
|
16622
17173
|
)
|
|
16623
17174
|
]);
|
|
16624
17175
|
}
|
|
@@ -19556,35 +20107,6 @@ var MezonApi = class {
|
|
|
19556
20107
|
)
|
|
19557
20108
|
]);
|
|
19558
20109
|
}
|
|
19559
|
-
/** Store wallet key */
|
|
19560
|
-
storeWalletKey(bearerToken, body, options = {}) {
|
|
19561
|
-
if (body === null || body === void 0) {
|
|
19562
|
-
throw new Error("'body' is a required parameter but is null or undefined.");
|
|
19563
|
-
}
|
|
19564
|
-
const urlPath = "/v2/wallet/key";
|
|
19565
|
-
const queryParams = /* @__PURE__ */ new Map();
|
|
19566
|
-
let bodyJson = "";
|
|
19567
|
-
bodyJson = JSON.stringify(body || {});
|
|
19568
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
19569
|
-
const fetchOptions = buildFetchOptions("POST", options, bodyJson);
|
|
19570
|
-
if (bearerToken) {
|
|
19571
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
|
19572
|
-
}
|
|
19573
|
-
return Promise.race([
|
|
19574
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
|
19575
|
-
if (response.status == 204) {
|
|
19576
|
-
return response;
|
|
19577
|
-
} else if (response.status >= 200 && response.status < 300) {
|
|
19578
|
-
return response.json();
|
|
19579
|
-
} else {
|
|
19580
|
-
throw response;
|
|
19581
|
-
}
|
|
19582
|
-
}),
|
|
19583
|
-
new Promise(
|
|
19584
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
|
19585
|
-
)
|
|
19586
|
-
]);
|
|
19587
|
-
}
|
|
19588
20110
|
/** create webhook */
|
|
19589
20111
|
generateWebhook(bearerToken, body, options = {}) {
|
|
19590
20112
|
if (body === null || body === void 0) {
|
|
@@ -20991,7 +21513,7 @@ var MezonApi = class {
|
|
|
20991
21513
|
return Promise.race([
|
|
20992
21514
|
fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
|
|
20993
21515
|
if (response.status == 204) {
|
|
20994
|
-
return
|
|
21516
|
+
return {};
|
|
20995
21517
|
} else if (response.status >= 200 && response.status < 300) {
|
|
20996
21518
|
const buffer = yield response.arrayBuffer();
|
|
20997
21519
|
return LogedDeviceList.decode(new Uint8Array(buffer));
|
|
@@ -21007,7 +21529,7 @@ var MezonApi = class {
|
|
|
21007
21529
|
};
|
|
21008
21530
|
|
|
21009
21531
|
// session.ts
|
|
21010
|
-
var
|
|
21532
|
+
var Session2 = class _Session {
|
|
21011
21533
|
constructor(token, refresh_token, created, api_url, id_token, is_remember) {
|
|
21012
21534
|
this.created = created;
|
|
21013
21535
|
this.api_url = api_url;
|
|
@@ -22463,7 +22985,7 @@ var Client = class {
|
|
|
22463
22985
|
isRemember,
|
|
22464
22986
|
options
|
|
22465
22987
|
).then((apiSession) => {
|
|
22466
|
-
return new
|
|
22988
|
+
return new Session2(
|
|
22467
22989
|
apiSession.token || "",
|
|
22468
22990
|
apiSession.refresh_token || "",
|
|
22469
22991
|
apiSession.created || false,
|
|
@@ -22502,7 +23024,7 @@ var Client = class {
|
|
|
22502
23024
|
confirmAuthenticateOTP(request) {
|
|
22503
23025
|
return __async(this, null, function* () {
|
|
22504
23026
|
return this.apiClient.confirmAuthenticateOTP(this.serverkey, "", request).then((apiSession) => {
|
|
22505
|
-
return new
|
|
23027
|
+
return new Session2(
|
|
22506
23028
|
apiSession.token || "",
|
|
22507
23029
|
apiSession.refresh_token || "",
|
|
22508
23030
|
apiSession.created || false,
|
|
@@ -22524,7 +23046,7 @@ var Client = class {
|
|
|
22524
23046
|
}
|
|
22525
23047
|
};
|
|
22526
23048
|
return this.apiClient.authenticateEmail(this.serverkey, "", request, username).then((apiSession) => {
|
|
22527
|
-
return new
|
|
23049
|
+
return new Session2(
|
|
22528
23050
|
apiSession.token || "",
|
|
22529
23051
|
apiSession.refresh_token || "",
|
|
22530
23052
|
apiSession.created || false,
|
|
@@ -24513,7 +25035,7 @@ var Client = class {
|
|
|
24513
25035
|
if (!(apiSession == null ? void 0 : apiSession.token)) {
|
|
24514
25036
|
return null;
|
|
24515
25037
|
}
|
|
24516
|
-
return new
|
|
25038
|
+
return new Session2(
|
|
24517
25039
|
apiSession.token || "",
|
|
24518
25040
|
apiSession.refresh_token || "",
|
|
24519
25041
|
apiSession.created || false,
|
|
@@ -25069,7 +25591,7 @@ export {
|
|
|
25069
25591
|
ConnectionState,
|
|
25070
25592
|
DefaultSocket,
|
|
25071
25593
|
NotificationType,
|
|
25072
|
-
Session,
|
|
25594
|
+
Session2 as Session,
|
|
25073
25595
|
WebSocketAdapterText,
|
|
25074
25596
|
WebrtcSignalingType,
|
|
25075
25597
|
b64DecodeUnicode,
|