mezon-js 2.13.72 → 2.13.74

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.
@@ -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 isObject(value) {
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: "",
@@ -9910,6 +10316,7 @@ function createBaseApp() {
9910
10316
  applogo: "",
9911
10317
  is_shadow: false,
9912
10318
  disable_time: void 0,
10319
+ create_time: void 0,
9913
10320
  token: "",
9914
10321
  role: 0,
9915
10322
  about: "",
@@ -9936,17 +10343,20 @@ var App = {
9936
10343
  if (message.disable_time !== void 0) {
9937
10344
  Timestamp.encode(toTimestamp(message.disable_time), writer.uint32(50).fork()).ldelim();
9938
10345
  }
10346
+ if (message.create_time !== void 0) {
10347
+ Timestamp.encode(toTimestamp(message.create_time), writer.uint32(58).fork()).ldelim();
10348
+ }
9939
10349
  if (message.token !== "") {
9940
- writer.uint32(58).string(message.token);
10350
+ writer.uint32(66).string(message.token);
9941
10351
  }
9942
10352
  if (message.role !== 0) {
9943
- writer.uint32(64).int32(message.role);
10353
+ writer.uint32(72).int32(message.role);
9944
10354
  }
9945
10355
  if (message.about !== "") {
9946
- writer.uint32(74).string(message.about);
10356
+ writer.uint32(82).string(message.about);
9947
10357
  }
9948
10358
  if (message.app_url !== "") {
9949
- writer.uint32(82).string(message.app_url);
10359
+ writer.uint32(90).string(message.app_url);
9950
10360
  }
9951
10361
  return writer;
9952
10362
  },
@@ -9997,24 +10407,30 @@ var App = {
9997
10407
  if (tag !== 58) {
9998
10408
  break;
9999
10409
  }
10000
- message.token = reader.string();
10410
+ message.create_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
10001
10411
  continue;
10002
10412
  case 8:
10003
- if (tag !== 64) {
10413
+ if (tag !== 66) {
10004
10414
  break;
10005
10415
  }
10006
- message.role = reader.int32();
10416
+ message.token = reader.string();
10007
10417
  continue;
10008
10418
  case 9:
10009
- if (tag !== 74) {
10419
+ if (tag !== 72) {
10010
10420
  break;
10011
10421
  }
10012
- message.about = reader.string();
10422
+ message.role = reader.int32();
10013
10423
  continue;
10014
10424
  case 10:
10015
10425
  if (tag !== 82) {
10016
10426
  break;
10017
10427
  }
10428
+ message.about = reader.string();
10429
+ continue;
10430
+ case 11:
10431
+ if (tag !== 90) {
10432
+ break;
10433
+ }
10018
10434
  message.app_url = reader.string();
10019
10435
  continue;
10020
10436
  }
@@ -10033,6 +10449,7 @@ var App = {
10033
10449
  applogo: isSet3(object.applogo) ? globalThis.String(object.applogo) : "",
10034
10450
  is_shadow: isSet3(object.is_shadow) ? globalThis.Boolean(object.is_shadow) : false,
10035
10451
  disable_time: isSet3(object.disable_time) ? fromJsonTimestamp(object.disable_time) : void 0,
10452
+ create_time: isSet3(object.create_time) ? fromJsonTimestamp(object.create_time) : void 0,
10036
10453
  token: isSet3(object.token) ? globalThis.String(object.token) : "",
10037
10454
  role: isSet3(object.role) ? globalThis.Number(object.role) : 0,
10038
10455
  about: isSet3(object.about) ? globalThis.String(object.about) : "",
@@ -10059,6 +10476,9 @@ var App = {
10059
10476
  if (message.disable_time !== void 0) {
10060
10477
  obj.disable_time = message.disable_time.toISOString();
10061
10478
  }
10479
+ if (message.create_time !== void 0) {
10480
+ obj.create_time = message.create_time.toISOString();
10481
+ }
10062
10482
  if (message.token !== "") {
10063
10483
  obj.token = message.token;
10064
10484
  }
@@ -10077,7 +10497,7 @@ var App = {
10077
10497
  return App.fromPartial(base != null ? base : {});
10078
10498
  },
10079
10499
  fromPartial(object) {
10080
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
10500
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
10081
10501
  const message = createBaseApp();
10082
10502
  message.id = (_a = object.id) != null ? _a : "";
10083
10503
  message.appname = (_b = object.appname) != null ? _b : "";
@@ -10085,10 +10505,11 @@ var App = {
10085
10505
  message.applogo = (_d = object.applogo) != null ? _d : "";
10086
10506
  message.is_shadow = (_e = object.is_shadow) != null ? _e : false;
10087
10507
  message.disable_time = (_f = object.disable_time) != null ? _f : void 0;
10088
- message.token = (_g = object.token) != null ? _g : "";
10089
- message.role = (_h = object.role) != null ? _h : 0;
10090
- message.about = (_i = object.about) != null ? _i : "";
10091
- message.app_url = (_j = object.app_url) != null ? _j : "";
10508
+ message.create_time = (_g = object.create_time) != null ? _g : void 0;
10509
+ message.token = (_h = object.token) != null ? _h : "";
10510
+ message.role = (_i = object.role) != null ? _i : 0;
10511
+ message.about = (_j = object.about) != null ? _j : "";
10512
+ message.app_url = (_k = object.app_url) != null ? _k : "";
10092
10513
  return message;
10093
10514
  }
10094
10515
  };
@@ -14407,7 +14828,9 @@ function createBaseLogedDevice() {
14407
14828
  status: 0,
14408
14829
  platform: "",
14409
14830
  ip: "",
14410
- last_active: void 0
14831
+ last_active: void 0,
14832
+ location: "",
14833
+ is_current: false
14411
14834
  };
14412
14835
  }
14413
14836
  var LogedDevice = {
@@ -14433,6 +14856,12 @@ var LogedDevice = {
14433
14856
  if (message.last_active !== void 0) {
14434
14857
  Timestamp.encode(toTimestamp(message.last_active), writer.uint32(58).fork()).ldelim();
14435
14858
  }
14859
+ if (message.location !== "") {
14860
+ writer.uint32(66).string(message.location);
14861
+ }
14862
+ if (message.is_current !== false) {
14863
+ writer.uint32(72).bool(message.is_current);
14864
+ }
14436
14865
  return writer;
14437
14866
  },
14438
14867
  decode(input, length) {
@@ -14484,6 +14913,18 @@ var LogedDevice = {
14484
14913
  }
14485
14914
  message.last_active = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
14486
14915
  continue;
14916
+ case 8:
14917
+ if (tag !== 66) {
14918
+ break;
14919
+ }
14920
+ message.location = reader.string();
14921
+ continue;
14922
+ case 9:
14923
+ if (tag !== 72) {
14924
+ break;
14925
+ }
14926
+ message.is_current = reader.bool();
14927
+ continue;
14487
14928
  }
14488
14929
  if ((tag & 7) === 4 || tag === 0) {
14489
14930
  break;
@@ -14500,7 +14941,9 @@ var LogedDevice = {
14500
14941
  status: isSet3(object.status) ? globalThis.Number(object.status) : 0,
14501
14942
  platform: isSet3(object.platform) ? globalThis.String(object.platform) : "",
14502
14943
  ip: isSet3(object.ip) ? globalThis.String(object.ip) : "",
14503
- last_active: isSet3(object.last_active) ? fromJsonTimestamp(object.last_active) : void 0
14944
+ last_active: isSet3(object.last_active) ? fromJsonTimestamp(object.last_active) : void 0,
14945
+ location: isSet3(object.location) ? globalThis.String(object.location) : "",
14946
+ is_current: isSet3(object.is_current) ? globalThis.Boolean(object.is_current) : false
14504
14947
  };
14505
14948
  },
14506
14949
  toJSON(message) {
@@ -14526,13 +14969,19 @@ var LogedDevice = {
14526
14969
  if (message.last_active !== void 0) {
14527
14970
  obj.last_active = message.last_active.toISOString();
14528
14971
  }
14972
+ if (message.location !== "") {
14973
+ obj.location = message.location;
14974
+ }
14975
+ if (message.is_current !== false) {
14976
+ obj.is_current = message.is_current;
14977
+ }
14529
14978
  return obj;
14530
14979
  },
14531
14980
  create(base) {
14532
14981
  return LogedDevice.fromPartial(base != null ? base : {});
14533
14982
  },
14534
14983
  fromPartial(object) {
14535
- var _a, _b, _c, _d, _e, _f, _g;
14984
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
14536
14985
  const message = createBaseLogedDevice();
14537
14986
  message.device_id = (_a = object.device_id) != null ? _a : "";
14538
14987
  message.device_name = (_b = object.device_name) != null ? _b : "";
@@ -14541,6 +14990,8 @@ var LogedDevice = {
14541
14990
  message.platform = (_e = object.platform) != null ? _e : "";
14542
14991
  message.ip = (_f = object.ip) != null ? _f : "";
14543
14992
  message.last_active = (_g = object.last_active) != null ? _g : void 0;
14993
+ message.location = (_h = object.location) != null ? _h : "";
14994
+ message.is_current = (_i = object.is_current) != null ? _i : false;
14544
14995
  return message;
14545
14996
  }
14546
14997
  };
@@ -14576,6 +15027,9 @@ if (import_minimal4.default.util.Long !== import_long3.default) {
14576
15027
  import_minimal4.default.util.Long = import_long3.default;
14577
15028
  import_minimal4.default.configure();
14578
15029
  }
15030
+ function isObject(value) {
15031
+ return typeof value === "object" && value !== null;
15032
+ }
14579
15033
  function isSet3(value) {
14580
15034
  return value !== null && value !== void 0;
14581
15035
  }
@@ -15068,25 +15522,31 @@ var MezonApi = class {
15068
15522
  }
15069
15523
  const urlPath = "/v2/account/session/refresh";
15070
15524
  const queryParams = /* @__PURE__ */ new Map();
15071
- let bodyJson = "";
15072
- bodyJson = JSON.stringify(body || {});
15525
+ const bodyWriter = SessionRefreshRequest.encode(
15526
+ SessionRefreshRequest.fromPartial(body)
15527
+ );
15528
+ const encodedBody = bodyWriter.finish();
15073
15529
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
15074
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
15530
+ const fetchOptions = buildFetchOptions("POST", options, "");
15531
+ fetchOptions.body = encodedBody;
15075
15532
  if (basicAuthUsername) {
15076
15533
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
15077
15534
  }
15535
+ fetchOptions.headers["Content-Type"] = "application/x-protobuf";
15536
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15078
15537
  return Promise.race([
15079
- fetch(fullUrl, fetchOptions).then((response) => {
15538
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15080
15539
  if (response.status == 204) {
15081
- return response;
15540
+ return {};
15082
15541
  } else if (response.status >= 200 && response.status < 300) {
15083
- return response.json();
15542
+ const buffer = yield response.arrayBuffer();
15543
+ return Session.decode(new Uint8Array(buffer));
15084
15544
  } else {
15085
15545
  throw response;
15086
15546
  }
15087
- }),
15547
+ })),
15088
15548
  new Promise(
15089
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15549
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15090
15550
  )
15091
15551
  ]);
15092
15552
  }
@@ -16711,18 +17171,20 @@ var MezonApi = class {
16711
17171
  if (bearerToken) {
16712
17172
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
16713
17173
  }
17174
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
16714
17175
  return Promise.race([
16715
- fetch(fullUrl, fetchOptions).then((response) => {
17176
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
16716
17177
  if (response.status == 204) {
16717
- return response;
17178
+ return {};
16718
17179
  } else if (response.status >= 200 && response.status < 300) {
16719
- return response.json();
17180
+ const buffer = yield response.arrayBuffer();
17181
+ return RegistFcmDeviceTokenResponse.decode(new Uint8Array(buffer));
16720
17182
  } else {
16721
17183
  throw response;
16722
17184
  }
16723
- }),
17185
+ })),
16724
17186
  new Promise(
16725
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
17187
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
16726
17188
  )
16727
17189
  ]);
16728
17190
  }
@@ -19660,35 +20122,6 @@ var MezonApi = class {
19660
20122
  )
19661
20123
  ]);
19662
20124
  }
19663
- /** Store wallet key */
19664
- storeWalletKey(bearerToken, body, options = {}) {
19665
- if (body === null || body === void 0) {
19666
- throw new Error("'body' is a required parameter but is null or undefined.");
19667
- }
19668
- const urlPath = "/v2/wallet/key";
19669
- const queryParams = /* @__PURE__ */ new Map();
19670
- let bodyJson = "";
19671
- bodyJson = JSON.stringify(body || {});
19672
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
19673
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
19674
- if (bearerToken) {
19675
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
19676
- }
19677
- return Promise.race([
19678
- fetch(fullUrl, fetchOptions).then((response) => {
19679
- if (response.status == 204) {
19680
- return response;
19681
- } else if (response.status >= 200 && response.status < 300) {
19682
- return response.json();
19683
- } else {
19684
- throw response;
19685
- }
19686
- }),
19687
- new Promise(
19688
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
19689
- )
19690
- ]);
19691
- }
19692
20125
  /** create webhook */
19693
20126
  generateWebhook(bearerToken, body, options = {}) {
19694
20127
  if (body === null || body === void 0) {
@@ -21111,7 +21544,7 @@ var MezonApi = class {
21111
21544
  };
21112
21545
 
21113
21546
  // session.ts
21114
- var Session = class _Session {
21547
+ var Session2 = class _Session {
21115
21548
  constructor(token, refresh_token, created, api_url, id_token, is_remember) {
21116
21549
  this.created = created;
21117
21550
  this.api_url = api_url;
@@ -22567,7 +23000,7 @@ var Client = class {
22567
23000
  isRemember,
22568
23001
  options
22569
23002
  ).then((apiSession) => {
22570
- return new Session(
23003
+ return new Session2(
22571
23004
  apiSession.token || "",
22572
23005
  apiSession.refresh_token || "",
22573
23006
  apiSession.created || false,
@@ -22606,7 +23039,7 @@ var Client = class {
22606
23039
  confirmAuthenticateOTP(request) {
22607
23040
  return __async(this, null, function* () {
22608
23041
  return this.apiClient.confirmAuthenticateOTP(this.serverkey, "", request).then((apiSession) => {
22609
- return new Session(
23042
+ return new Session2(
22610
23043
  apiSession.token || "",
22611
23044
  apiSession.refresh_token || "",
22612
23045
  apiSession.created || false,
@@ -22628,7 +23061,7 @@ var Client = class {
22628
23061
  }
22629
23062
  };
22630
23063
  return this.apiClient.authenticateEmail(this.serverkey, "", request, username).then((apiSession) => {
22631
- return new Session(
23064
+ return new Session2(
22632
23065
  apiSession.token || "",
22633
23066
  apiSession.refresh_token || "",
22634
23067
  apiSession.created || false,
@@ -24617,7 +25050,7 @@ var Client = class {
24617
25050
  if (!(apiSession == null ? void 0 : apiSession.token)) {
24618
25051
  return null;
24619
25052
  }
24620
- return new Session(
25053
+ return new Session2(
24621
25054
  apiSession.token || "",
24622
25055
  apiSession.refresh_token || "",
24623
25056
  apiSession.created || false,
@@ -25173,7 +25606,7 @@ export {
25173
25606
  ConnectionState,
25174
25607
  DefaultSocket,
25175
25608
  NotificationType,
25176
- Session,
25609
+ Session2 as Session,
25177
25610
  WebSocketAdapterText,
25178
25611
  WebrtcSignalingType,
25179
25612
  b64DecodeUnicode,