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.
@@ -1555,7 +1555,7 @@ var require_minimal = __commonJS({
1555
1555
  util.isString = function isString(value) {
1556
1556
  return typeof value === "string" || value instanceof String;
1557
1557
  };
1558
- util.isObject = function isObject(value) {
1558
+ util.isObject = function isObject2(value) {
1559
1559
  return value && typeof value === "object";
1560
1560
  };
1561
1561
  util.isset = /**
@@ -2295,7 +2295,7 @@ __export(index_exports, {
2295
2295
  ConnectionState: () => ConnectionState,
2296
2296
  DefaultSocket: () => DefaultSocket,
2297
2297
  NotificationType: () => NotificationType,
2298
- Session: () => Session,
2298
+ Session: () => Session2,
2299
2299
  WebSocketAdapterText: () => WebSocketAdapterText,
2300
2300
  WebrtcSignalingType: () => WebrtcSignalingType,
2301
2301
  b64DecodeUnicode: () => b64DecodeUnicode,
@@ -3113,6 +3113,57 @@ var Int32Value = {
3113
3113
  return message;
3114
3114
  }
3115
3115
  };
3116
+ function createBaseBoolValue() {
3117
+ return { value: false };
3118
+ }
3119
+ var BoolValue = {
3120
+ encode(message, writer = import_minimal3.default.Writer.create()) {
3121
+ if (message.value !== false) {
3122
+ writer.uint32(8).bool(message.value);
3123
+ }
3124
+ return writer;
3125
+ },
3126
+ decode(input, length) {
3127
+ const reader = input instanceof import_minimal3.default.Reader ? input : import_minimal3.default.Reader.create(input);
3128
+ let end = length === void 0 ? reader.len : reader.pos + length;
3129
+ const message = createBaseBoolValue();
3130
+ while (reader.pos < end) {
3131
+ const tag = reader.uint32();
3132
+ switch (tag >>> 3) {
3133
+ case 1:
3134
+ if (tag !== 8) {
3135
+ break;
3136
+ }
3137
+ message.value = reader.bool();
3138
+ continue;
3139
+ }
3140
+ if ((tag & 7) === 4 || tag === 0) {
3141
+ break;
3142
+ }
3143
+ reader.skipType(tag & 7);
3144
+ }
3145
+ return message;
3146
+ },
3147
+ fromJSON(object) {
3148
+ return { value: isSet2(object.value) ? globalThis.Boolean(object.value) : false };
3149
+ },
3150
+ toJSON(message) {
3151
+ const obj = {};
3152
+ if (message.value !== false) {
3153
+ obj.value = message.value;
3154
+ }
3155
+ return obj;
3156
+ },
3157
+ create(base) {
3158
+ return BoolValue.fromPartial(base != null ? base : {});
3159
+ },
3160
+ fromPartial(object) {
3161
+ var _a;
3162
+ const message = createBaseBoolValue();
3163
+ message.value = (_a = object.value) != null ? _a : false;
3164
+ return message;
3165
+ }
3166
+ };
3116
3167
  if (import_minimal3.default.util.Long !== import_long2.default) {
3117
3168
  import_minimal3.default.util.Long = import_long2.default;
3118
3169
  import_minimal3.default.configure();
@@ -3297,6 +3348,171 @@ var Account = {
3297
3348
  return message;
3298
3349
  }
3299
3350
  };
3351
+ function createBaseSessionRefreshRequest() {
3352
+ return { token: "", vars: {}, is_remember: void 0 };
3353
+ }
3354
+ var SessionRefreshRequest = {
3355
+ encode(message, writer = import_minimal4.default.Writer.create()) {
3356
+ if (message.token !== "") {
3357
+ writer.uint32(10).string(message.token);
3358
+ }
3359
+ Object.entries(message.vars).forEach(([key, value]) => {
3360
+ SessionRefreshRequest_VarsEntry.encode({ key, value }, writer.uint32(18).fork()).ldelim();
3361
+ });
3362
+ if (message.is_remember !== void 0) {
3363
+ BoolValue.encode({ value: message.is_remember }, writer.uint32(26).fork()).ldelim();
3364
+ }
3365
+ return writer;
3366
+ },
3367
+ decode(input, length) {
3368
+ const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
3369
+ let end = length === void 0 ? reader.len : reader.pos + length;
3370
+ const message = createBaseSessionRefreshRequest();
3371
+ while (reader.pos < end) {
3372
+ const tag = reader.uint32();
3373
+ switch (tag >>> 3) {
3374
+ case 1:
3375
+ if (tag !== 10) {
3376
+ break;
3377
+ }
3378
+ message.token = reader.string();
3379
+ continue;
3380
+ case 2:
3381
+ if (tag !== 18) {
3382
+ break;
3383
+ }
3384
+ const entry2 = SessionRefreshRequest_VarsEntry.decode(reader, reader.uint32());
3385
+ if (entry2.value !== void 0) {
3386
+ message.vars[entry2.key] = entry2.value;
3387
+ }
3388
+ continue;
3389
+ case 3:
3390
+ if (tag !== 26) {
3391
+ break;
3392
+ }
3393
+ message.is_remember = BoolValue.decode(reader, reader.uint32()).value;
3394
+ continue;
3395
+ }
3396
+ if ((tag & 7) === 4 || tag === 0) {
3397
+ break;
3398
+ }
3399
+ reader.skipType(tag & 7);
3400
+ }
3401
+ return message;
3402
+ },
3403
+ fromJSON(object) {
3404
+ return {
3405
+ token: isSet3(object.token) ? globalThis.String(object.token) : "",
3406
+ vars: isObject(object.vars) ? Object.entries(object.vars).reduce((acc, [key, value]) => {
3407
+ acc[key] = String(value);
3408
+ return acc;
3409
+ }, {}) : {},
3410
+ is_remember: isSet3(object.is_remember) ? Boolean(object.is_remember) : void 0
3411
+ };
3412
+ },
3413
+ toJSON(message) {
3414
+ const obj = {};
3415
+ if (message.token !== "") {
3416
+ obj.token = message.token;
3417
+ }
3418
+ if (message.vars) {
3419
+ const entries = Object.entries(message.vars);
3420
+ if (entries.length > 0) {
3421
+ obj.vars = {};
3422
+ entries.forEach(([k, v]) => {
3423
+ obj.vars[k] = v;
3424
+ });
3425
+ }
3426
+ }
3427
+ if (message.is_remember !== void 0) {
3428
+ obj.is_remember = message.is_remember;
3429
+ }
3430
+ return obj;
3431
+ },
3432
+ create(base) {
3433
+ return SessionRefreshRequest.fromPartial(base != null ? base : {});
3434
+ },
3435
+ fromPartial(object) {
3436
+ var _a, _b, _c;
3437
+ const message = createBaseSessionRefreshRequest();
3438
+ message.token = (_a = object.token) != null ? _a : "";
3439
+ message.vars = Object.entries((_b = object.vars) != null ? _b : {}).reduce((acc, [key, value]) => {
3440
+ if (value !== void 0) {
3441
+ acc[key] = globalThis.String(value);
3442
+ }
3443
+ return acc;
3444
+ }, {});
3445
+ message.is_remember = (_c = object.is_remember) != null ? _c : void 0;
3446
+ return message;
3447
+ }
3448
+ };
3449
+ function createBaseSessionRefreshRequest_VarsEntry() {
3450
+ return { key: "", value: "" };
3451
+ }
3452
+ var SessionRefreshRequest_VarsEntry = {
3453
+ encode(message, writer = import_minimal4.default.Writer.create()) {
3454
+ if (message.key !== "") {
3455
+ writer.uint32(10).string(message.key);
3456
+ }
3457
+ if (message.value !== "") {
3458
+ writer.uint32(18).string(message.value);
3459
+ }
3460
+ return writer;
3461
+ },
3462
+ decode(input, length) {
3463
+ const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
3464
+ let end = length === void 0 ? reader.len : reader.pos + length;
3465
+ const message = createBaseSessionRefreshRequest_VarsEntry();
3466
+ while (reader.pos < end) {
3467
+ const tag = reader.uint32();
3468
+ switch (tag >>> 3) {
3469
+ case 1:
3470
+ if (tag !== 10) {
3471
+ break;
3472
+ }
3473
+ message.key = reader.string();
3474
+ continue;
3475
+ case 2:
3476
+ if (tag !== 18) {
3477
+ break;
3478
+ }
3479
+ message.value = reader.string();
3480
+ continue;
3481
+ }
3482
+ if ((tag & 7) === 4 || tag === 0) {
3483
+ break;
3484
+ }
3485
+ reader.skipType(tag & 7);
3486
+ }
3487
+ return message;
3488
+ },
3489
+ fromJSON(object) {
3490
+ return {
3491
+ key: isSet3(object.key) ? globalThis.String(object.key) : "",
3492
+ value: isSet3(object.value) ? globalThis.String(object.value) : ""
3493
+ };
3494
+ },
3495
+ toJSON(message) {
3496
+ const obj = {};
3497
+ if (message.key !== "") {
3498
+ obj.key = message.key;
3499
+ }
3500
+ if (message.value !== "") {
3501
+ obj.value = message.value;
3502
+ }
3503
+ return obj;
3504
+ },
3505
+ create(base) {
3506
+ return SessionRefreshRequest_VarsEntry.fromPartial(base != null ? base : {});
3507
+ },
3508
+ fromPartial(object) {
3509
+ var _a, _b;
3510
+ const message = createBaseSessionRefreshRequest_VarsEntry();
3511
+ message.key = (_a = object.key) != null ? _a : "";
3512
+ message.value = (_b = object.value) != null ? _b : "";
3513
+ return message;
3514
+ }
3515
+ };
3300
3516
  function createBaseIsBannedResponse() {
3301
3517
  return { is_banned: false, expired_ban_time: 0 };
3302
3518
  }
@@ -4912,6 +5128,87 @@ var ClanUserList_ClanUser = {
4912
5128
  return message;
4913
5129
  }
4914
5130
  };
5131
+ function createBaseRegistFcmDeviceTokenResponse() {
5132
+ return { token: "", device_id: "", platform: "" };
5133
+ }
5134
+ var RegistFcmDeviceTokenResponse = {
5135
+ encode(message, writer = import_minimal4.default.Writer.create()) {
5136
+ if (message.token !== "") {
5137
+ writer.uint32(10).string(message.token);
5138
+ }
5139
+ if (message.device_id !== "") {
5140
+ writer.uint32(18).string(message.device_id);
5141
+ }
5142
+ if (message.platform !== "") {
5143
+ writer.uint32(26).string(message.platform);
5144
+ }
5145
+ return writer;
5146
+ },
5147
+ decode(input, length) {
5148
+ const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
5149
+ let end = length === void 0 ? reader.len : reader.pos + length;
5150
+ const message = createBaseRegistFcmDeviceTokenResponse();
5151
+ while (reader.pos < end) {
5152
+ const tag = reader.uint32();
5153
+ switch (tag >>> 3) {
5154
+ case 1:
5155
+ if (tag !== 10) {
5156
+ break;
5157
+ }
5158
+ message.token = reader.string();
5159
+ continue;
5160
+ case 2:
5161
+ if (tag !== 18) {
5162
+ break;
5163
+ }
5164
+ message.device_id = reader.string();
5165
+ continue;
5166
+ case 3:
5167
+ if (tag !== 26) {
5168
+ break;
5169
+ }
5170
+ message.platform = reader.string();
5171
+ continue;
5172
+ }
5173
+ if ((tag & 7) === 4 || tag === 0) {
5174
+ break;
5175
+ }
5176
+ reader.skipType(tag & 7);
5177
+ }
5178
+ return message;
5179
+ },
5180
+ fromJSON(object) {
5181
+ return {
5182
+ token: isSet3(object.token) ? globalThis.String(object.token) : "",
5183
+ device_id: isSet3(object.device_id) ? globalThis.String(object.device_id) : "",
5184
+ platform: isSet3(object.platform) ? globalThis.String(object.platform) : ""
5185
+ };
5186
+ },
5187
+ toJSON(message) {
5188
+ const obj = {};
5189
+ if (message.token !== "") {
5190
+ obj.token = message.token;
5191
+ }
5192
+ if (message.device_id !== "") {
5193
+ obj.device_id = message.device_id;
5194
+ }
5195
+ if (message.platform !== "") {
5196
+ obj.platform = message.platform;
5197
+ }
5198
+ return obj;
5199
+ },
5200
+ create(base) {
5201
+ return RegistFcmDeviceTokenResponse.fromPartial(base != null ? base : {});
5202
+ },
5203
+ fromPartial(object) {
5204
+ var _a, _b, _c;
5205
+ const message = createBaseRegistFcmDeviceTokenResponse();
5206
+ message.token = (_a = object.token) != null ? _a : "";
5207
+ message.device_id = (_b = object.device_id) != null ? _b : "";
5208
+ message.platform = (_c = object.platform) != null ? _c : "";
5209
+ return message;
5210
+ }
5211
+ };
4915
5212
  function createBaseNotification() {
4916
5213
  return {
4917
5214
  id: "",
@@ -5365,6 +5662,115 @@ var NotificationList = {
5365
5662
  return message;
5366
5663
  }
5367
5664
  };
5665
+ function createBaseSession() {
5666
+ return { created: false, token: "", refresh_token: "", user_id: "", is_remember: false };
5667
+ }
5668
+ var Session = {
5669
+ encode(message, writer = import_minimal4.default.Writer.create()) {
5670
+ if (message.created !== false) {
5671
+ writer.uint32(8).bool(message.created);
5672
+ }
5673
+ if (message.token !== "") {
5674
+ writer.uint32(18).string(message.token);
5675
+ }
5676
+ if (message.refresh_token !== "") {
5677
+ writer.uint32(26).string(message.refresh_token);
5678
+ }
5679
+ if (message.user_id !== "") {
5680
+ writer.uint32(34).string(message.user_id);
5681
+ }
5682
+ if (message.is_remember !== false) {
5683
+ writer.uint32(40).bool(message.is_remember);
5684
+ }
5685
+ return writer;
5686
+ },
5687
+ decode(input, length) {
5688
+ const reader = input instanceof import_minimal4.default.Reader ? input : import_minimal4.default.Reader.create(input);
5689
+ let end = length === void 0 ? reader.len : reader.pos + length;
5690
+ const message = createBaseSession();
5691
+ while (reader.pos < end) {
5692
+ const tag = reader.uint32();
5693
+ switch (tag >>> 3) {
5694
+ case 1:
5695
+ if (tag !== 8) {
5696
+ break;
5697
+ }
5698
+ message.created = reader.bool();
5699
+ continue;
5700
+ case 2:
5701
+ if (tag !== 18) {
5702
+ break;
5703
+ }
5704
+ message.token = reader.string();
5705
+ continue;
5706
+ case 3:
5707
+ if (tag !== 26) {
5708
+ break;
5709
+ }
5710
+ message.refresh_token = reader.string();
5711
+ continue;
5712
+ case 4:
5713
+ if (tag !== 34) {
5714
+ break;
5715
+ }
5716
+ message.user_id = reader.string();
5717
+ continue;
5718
+ case 5:
5719
+ if (tag !== 40) {
5720
+ break;
5721
+ }
5722
+ message.is_remember = reader.bool();
5723
+ continue;
5724
+ }
5725
+ if ((tag & 7) === 4 || tag === 0) {
5726
+ break;
5727
+ }
5728
+ reader.skipType(tag & 7);
5729
+ }
5730
+ return message;
5731
+ },
5732
+ fromJSON(object) {
5733
+ return {
5734
+ created: isSet3(object.created) ? globalThis.Boolean(object.created) : false,
5735
+ token: isSet3(object.token) ? globalThis.String(object.token) : "",
5736
+ refresh_token: isSet3(object.refresh_token) ? globalThis.String(object.refresh_token) : "",
5737
+ user_id: isSet3(object.user_id) ? globalThis.String(object.user_id) : "",
5738
+ is_remember: isSet3(object.is_remember) ? globalThis.Boolean(object.is_remember) : false
5739
+ };
5740
+ },
5741
+ toJSON(message) {
5742
+ const obj = {};
5743
+ if (message.created !== false) {
5744
+ obj.created = message.created;
5745
+ }
5746
+ if (message.token !== "") {
5747
+ obj.token = message.token;
5748
+ }
5749
+ if (message.refresh_token !== "") {
5750
+ obj.refresh_token = message.refresh_token;
5751
+ }
5752
+ if (message.user_id !== "") {
5753
+ obj.user_id = message.user_id;
5754
+ }
5755
+ if (message.is_remember !== false) {
5756
+ obj.is_remember = message.is_remember;
5757
+ }
5758
+ return obj;
5759
+ },
5760
+ create(base) {
5761
+ return Session.fromPartial(base != null ? base : {});
5762
+ },
5763
+ fromPartial(object) {
5764
+ var _a, _b, _c, _d, _e;
5765
+ const message = createBaseSession();
5766
+ message.created = (_a = object.created) != null ? _a : false;
5767
+ message.token = (_b = object.token) != null ? _b : "";
5768
+ message.refresh_token = (_c = object.refresh_token) != null ? _c : "";
5769
+ message.user_id = (_d = object.user_id) != null ? _d : "";
5770
+ message.is_remember = (_e = object.is_remember) != null ? _e : false;
5771
+ return message;
5772
+ }
5773
+ };
5368
5774
  function createBaseUser() {
5369
5775
  return {
5370
5776
  id: "",
@@ -9935,6 +10341,7 @@ function createBaseApp() {
9935
10341
  applogo: "",
9936
10342
  is_shadow: false,
9937
10343
  disable_time: void 0,
10344
+ create_time: void 0,
9938
10345
  token: "",
9939
10346
  role: 0,
9940
10347
  about: "",
@@ -9961,17 +10368,20 @@ var App = {
9961
10368
  if (message.disable_time !== void 0) {
9962
10369
  Timestamp.encode(toTimestamp(message.disable_time), writer.uint32(50).fork()).ldelim();
9963
10370
  }
10371
+ if (message.create_time !== void 0) {
10372
+ Timestamp.encode(toTimestamp(message.create_time), writer.uint32(58).fork()).ldelim();
10373
+ }
9964
10374
  if (message.token !== "") {
9965
- writer.uint32(58).string(message.token);
10375
+ writer.uint32(66).string(message.token);
9966
10376
  }
9967
10377
  if (message.role !== 0) {
9968
- writer.uint32(64).int32(message.role);
10378
+ writer.uint32(72).int32(message.role);
9969
10379
  }
9970
10380
  if (message.about !== "") {
9971
- writer.uint32(74).string(message.about);
10381
+ writer.uint32(82).string(message.about);
9972
10382
  }
9973
10383
  if (message.app_url !== "") {
9974
- writer.uint32(82).string(message.app_url);
10384
+ writer.uint32(90).string(message.app_url);
9975
10385
  }
9976
10386
  return writer;
9977
10387
  },
@@ -10022,24 +10432,30 @@ var App = {
10022
10432
  if (tag !== 58) {
10023
10433
  break;
10024
10434
  }
10025
- message.token = reader.string();
10435
+ message.create_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
10026
10436
  continue;
10027
10437
  case 8:
10028
- if (tag !== 64) {
10438
+ if (tag !== 66) {
10029
10439
  break;
10030
10440
  }
10031
- message.role = reader.int32();
10441
+ message.token = reader.string();
10032
10442
  continue;
10033
10443
  case 9:
10034
- if (tag !== 74) {
10444
+ if (tag !== 72) {
10035
10445
  break;
10036
10446
  }
10037
- message.about = reader.string();
10447
+ message.role = reader.int32();
10038
10448
  continue;
10039
10449
  case 10:
10040
10450
  if (tag !== 82) {
10041
10451
  break;
10042
10452
  }
10453
+ message.about = reader.string();
10454
+ continue;
10455
+ case 11:
10456
+ if (tag !== 90) {
10457
+ break;
10458
+ }
10043
10459
  message.app_url = reader.string();
10044
10460
  continue;
10045
10461
  }
@@ -10058,6 +10474,7 @@ var App = {
10058
10474
  applogo: isSet3(object.applogo) ? globalThis.String(object.applogo) : "",
10059
10475
  is_shadow: isSet3(object.is_shadow) ? globalThis.Boolean(object.is_shadow) : false,
10060
10476
  disable_time: isSet3(object.disable_time) ? fromJsonTimestamp(object.disable_time) : void 0,
10477
+ create_time: isSet3(object.create_time) ? fromJsonTimestamp(object.create_time) : void 0,
10061
10478
  token: isSet3(object.token) ? globalThis.String(object.token) : "",
10062
10479
  role: isSet3(object.role) ? globalThis.Number(object.role) : 0,
10063
10480
  about: isSet3(object.about) ? globalThis.String(object.about) : "",
@@ -10084,6 +10501,9 @@ var App = {
10084
10501
  if (message.disable_time !== void 0) {
10085
10502
  obj.disable_time = message.disable_time.toISOString();
10086
10503
  }
10504
+ if (message.create_time !== void 0) {
10505
+ obj.create_time = message.create_time.toISOString();
10506
+ }
10087
10507
  if (message.token !== "") {
10088
10508
  obj.token = message.token;
10089
10509
  }
@@ -10102,7 +10522,7 @@ var App = {
10102
10522
  return App.fromPartial(base != null ? base : {});
10103
10523
  },
10104
10524
  fromPartial(object) {
10105
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
10525
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
10106
10526
  const message = createBaseApp();
10107
10527
  message.id = (_a = object.id) != null ? _a : "";
10108
10528
  message.appname = (_b = object.appname) != null ? _b : "";
@@ -10110,10 +10530,11 @@ var App = {
10110
10530
  message.applogo = (_d = object.applogo) != null ? _d : "";
10111
10531
  message.is_shadow = (_e = object.is_shadow) != null ? _e : false;
10112
10532
  message.disable_time = (_f = object.disable_time) != null ? _f : void 0;
10113
- message.token = (_g = object.token) != null ? _g : "";
10114
- message.role = (_h = object.role) != null ? _h : 0;
10115
- message.about = (_i = object.about) != null ? _i : "";
10116
- message.app_url = (_j = object.app_url) != null ? _j : "";
10533
+ message.create_time = (_g = object.create_time) != null ? _g : void 0;
10534
+ message.token = (_h = object.token) != null ? _h : "";
10535
+ message.role = (_i = object.role) != null ? _i : 0;
10536
+ message.about = (_j = object.about) != null ? _j : "";
10537
+ message.app_url = (_k = object.app_url) != null ? _k : "";
10117
10538
  return message;
10118
10539
  }
10119
10540
  };
@@ -14432,7 +14853,9 @@ function createBaseLogedDevice() {
14432
14853
  status: 0,
14433
14854
  platform: "",
14434
14855
  ip: "",
14435
- last_active: void 0
14856
+ last_active: void 0,
14857
+ location: "",
14858
+ is_current: false
14436
14859
  };
14437
14860
  }
14438
14861
  var LogedDevice = {
@@ -14458,6 +14881,12 @@ var LogedDevice = {
14458
14881
  if (message.last_active !== void 0) {
14459
14882
  Timestamp.encode(toTimestamp(message.last_active), writer.uint32(58).fork()).ldelim();
14460
14883
  }
14884
+ if (message.location !== "") {
14885
+ writer.uint32(66).string(message.location);
14886
+ }
14887
+ if (message.is_current !== false) {
14888
+ writer.uint32(72).bool(message.is_current);
14889
+ }
14461
14890
  return writer;
14462
14891
  },
14463
14892
  decode(input, length) {
@@ -14509,6 +14938,18 @@ var LogedDevice = {
14509
14938
  }
14510
14939
  message.last_active = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
14511
14940
  continue;
14941
+ case 8:
14942
+ if (tag !== 66) {
14943
+ break;
14944
+ }
14945
+ message.location = reader.string();
14946
+ continue;
14947
+ case 9:
14948
+ if (tag !== 72) {
14949
+ break;
14950
+ }
14951
+ message.is_current = reader.bool();
14952
+ continue;
14512
14953
  }
14513
14954
  if ((tag & 7) === 4 || tag === 0) {
14514
14955
  break;
@@ -14525,7 +14966,9 @@ var LogedDevice = {
14525
14966
  status: isSet3(object.status) ? globalThis.Number(object.status) : 0,
14526
14967
  platform: isSet3(object.platform) ? globalThis.String(object.platform) : "",
14527
14968
  ip: isSet3(object.ip) ? globalThis.String(object.ip) : "",
14528
- last_active: isSet3(object.last_active) ? fromJsonTimestamp(object.last_active) : void 0
14969
+ last_active: isSet3(object.last_active) ? fromJsonTimestamp(object.last_active) : void 0,
14970
+ location: isSet3(object.location) ? globalThis.String(object.location) : "",
14971
+ is_current: isSet3(object.is_current) ? globalThis.Boolean(object.is_current) : false
14529
14972
  };
14530
14973
  },
14531
14974
  toJSON(message) {
@@ -14551,13 +14994,19 @@ var LogedDevice = {
14551
14994
  if (message.last_active !== void 0) {
14552
14995
  obj.last_active = message.last_active.toISOString();
14553
14996
  }
14997
+ if (message.location !== "") {
14998
+ obj.location = message.location;
14999
+ }
15000
+ if (message.is_current !== false) {
15001
+ obj.is_current = message.is_current;
15002
+ }
14554
15003
  return obj;
14555
15004
  },
14556
15005
  create(base) {
14557
15006
  return LogedDevice.fromPartial(base != null ? base : {});
14558
15007
  },
14559
15008
  fromPartial(object) {
14560
- var _a, _b, _c, _d, _e, _f, _g;
15009
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
14561
15010
  const message = createBaseLogedDevice();
14562
15011
  message.device_id = (_a = object.device_id) != null ? _a : "";
14563
15012
  message.device_name = (_b = object.device_name) != null ? _b : "";
@@ -14566,6 +15015,8 @@ var LogedDevice = {
14566
15015
  message.platform = (_e = object.platform) != null ? _e : "";
14567
15016
  message.ip = (_f = object.ip) != null ? _f : "";
14568
15017
  message.last_active = (_g = object.last_active) != null ? _g : void 0;
15018
+ message.location = (_h = object.location) != null ? _h : "";
15019
+ message.is_current = (_i = object.is_current) != null ? _i : false;
14569
15020
  return message;
14570
15021
  }
14571
15022
  };
@@ -14601,6 +15052,9 @@ if (import_minimal4.default.util.Long !== import_long3.default) {
14601
15052
  import_minimal4.default.util.Long = import_long3.default;
14602
15053
  import_minimal4.default.configure();
14603
15054
  }
15055
+ function isObject(value) {
15056
+ return typeof value === "object" && value !== null;
15057
+ }
14604
15058
  function isSet3(value) {
14605
15059
  return value !== null && value !== void 0;
14606
15060
  }
@@ -15093,25 +15547,31 @@ var MezonApi = class {
15093
15547
  }
15094
15548
  const urlPath = "/v2/account/session/refresh";
15095
15549
  const queryParams = /* @__PURE__ */ new Map();
15096
- let bodyJson = "";
15097
- bodyJson = JSON.stringify(body || {});
15550
+ const bodyWriter = SessionRefreshRequest.encode(
15551
+ SessionRefreshRequest.fromPartial(body)
15552
+ );
15553
+ const encodedBody = bodyWriter.finish();
15098
15554
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
15099
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
15555
+ const fetchOptions = buildFetchOptions("POST", options, "");
15556
+ fetchOptions.body = encodedBody;
15100
15557
  if (basicAuthUsername) {
15101
15558
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
15102
15559
  }
15560
+ fetchOptions.headers["Content-Type"] = "application/x-protobuf";
15561
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15103
15562
  return Promise.race([
15104
- fetch(fullUrl, fetchOptions).then((response) => {
15563
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15105
15564
  if (response.status == 204) {
15106
- return response;
15565
+ return {};
15107
15566
  } else if (response.status >= 200 && response.status < 300) {
15108
- return response.json();
15567
+ const buffer = yield response.arrayBuffer();
15568
+ return Session.decode(new Uint8Array(buffer));
15109
15569
  } else {
15110
15570
  throw response;
15111
15571
  }
15112
- }),
15572
+ })),
15113
15573
  new Promise(
15114
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15574
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15115
15575
  )
15116
15576
  ]);
15117
15577
  }
@@ -16736,18 +17196,20 @@ var MezonApi = class {
16736
17196
  if (bearerToken) {
16737
17197
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
16738
17198
  }
17199
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
16739
17200
  return Promise.race([
16740
- fetch(fullUrl, fetchOptions).then((response) => {
17201
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
16741
17202
  if (response.status == 204) {
16742
- return response;
17203
+ return {};
16743
17204
  } else if (response.status >= 200 && response.status < 300) {
16744
- return response.json();
17205
+ const buffer = yield response.arrayBuffer();
17206
+ return RegistFcmDeviceTokenResponse.decode(new Uint8Array(buffer));
16745
17207
  } else {
16746
17208
  throw response;
16747
17209
  }
16748
- }),
17210
+ })),
16749
17211
  new Promise(
16750
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
17212
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
16751
17213
  )
16752
17214
  ]);
16753
17215
  }
@@ -19685,35 +20147,6 @@ var MezonApi = class {
19685
20147
  )
19686
20148
  ]);
19687
20149
  }
19688
- /** Store wallet key */
19689
- storeWalletKey(bearerToken, body, options = {}) {
19690
- if (body === null || body === void 0) {
19691
- throw new Error("'body' is a required parameter but is null or undefined.");
19692
- }
19693
- const urlPath = "/v2/wallet/key";
19694
- const queryParams = /* @__PURE__ */ new Map();
19695
- let bodyJson = "";
19696
- bodyJson = JSON.stringify(body || {});
19697
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
19698
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
19699
- if (bearerToken) {
19700
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
19701
- }
19702
- return Promise.race([
19703
- fetch(fullUrl, fetchOptions).then((response) => {
19704
- if (response.status == 204) {
19705
- return response;
19706
- } else if (response.status >= 200 && response.status < 300) {
19707
- return response.json();
19708
- } else {
19709
- throw response;
19710
- }
19711
- }),
19712
- new Promise(
19713
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
19714
- )
19715
- ]);
19716
- }
19717
20150
  /** create webhook */
19718
20151
  generateWebhook(bearerToken, body, options = {}) {
19719
20152
  if (body === null || body === void 0) {
@@ -21136,7 +21569,7 @@ var MezonApi = class {
21136
21569
  };
21137
21570
 
21138
21571
  // session.ts
21139
- var Session = class _Session {
21572
+ var Session2 = class _Session {
21140
21573
  constructor(token, refresh_token, created, api_url, id_token, is_remember) {
21141
21574
  this.created = created;
21142
21575
  this.api_url = api_url;
@@ -22592,7 +23025,7 @@ var Client = class {
22592
23025
  isRemember,
22593
23026
  options
22594
23027
  ).then((apiSession) => {
22595
- return new Session(
23028
+ return new Session2(
22596
23029
  apiSession.token || "",
22597
23030
  apiSession.refresh_token || "",
22598
23031
  apiSession.created || false,
@@ -22631,7 +23064,7 @@ var Client = class {
22631
23064
  confirmAuthenticateOTP(request) {
22632
23065
  return __async(this, null, function* () {
22633
23066
  return this.apiClient.confirmAuthenticateOTP(this.serverkey, "", request).then((apiSession) => {
22634
- return new Session(
23067
+ return new Session2(
22635
23068
  apiSession.token || "",
22636
23069
  apiSession.refresh_token || "",
22637
23070
  apiSession.created || false,
@@ -22653,7 +23086,7 @@ var Client = class {
22653
23086
  }
22654
23087
  };
22655
23088
  return this.apiClient.authenticateEmail(this.serverkey, "", request, username).then((apiSession) => {
22656
- return new Session(
23089
+ return new Session2(
22657
23090
  apiSession.token || "",
22658
23091
  apiSession.refresh_token || "",
22659
23092
  apiSession.created || false,
@@ -24642,7 +25075,7 @@ var Client = class {
24642
25075
  if (!(apiSession == null ? void 0 : apiSession.token)) {
24643
25076
  return null;
24644
25077
  }
24645
- return new Session(
25078
+ return new Session2(
24646
25079
  apiSession.token || "",
24647
25080
  apiSession.refresh_token || "",
24648
25081
  apiSession.created || false,