mezon-js 2.13.73 → 2.13.75

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 CHANGED
@@ -2589,6 +2589,10 @@ export interface App {
2589
2589
  disable_time:
2590
2590
  | Date
2591
2591
  | undefined;
2592
+ /** The UNIX time when the app was created */
2593
+ create_time:
2594
+ | Date
2595
+ | undefined;
2592
2596
  /** string token */
2593
2597
  token: string;
2594
2598
  /** role */
@@ -3785,7 +3789,7 @@ export interface LogedDevice {
3785
3789
  ip: string;
3786
3790
  last_active: Date | undefined;
3787
3791
  location: string;
3788
- is_current_device: boolean;
3792
+ is_current: boolean;
3789
3793
  }
3790
3794
 
3791
3795
  function createBaseAccount(): Account {
@@ -25771,6 +25775,7 @@ function createBaseApp(): App {
25771
25775
  applogo: "",
25772
25776
  is_shadow: false,
25773
25777
  disable_time: undefined,
25778
+ create_time: undefined,
25774
25779
  token: "",
25775
25780
  role: 0,
25776
25781
  about: "",
@@ -25798,17 +25803,20 @@ export const App = {
25798
25803
  if (message.disable_time !== undefined) {
25799
25804
  Timestamp.encode(toTimestamp(message.disable_time), writer.uint32(50).fork()).ldelim();
25800
25805
  }
25806
+ if (message.create_time !== undefined) {
25807
+ Timestamp.encode(toTimestamp(message.create_time), writer.uint32(58).fork()).ldelim();
25808
+ }
25801
25809
  if (message.token !== "") {
25802
- writer.uint32(58).string(message.token);
25810
+ writer.uint32(66).string(message.token);
25803
25811
  }
25804
25812
  if (message.role !== 0) {
25805
- writer.uint32(64).int32(message.role);
25813
+ writer.uint32(72).int32(message.role);
25806
25814
  }
25807
25815
  if (message.about !== "") {
25808
- writer.uint32(74).string(message.about);
25816
+ writer.uint32(82).string(message.about);
25809
25817
  }
25810
25818
  if (message.app_url !== "") {
25811
- writer.uint32(82).string(message.app_url);
25819
+ writer.uint32(90).string(message.app_url);
25812
25820
  }
25813
25821
  return writer;
25814
25822
  },
@@ -25867,27 +25875,34 @@ export const App = {
25867
25875
  break;
25868
25876
  }
25869
25877
 
25870
- message.token = reader.string();
25878
+ message.create_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
25871
25879
  continue;
25872
25880
  case 8:
25873
- if (tag !== 64) {
25881
+ if (tag !== 66) {
25874
25882
  break;
25875
25883
  }
25876
25884
 
25877
- message.role = reader.int32();
25885
+ message.token = reader.string();
25878
25886
  continue;
25879
25887
  case 9:
25880
- if (tag !== 74) {
25888
+ if (tag !== 72) {
25881
25889
  break;
25882
25890
  }
25883
25891
 
25884
- message.about = reader.string();
25892
+ message.role = reader.int32();
25885
25893
  continue;
25886
25894
  case 10:
25887
25895
  if (tag !== 82) {
25888
25896
  break;
25889
25897
  }
25890
25898
 
25899
+ message.about = reader.string();
25900
+ continue;
25901
+ case 11:
25902
+ if (tag !== 90) {
25903
+ break;
25904
+ }
25905
+
25891
25906
  message.app_url = reader.string();
25892
25907
  continue;
25893
25908
  }
@@ -25907,6 +25922,7 @@ export const App = {
25907
25922
  applogo: isSet(object.applogo) ? globalThis.String(object.applogo) : "",
25908
25923
  is_shadow: isSet(object.is_shadow) ? globalThis.Boolean(object.is_shadow) : false,
25909
25924
  disable_time: isSet(object.disable_time) ? fromJsonTimestamp(object.disable_time) : undefined,
25925
+ create_time: isSet(object.create_time) ? fromJsonTimestamp(object.create_time) : undefined,
25910
25926
  token: isSet(object.token) ? globalThis.String(object.token) : "",
25911
25927
  role: isSet(object.role) ? globalThis.Number(object.role) : 0,
25912
25928
  about: isSet(object.about) ? globalThis.String(object.about) : "",
@@ -25934,6 +25950,9 @@ export const App = {
25934
25950
  if (message.disable_time !== undefined) {
25935
25951
  obj.disable_time = message.disable_time.toISOString();
25936
25952
  }
25953
+ if (message.create_time !== undefined) {
25954
+ obj.create_time = message.create_time.toISOString();
25955
+ }
25937
25956
  if (message.token !== "") {
25938
25957
  obj.token = message.token;
25939
25958
  }
@@ -25960,6 +25979,7 @@ export const App = {
25960
25979
  message.applogo = object.applogo ?? "";
25961
25980
  message.is_shadow = object.is_shadow ?? false;
25962
25981
  message.disable_time = object.disable_time ?? undefined;
25982
+ message.create_time = object.create_time ?? undefined;
25963
25983
  message.token = object.token ?? "";
25964
25984
  message.role = object.role ?? 0;
25965
25985
  message.about = object.about ?? "";
@@ -38875,7 +38895,7 @@ function createBaseLogedDevice(): LogedDevice {
38875
38895
  ip: "",
38876
38896
  last_active: undefined,
38877
38897
  location: "",
38878
- is_current_device: false,
38898
+ is_current: false,
38879
38899
  };
38880
38900
  }
38881
38901
 
@@ -38905,8 +38925,8 @@ export const LogedDevice = {
38905
38925
  if (message.location !== "") {
38906
38926
  writer.uint32(66).string(message.location);
38907
38927
  }
38908
- if (message.is_current_device !== false) {
38909
- writer.uint32(72).bool(message.is_current_device);
38928
+ if (message.is_current !== false) {
38929
+ writer.uint32(72).bool(message.is_current);
38910
38930
  }
38911
38931
  return writer;
38912
38932
  },
@@ -38979,7 +38999,7 @@ export const LogedDevice = {
38979
38999
  break;
38980
39000
  }
38981
39001
 
38982
- message.is_current_device = reader.bool();
39002
+ message.is_current = reader.bool();
38983
39003
  continue;
38984
39004
  }
38985
39005
  if ((tag & 7) === 4 || tag === 0) {
@@ -39000,7 +39020,7 @@ export const LogedDevice = {
39000
39020
  ip: isSet(object.ip) ? globalThis.String(object.ip) : "",
39001
39021
  last_active: isSet(object.last_active) ? fromJsonTimestamp(object.last_active) : undefined,
39002
39022
  location: isSet(object.location) ? globalThis.String(object.location) : "",
39003
- is_current_device: isSet(object.is_current_device) ? globalThis.Boolean(object.is_current_device) : false,
39023
+ is_current: isSet(object.is_current) ? globalThis.Boolean(object.is_current) : false,
39004
39024
  };
39005
39025
  },
39006
39026
 
@@ -39030,8 +39050,8 @@ export const LogedDevice = {
39030
39050
  if (message.location !== "") {
39031
39051
  obj.location = message.location;
39032
39052
  }
39033
- if (message.is_current_device !== false) {
39034
- obj.is_current_device = message.is_current_device;
39053
+ if (message.is_current !== false) {
39054
+ obj.is_current = message.is_current;
39035
39055
  }
39036
39056
  return obj;
39037
39057
  },
@@ -39049,7 +39069,7 @@ export const LogedDevice = {
39049
39069
  message.ip = object.ip ?? "";
39050
39070
  message.last_active = object.last_active ?? undefined;
39051
39071
  message.location = object.location ?? "";
39052
- message.is_current_device = object.is_current_device ?? false;
39072
+ message.is_current = object.is_current ?? false;
39053
39073
  return message;
39054
39074
  },
39055
39075
  };
package/api.gen.ts CHANGED
@@ -541,6 +541,8 @@ export interface ApiApp {
541
541
  creator_id?: string;
542
542
  //The UNIX time when the app was disabled.
543
543
  disable_time?: string;
544
+ //The UNIX time when the app was created.
545
+ create_time?: string;
544
546
  //
545
547
  id?: string;
546
548
  //
@@ -3619,19 +3621,21 @@ export class MezonApi {
3619
3621
  fetchOptions.headers["Authorization"] =
3620
3622
  "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
3621
3623
  }
3624
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
3622
3625
 
3623
3626
  return Promise.race([
3624
- fetch(fullUrl, fetchOptions).then((response) => {
3627
+ fetch(fullUrl, fetchOptions).then(async (response) => {
3625
3628
  if (response.status == 204) {
3626
- return response;
3629
+ return {} as ApiSession;
3627
3630
  } else if (response.status >= 200 && response.status < 300) {
3628
- return response.json();
3631
+ const buffer = await response.arrayBuffer();
3632
+ return tsproto.Session.decode(new Uint8Array(buffer)) as unknown as ApiSession;
3629
3633
  } else {
3630
3634
  throw response;
3631
3635
  }
3632
3636
  }),
3633
- new Promise((_, reject) =>
3634
- setTimeout(reject, this.timeoutMs, "Request timed out.")
3637
+ new Promise<never>((_, reject) =>
3638
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
3635
3639
  ),
3636
3640
  ]);
3637
3641
  }
@@ -3814,19 +3818,21 @@ export class MezonApi {
3814
3818
  if (basicAuthUsername) {
3815
3819
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
3816
3820
  }
3821
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
3817
3822
 
3818
3823
  return Promise.race([
3819
- fetch(fullUrl, fetchOptions).then((response) => {
3824
+ fetch(fullUrl, fetchOptions).then(async (response) => {
3820
3825
  if (response.status == 204) {
3821
- return response;
3826
+ return {} as ApiSession;
3822
3827
  } else if (response.status >= 200 && response.status < 300) {
3823
- return response.json();
3828
+ const buffer = await response.arrayBuffer();
3829
+ return tsproto.Session.decode(new Uint8Array(buffer)) as unknown as ApiSession;
3824
3830
  } else {
3825
3831
  throw response;
3826
3832
  }
3827
3833
  }),
3828
- new Promise((_, reject) =>
3829
- setTimeout(reject, this.timeoutMs, "Request timed out.")
3834
+ new Promise<never>((_, reject) =>
3835
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
3830
3836
  ),
3831
3837
  ]);
3832
3838
  }
@@ -3859,19 +3865,21 @@ export class MezonApi {
3859
3865
  if (basicAuthUsername) {
3860
3866
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
3861
3867
  }
3868
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
3862
3869
 
3863
3870
  return Promise.race([
3864
- fetch(fullUrl, fetchOptions).then((response) => {
3871
+ fetch(fullUrl, fetchOptions).then(async (response) => {
3865
3872
  if (response.status == 204) {
3866
- return response;
3873
+ return {} as ApiSession;
3867
3874
  } else if (response.status >= 200 && response.status < 300) {
3868
- return response.json();
3875
+ const buffer = await response.arrayBuffer();
3876
+ return tsproto.Session.decode(new Uint8Array(buffer)) as unknown as ApiSession;
3869
3877
  } else {
3870
3878
  throw response;
3871
3879
  }
3872
3880
  }),
3873
- new Promise((_, reject) =>
3874
- setTimeout(reject, this.timeoutMs, "Request timed out.")
3881
+ new Promise<never>((_, reject) =>
3882
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
3875
3883
  ),
3876
3884
  ]);
3877
3885
  }
@@ -3970,19 +3978,21 @@ export class MezonApi {
3970
3978
  if (bearerToken) {
3971
3979
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3972
3980
  }
3981
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
3973
3982
 
3974
3983
  return Promise.race([
3975
- fetch(fullUrl, fetchOptions).then((response) => {
3984
+ fetch(fullUrl, fetchOptions).then(async (response) => {
3976
3985
  if (response.status == 204) {
3977
- return response;
3986
+ return {} as ApiSession;
3978
3987
  } else if (response.status >= 200 && response.status < 300) {
3979
- return response.json();
3988
+ const buffer = await response.arrayBuffer();
3989
+ return tsproto.Session.decode(new Uint8Array(buffer)) as unknown as ApiSession;
3980
3990
  } else {
3981
3991
  throw response;
3982
3992
  }
3983
3993
  }),
3984
- new Promise((_, reject) =>
3985
- setTimeout(reject, this.timeoutMs, "Request timed out.")
3994
+ new Promise<never>((_, reject) =>
3995
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
3986
3996
  ),
3987
3997
  ]);
3988
3998
  }
@@ -4008,19 +4018,21 @@ export class MezonApi {
4008
4018
  if (basicAuthUsername) {
4009
4019
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
4010
4020
  }
4021
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4011
4022
 
4012
4023
  return Promise.race([
4013
- fetch(fullUrl, fetchOptions).then((response) => {
4024
+ fetch(fullUrl, fetchOptions).then(async(response) => {
4014
4025
  if (response.status == 204) {
4015
- return response;
4026
+ return {} as ApiSession;
4016
4027
  } else if (response.status >= 200 && response.status < 300) {
4017
- return response.json();
4028
+ const buffer = await response.arrayBuffer();
4029
+ return tsproto.Session.decode(new Uint8Array(buffer)) as unknown as ApiSession;
4018
4030
  } else {
4019
4031
  throw response;
4020
4032
  }
4021
4033
  }),
4022
- new Promise((_, reject) =>
4023
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4034
+ new Promise<never>((_, reject) =>
4035
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4024
4036
  ),
4025
4037
  ]);
4026
4038
  }
@@ -4047,19 +4059,21 @@ export class MezonApi {
4047
4059
  if (bearerToken) {
4048
4060
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4049
4061
  }
4062
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4050
4063
 
4051
4064
  return Promise.race([
4052
- fetch(fullUrl, fetchOptions).then((response) => {
4065
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4053
4066
  if (response.status == 204) {
4054
- return response;
4067
+ return {} as ApiSession;
4055
4068
  } else if (response.status >= 200 && response.status < 300) {
4056
- return response.json();
4069
+ const buffer = await response.arrayBuffer();
4070
+ return tsproto.Session.decode(new Uint8Array(buffer)) as unknown as ApiSession;
4057
4071
  } else {
4058
4072
  throw response;
4059
4073
  }
4060
4074
  }),
4061
- new Promise((_, reject) =>
4062
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4075
+ new Promise<never>((_, reject) =>
4076
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4063
4077
  ),
4064
4078
  ]);
4065
4079
  }
@@ -11634,19 +11648,21 @@ export class MezonApi {
11634
11648
  if (bearerToken) {
11635
11649
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
11636
11650
  }
11651
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
11637
11652
 
11638
11653
  return Promise.race([
11639
- fetch(fullUrl, fetchOptions).then((response) => {
11654
+ fetch(fullUrl, fetchOptions).then(async (response) => {
11640
11655
  if (response.status == 204) {
11641
- return response;
11656
+ return {} as ApiSession;
11642
11657
  } else if (response.status >= 200 && response.status < 300) {
11643
- return response.json();
11658
+ const buffer = await response.arrayBuffer();
11659
+ return tsproto.Session.decode(new Uint8Array(buffer)) as unknown as ApiSession;
11644
11660
  } else {
11645
11661
  throw response;
11646
11662
  }
11647
11663
  }),
11648
- new Promise((_, reject) =>
11649
- setTimeout(reject, this.timeoutMs, "Request timed out.")
11664
+ new Promise<never>((_, reject) =>
11665
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
11650
11666
  ),
11651
11667
  ]);
11652
11668
  }
package/dist/api/api.d.ts CHANGED
@@ -2086,6 +2086,8 @@ export interface App {
2086
2086
  is_shadow: boolean;
2087
2087
  /** The UNIX time when the app was disabled. */
2088
2088
  disable_time: Date | undefined;
2089
+ /** The UNIX time when the app was created */
2090
+ create_time: Date | undefined;
2089
2091
  /** string token */
2090
2092
  token: string;
2091
2093
  /** role */
@@ -3118,7 +3120,7 @@ export interface LogedDevice {
3118
3120
  ip: string;
3119
3121
  last_active: Date | undefined;
3120
3122
  location: string;
3121
- is_current_device: boolean;
3123
+ is_current: boolean;
3122
3124
  }
3123
3125
  export declare const Account: {
3124
3126
  encode(message: Account, writer?: _m0.Writer): _m0.Writer;
@@ -16084,6 +16086,7 @@ export declare const App: {
16084
16086
  applogo?: string | undefined;
16085
16087
  is_shadow?: boolean | undefined;
16086
16088
  disable_time?: Date | undefined;
16089
+ create_time?: Date | undefined;
16087
16090
  token?: string | undefined;
16088
16091
  role?: number | undefined;
16089
16092
  about?: string | undefined;
@@ -16095,6 +16098,7 @@ export declare const App: {
16095
16098
  applogo?: string | undefined;
16096
16099
  is_shadow?: boolean | undefined;
16097
16100
  disable_time?: Date | undefined;
16101
+ create_time?: Date | undefined;
16098
16102
  token?: string | undefined;
16099
16103
  role?: number | undefined;
16100
16104
  about?: string | undefined;
@@ -16107,6 +16111,7 @@ export declare const App: {
16107
16111
  applogo?: string | undefined;
16108
16112
  is_shadow?: boolean | undefined;
16109
16113
  disable_time?: Date | undefined;
16114
+ create_time?: Date | undefined;
16110
16115
  token?: string | undefined;
16111
16116
  role?: number | undefined;
16112
16117
  about?: string | undefined;
@@ -16118,6 +16123,7 @@ export declare const App: {
16118
16123
  applogo?: string | undefined;
16119
16124
  is_shadow?: boolean | undefined;
16120
16125
  disable_time?: Date | undefined;
16126
+ create_time?: Date | undefined;
16121
16127
  token?: string | undefined;
16122
16128
  role?: number | undefined;
16123
16129
  about?: string | undefined;
@@ -16157,6 +16163,7 @@ export declare const AppList: {
16157
16163
  applogo?: string | undefined;
16158
16164
  is_shadow?: boolean | undefined;
16159
16165
  disable_time?: Date | undefined;
16166
+ create_time?: Date | undefined;
16160
16167
  token?: string | undefined;
16161
16168
  role?: number | undefined;
16162
16169
  about?: string | undefined;
@@ -16172,6 +16179,7 @@ export declare const AppList: {
16172
16179
  applogo?: string | undefined;
16173
16180
  is_shadow?: boolean | undefined;
16174
16181
  disable_time?: Date | undefined;
16182
+ create_time?: Date | undefined;
16175
16183
  token?: string | undefined;
16176
16184
  role?: number | undefined;
16177
16185
  about?: string | undefined;
@@ -16183,6 +16191,7 @@ export declare const AppList: {
16183
16191
  applogo?: string | undefined;
16184
16192
  is_shadow?: boolean | undefined;
16185
16193
  disable_time?: Date | undefined;
16194
+ create_time?: Date | undefined;
16186
16195
  token?: string | undefined;
16187
16196
  role?: number | undefined;
16188
16197
  about?: string | undefined;
@@ -16194,6 +16203,7 @@ export declare const AppList: {
16194
16203
  applogo?: string | undefined;
16195
16204
  is_shadow?: boolean | undefined;
16196
16205
  disable_time?: Date | undefined;
16206
+ create_time?: Date | undefined;
16197
16207
  token?: string | undefined;
16198
16208
  role?: number | undefined;
16199
16209
  about?: string | undefined;
@@ -16205,6 +16215,7 @@ export declare const AppList: {
16205
16215
  applogo?: string | undefined;
16206
16216
  is_shadow?: boolean | undefined;
16207
16217
  disable_time?: Date | undefined;
16218
+ create_time?: Date | undefined;
16208
16219
  token?: string | undefined;
16209
16220
  role?: number | undefined;
16210
16221
  about?: string | undefined;
@@ -16221,6 +16232,7 @@ export declare const AppList: {
16221
16232
  applogo?: string | undefined;
16222
16233
  is_shadow?: boolean | undefined;
16223
16234
  disable_time?: Date | undefined;
16235
+ create_time?: Date | undefined;
16224
16236
  token?: string | undefined;
16225
16237
  role?: number | undefined;
16226
16238
  about?: string | undefined;
@@ -16236,6 +16248,7 @@ export declare const AppList: {
16236
16248
  applogo?: string | undefined;
16237
16249
  is_shadow?: boolean | undefined;
16238
16250
  disable_time?: Date | undefined;
16251
+ create_time?: Date | undefined;
16239
16252
  token?: string | undefined;
16240
16253
  role?: number | undefined;
16241
16254
  about?: string | undefined;
@@ -16247,6 +16260,7 @@ export declare const AppList: {
16247
16260
  applogo?: string | undefined;
16248
16261
  is_shadow?: boolean | undefined;
16249
16262
  disable_time?: Date | undefined;
16263
+ create_time?: Date | undefined;
16250
16264
  token?: string | undefined;
16251
16265
  role?: number | undefined;
16252
16266
  about?: string | undefined;
@@ -16258,6 +16272,7 @@ export declare const AppList: {
16258
16272
  applogo?: string | undefined;
16259
16273
  is_shadow?: boolean | undefined;
16260
16274
  disable_time?: Date | undefined;
16275
+ create_time?: Date | undefined;
16261
16276
  token?: string | undefined;
16262
16277
  role?: number | undefined;
16263
16278
  about?: string | undefined;
@@ -16269,6 +16284,7 @@ export declare const AppList: {
16269
16284
  applogo?: string | undefined;
16270
16285
  is_shadow?: boolean | undefined;
16271
16286
  disable_time?: Date | undefined;
16287
+ create_time?: Date | undefined;
16272
16288
  token?: string | undefined;
16273
16289
  role?: number | undefined;
16274
16290
  about?: string | undefined;
@@ -23775,7 +23791,7 @@ export declare const LogedDeviceList: {
23775
23791
  ip?: string | undefined;
23776
23792
  last_active?: Date | undefined;
23777
23793
  location?: string | undefined;
23778
- is_current_device?: boolean | undefined;
23794
+ is_current?: boolean | undefined;
23779
23795
  }[] | undefined;
23780
23796
  } & {
23781
23797
  devices?: ({
@@ -23787,7 +23803,7 @@ export declare const LogedDeviceList: {
23787
23803
  ip?: string | undefined;
23788
23804
  last_active?: Date | undefined;
23789
23805
  location?: string | undefined;
23790
- is_current_device?: boolean | undefined;
23806
+ is_current?: boolean | undefined;
23791
23807
  }[] & ({
23792
23808
  device_id?: string | undefined;
23793
23809
  device_name?: string | undefined;
@@ -23797,7 +23813,7 @@ export declare const LogedDeviceList: {
23797
23813
  ip?: string | undefined;
23798
23814
  last_active?: Date | undefined;
23799
23815
  location?: string | undefined;
23800
- is_current_device?: boolean | undefined;
23816
+ is_current?: boolean | undefined;
23801
23817
  } & {
23802
23818
  device_id?: string | undefined;
23803
23819
  device_name?: string | undefined;
@@ -23807,7 +23823,7 @@ export declare const LogedDeviceList: {
23807
23823
  ip?: string | undefined;
23808
23824
  last_active?: Date | undefined;
23809
23825
  location?: string | undefined;
23810
- is_current_device?: boolean | undefined;
23826
+ is_current?: boolean | undefined;
23811
23827
  } & { [K in Exclude<keyof I["devices"][number], keyof LogedDevice>]: never; })[] & { [K_1 in Exclude<keyof I["devices"], keyof {
23812
23828
  device_id?: string | undefined;
23813
23829
  device_name?: string | undefined;
@@ -23817,7 +23833,7 @@ export declare const LogedDeviceList: {
23817
23833
  ip?: string | undefined;
23818
23834
  last_active?: Date | undefined;
23819
23835
  location?: string | undefined;
23820
- is_current_device?: boolean | undefined;
23836
+ is_current?: boolean | undefined;
23821
23837
  }[]>]: never; }) | undefined;
23822
23838
  } & { [K_2 in Exclude<keyof I, "devices">]: never; }>(base?: I | undefined): LogedDeviceList;
23823
23839
  fromPartial<I_1 extends {
@@ -23830,7 +23846,7 @@ export declare const LogedDeviceList: {
23830
23846
  ip?: string | undefined;
23831
23847
  last_active?: Date | undefined;
23832
23848
  location?: string | undefined;
23833
- is_current_device?: boolean | undefined;
23849
+ is_current?: boolean | undefined;
23834
23850
  }[] | undefined;
23835
23851
  } & {
23836
23852
  devices?: ({
@@ -23842,7 +23858,7 @@ export declare const LogedDeviceList: {
23842
23858
  ip?: string | undefined;
23843
23859
  last_active?: Date | undefined;
23844
23860
  location?: string | undefined;
23845
- is_current_device?: boolean | undefined;
23861
+ is_current?: boolean | undefined;
23846
23862
  }[] & ({
23847
23863
  device_id?: string | undefined;
23848
23864
  device_name?: string | undefined;
@@ -23852,7 +23868,7 @@ export declare const LogedDeviceList: {
23852
23868
  ip?: string | undefined;
23853
23869
  last_active?: Date | undefined;
23854
23870
  location?: string | undefined;
23855
- is_current_device?: boolean | undefined;
23871
+ is_current?: boolean | undefined;
23856
23872
  } & {
23857
23873
  device_id?: string | undefined;
23858
23874
  device_name?: string | undefined;
@@ -23862,7 +23878,7 @@ export declare const LogedDeviceList: {
23862
23878
  ip?: string | undefined;
23863
23879
  last_active?: Date | undefined;
23864
23880
  location?: string | undefined;
23865
- is_current_device?: boolean | undefined;
23881
+ is_current?: boolean | undefined;
23866
23882
  } & { [K_3 in Exclude<keyof I_1["devices"][number], keyof LogedDevice>]: never; })[] & { [K_4 in Exclude<keyof I_1["devices"], keyof {
23867
23883
  device_id?: string | undefined;
23868
23884
  device_name?: string | undefined;
@@ -23872,7 +23888,7 @@ export declare const LogedDeviceList: {
23872
23888
  ip?: string | undefined;
23873
23889
  last_active?: Date | undefined;
23874
23890
  location?: string | undefined;
23875
- is_current_device?: boolean | undefined;
23891
+ is_current?: boolean | undefined;
23876
23892
  }[]>]: never; }) | undefined;
23877
23893
  } & { [K_5 in Exclude<keyof I_1, "devices">]: never; }>(object: I_1): LogedDeviceList;
23878
23894
  };
@@ -23890,7 +23906,7 @@ export declare const LogedDevice: {
23890
23906
  ip?: string | undefined;
23891
23907
  last_active?: Date | undefined;
23892
23908
  location?: string | undefined;
23893
- is_current_device?: boolean | undefined;
23909
+ is_current?: boolean | undefined;
23894
23910
  } & {
23895
23911
  device_id?: string | undefined;
23896
23912
  device_name?: string | undefined;
@@ -23900,7 +23916,7 @@ export declare const LogedDevice: {
23900
23916
  ip?: string | undefined;
23901
23917
  last_active?: Date | undefined;
23902
23918
  location?: string | undefined;
23903
- is_current_device?: boolean | undefined;
23919
+ is_current?: boolean | undefined;
23904
23920
  } & { [K in Exclude<keyof I, keyof LogedDevice>]: never; }>(base?: I | undefined): LogedDevice;
23905
23921
  fromPartial<I_1 extends {
23906
23922
  device_id?: string | undefined;
@@ -23911,7 +23927,7 @@ export declare const LogedDevice: {
23911
23927
  ip?: string | undefined;
23912
23928
  last_active?: Date | undefined;
23913
23929
  location?: string | undefined;
23914
- is_current_device?: boolean | undefined;
23930
+ is_current?: boolean | undefined;
23915
23931
  } & {
23916
23932
  device_id?: string | undefined;
23917
23933
  device_name?: string | undefined;
@@ -23921,7 +23937,7 @@ export declare const LogedDevice: {
23921
23937
  ip?: string | undefined;
23922
23938
  last_active?: Date | undefined;
23923
23939
  location?: string | undefined;
23924
- is_current_device?: boolean | undefined;
23940
+ is_current?: boolean | undefined;
23925
23941
  } & { [K_1 in Exclude<keyof I_1, keyof LogedDevice>]: never; }>(object: I_1): LogedDevice;
23926
23942
  };
23927
23943
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
package/dist/api.gen.d.ts CHANGED
@@ -310,6 +310,7 @@ export interface ApiApp {
310
310
  appname?: string;
311
311
  creator_id?: string;
312
312
  disable_time?: string;
313
+ create_time?: string;
313
314
  id?: string;
314
315
  is_shadow?: boolean;
315
316
  role?: number;
@@ -10341,6 +10341,7 @@ function createBaseApp() {
10341
10341
  applogo: "",
10342
10342
  is_shadow: false,
10343
10343
  disable_time: void 0,
10344
+ create_time: void 0,
10344
10345
  token: "",
10345
10346
  role: 0,
10346
10347
  about: "",
@@ -10367,17 +10368,20 @@ var App = {
10367
10368
  if (message.disable_time !== void 0) {
10368
10369
  Timestamp.encode(toTimestamp(message.disable_time), writer.uint32(50).fork()).ldelim();
10369
10370
  }
10371
+ if (message.create_time !== void 0) {
10372
+ Timestamp.encode(toTimestamp(message.create_time), writer.uint32(58).fork()).ldelim();
10373
+ }
10370
10374
  if (message.token !== "") {
10371
- writer.uint32(58).string(message.token);
10375
+ writer.uint32(66).string(message.token);
10372
10376
  }
10373
10377
  if (message.role !== 0) {
10374
- writer.uint32(64).int32(message.role);
10378
+ writer.uint32(72).int32(message.role);
10375
10379
  }
10376
10380
  if (message.about !== "") {
10377
- writer.uint32(74).string(message.about);
10381
+ writer.uint32(82).string(message.about);
10378
10382
  }
10379
10383
  if (message.app_url !== "") {
10380
- writer.uint32(82).string(message.app_url);
10384
+ writer.uint32(90).string(message.app_url);
10381
10385
  }
10382
10386
  return writer;
10383
10387
  },
@@ -10428,24 +10432,30 @@ var App = {
10428
10432
  if (tag !== 58) {
10429
10433
  break;
10430
10434
  }
10431
- message.token = reader.string();
10435
+ message.create_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
10432
10436
  continue;
10433
10437
  case 8:
10434
- if (tag !== 64) {
10438
+ if (tag !== 66) {
10435
10439
  break;
10436
10440
  }
10437
- message.role = reader.int32();
10441
+ message.token = reader.string();
10438
10442
  continue;
10439
10443
  case 9:
10440
- if (tag !== 74) {
10444
+ if (tag !== 72) {
10441
10445
  break;
10442
10446
  }
10443
- message.about = reader.string();
10447
+ message.role = reader.int32();
10444
10448
  continue;
10445
10449
  case 10:
10446
10450
  if (tag !== 82) {
10447
10451
  break;
10448
10452
  }
10453
+ message.about = reader.string();
10454
+ continue;
10455
+ case 11:
10456
+ if (tag !== 90) {
10457
+ break;
10458
+ }
10449
10459
  message.app_url = reader.string();
10450
10460
  continue;
10451
10461
  }
@@ -10464,6 +10474,7 @@ var App = {
10464
10474
  applogo: isSet3(object.applogo) ? globalThis.String(object.applogo) : "",
10465
10475
  is_shadow: isSet3(object.is_shadow) ? globalThis.Boolean(object.is_shadow) : false,
10466
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,
10467
10478
  token: isSet3(object.token) ? globalThis.String(object.token) : "",
10468
10479
  role: isSet3(object.role) ? globalThis.Number(object.role) : 0,
10469
10480
  about: isSet3(object.about) ? globalThis.String(object.about) : "",
@@ -10490,6 +10501,9 @@ var App = {
10490
10501
  if (message.disable_time !== void 0) {
10491
10502
  obj.disable_time = message.disable_time.toISOString();
10492
10503
  }
10504
+ if (message.create_time !== void 0) {
10505
+ obj.create_time = message.create_time.toISOString();
10506
+ }
10493
10507
  if (message.token !== "") {
10494
10508
  obj.token = message.token;
10495
10509
  }
@@ -10508,7 +10522,7 @@ var App = {
10508
10522
  return App.fromPartial(base != null ? base : {});
10509
10523
  },
10510
10524
  fromPartial(object) {
10511
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
10525
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
10512
10526
  const message = createBaseApp();
10513
10527
  message.id = (_a = object.id) != null ? _a : "";
10514
10528
  message.appname = (_b = object.appname) != null ? _b : "";
@@ -10516,10 +10530,11 @@ var App = {
10516
10530
  message.applogo = (_d = object.applogo) != null ? _d : "";
10517
10531
  message.is_shadow = (_e = object.is_shadow) != null ? _e : false;
10518
10532
  message.disable_time = (_f = object.disable_time) != null ? _f : void 0;
10519
- message.token = (_g = object.token) != null ? _g : "";
10520
- message.role = (_h = object.role) != null ? _h : 0;
10521
- message.about = (_i = object.about) != null ? _i : "";
10522
- 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 : "";
10523
10538
  return message;
10524
10539
  }
10525
10540
  };
@@ -14840,7 +14855,7 @@ function createBaseLogedDevice() {
14840
14855
  ip: "",
14841
14856
  last_active: void 0,
14842
14857
  location: "",
14843
- is_current_device: false
14858
+ is_current: false
14844
14859
  };
14845
14860
  }
14846
14861
  var LogedDevice = {
@@ -14869,8 +14884,8 @@ var LogedDevice = {
14869
14884
  if (message.location !== "") {
14870
14885
  writer.uint32(66).string(message.location);
14871
14886
  }
14872
- if (message.is_current_device !== false) {
14873
- writer.uint32(72).bool(message.is_current_device);
14887
+ if (message.is_current !== false) {
14888
+ writer.uint32(72).bool(message.is_current);
14874
14889
  }
14875
14890
  return writer;
14876
14891
  },
@@ -14933,7 +14948,7 @@ var LogedDevice = {
14933
14948
  if (tag !== 72) {
14934
14949
  break;
14935
14950
  }
14936
- message.is_current_device = reader.bool();
14951
+ message.is_current = reader.bool();
14937
14952
  continue;
14938
14953
  }
14939
14954
  if ((tag & 7) === 4 || tag === 0) {
@@ -14953,7 +14968,7 @@ var LogedDevice = {
14953
14968
  ip: isSet3(object.ip) ? globalThis.String(object.ip) : "",
14954
14969
  last_active: isSet3(object.last_active) ? fromJsonTimestamp(object.last_active) : void 0,
14955
14970
  location: isSet3(object.location) ? globalThis.String(object.location) : "",
14956
- is_current_device: isSet3(object.is_current_device) ? globalThis.Boolean(object.is_current_device) : false
14971
+ is_current: isSet3(object.is_current) ? globalThis.Boolean(object.is_current) : false
14957
14972
  };
14958
14973
  },
14959
14974
  toJSON(message) {
@@ -14982,8 +14997,8 @@ var LogedDevice = {
14982
14997
  if (message.location !== "") {
14983
14998
  obj.location = message.location;
14984
14999
  }
14985
- if (message.is_current_device !== false) {
14986
- obj.is_current_device = message.is_current_device;
15000
+ if (message.is_current !== false) {
15001
+ obj.is_current = message.is_current;
14987
15002
  }
14988
15003
  return obj;
14989
15004
  },
@@ -15001,7 +15016,7 @@ var LogedDevice = {
15001
15016
  message.ip = (_f = object.ip) != null ? _f : "";
15002
15017
  message.last_active = (_g = object.last_active) != null ? _g : void 0;
15003
15018
  message.location = (_h = object.location) != null ? _h : "";
15004
- message.is_current_device = (_i = object.is_current_device) != null ? _i : false;
15019
+ message.is_current = (_i = object.is_current) != null ? _i : false;
15005
15020
  return message;
15006
15021
  }
15007
15022
  };
@@ -15178,18 +15193,20 @@ var MezonApi = class {
15178
15193
  if (basicAuthUsername) {
15179
15194
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
15180
15195
  }
15196
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15181
15197
  return Promise.race([
15182
- fetch(fullUrl, fetchOptions).then((response) => {
15198
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15183
15199
  if (response.status == 204) {
15184
- return response;
15200
+ return {};
15185
15201
  } else if (response.status >= 200 && response.status < 300) {
15186
- return response.json();
15202
+ const buffer = yield response.arrayBuffer();
15203
+ return Session.decode(new Uint8Array(buffer));
15187
15204
  } else {
15188
15205
  throw response;
15189
15206
  }
15190
- }),
15207
+ })),
15191
15208
  new Promise(
15192
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15209
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15193
15210
  )
15194
15211
  ]);
15195
15212
  }
@@ -15327,18 +15344,20 @@ var MezonApi = class {
15327
15344
  if (basicAuthUsername) {
15328
15345
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
15329
15346
  }
15347
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15330
15348
  return Promise.race([
15331
- fetch(fullUrl, fetchOptions).then((response) => {
15349
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15332
15350
  if (response.status == 204) {
15333
- return response;
15351
+ return {};
15334
15352
  } else if (response.status >= 200 && response.status < 300) {
15335
- return response.json();
15353
+ const buffer = yield response.arrayBuffer();
15354
+ return Session.decode(new Uint8Array(buffer));
15336
15355
  } else {
15337
15356
  throw response;
15338
15357
  }
15339
- }),
15358
+ })),
15340
15359
  new Promise(
15341
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15360
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15342
15361
  )
15343
15362
  ]);
15344
15363
  }
@@ -15359,18 +15378,20 @@ var MezonApi = class {
15359
15378
  if (basicAuthUsername) {
15360
15379
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
15361
15380
  }
15381
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15362
15382
  return Promise.race([
15363
- fetch(fullUrl, fetchOptions).then((response) => {
15383
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15364
15384
  if (response.status == 204) {
15365
- return response;
15385
+ return {};
15366
15386
  } else if (response.status >= 200 && response.status < 300) {
15367
- return response.json();
15387
+ const buffer = yield response.arrayBuffer();
15388
+ return Session.decode(new Uint8Array(buffer));
15368
15389
  } else {
15369
15390
  throw response;
15370
15391
  }
15371
- }),
15392
+ })),
15372
15393
  new Promise(
15373
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15394
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15374
15395
  )
15375
15396
  ]);
15376
15397
  }
@@ -15448,18 +15469,20 @@ var MezonApi = class {
15448
15469
  if (bearerToken) {
15449
15470
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
15450
15471
  }
15472
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15451
15473
  return Promise.race([
15452
- fetch(fullUrl, fetchOptions).then((response) => {
15474
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15453
15475
  if (response.status == 204) {
15454
- return response;
15476
+ return {};
15455
15477
  } else if (response.status >= 200 && response.status < 300) {
15456
- return response.json();
15478
+ const buffer = yield response.arrayBuffer();
15479
+ return Session.decode(new Uint8Array(buffer));
15457
15480
  } else {
15458
15481
  throw response;
15459
15482
  }
15460
- }),
15483
+ })),
15461
15484
  new Promise(
15462
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15485
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15463
15486
  )
15464
15487
  ]);
15465
15488
  }
@@ -15477,18 +15500,20 @@ var MezonApi = class {
15477
15500
  if (basicAuthUsername) {
15478
15501
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
15479
15502
  }
15503
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15480
15504
  return Promise.race([
15481
- fetch(fullUrl, fetchOptions).then((response) => {
15505
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15482
15506
  if (response.status == 204) {
15483
- return response;
15507
+ return {};
15484
15508
  } else if (response.status >= 200 && response.status < 300) {
15485
- return response.json();
15509
+ const buffer = yield response.arrayBuffer();
15510
+ return Session.decode(new Uint8Array(buffer));
15486
15511
  } else {
15487
15512
  throw response;
15488
15513
  }
15489
- }),
15514
+ })),
15490
15515
  new Promise(
15491
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15516
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15492
15517
  )
15493
15518
  ]);
15494
15519
  }
@@ -15508,18 +15533,20 @@ var MezonApi = class {
15508
15533
  if (bearerToken) {
15509
15534
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
15510
15535
  }
15536
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15511
15537
  return Promise.race([
15512
- fetch(fullUrl, fetchOptions).then((response) => {
15538
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15513
15539
  if (response.status == 204) {
15514
- return response;
15540
+ return {};
15515
15541
  } else if (response.status >= 200 && response.status < 300) {
15516
- return response.json();
15542
+ const buffer = yield response.arrayBuffer();
15543
+ return Session.decode(new Uint8Array(buffer));
15517
15544
  } else {
15518
15545
  throw response;
15519
15546
  }
15520
- }),
15547
+ })),
15521
15548
  new Promise(
15522
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15549
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15523
15550
  )
15524
15551
  ]);
15525
15552
  }
@@ -21452,18 +21479,20 @@ var MezonApi = class {
21452
21479
  if (bearerToken) {
21453
21480
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
21454
21481
  }
21482
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
21455
21483
  return Promise.race([
21456
- fetch(fullUrl, fetchOptions).then((response) => {
21484
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
21457
21485
  if (response.status == 204) {
21458
- return response;
21486
+ return {};
21459
21487
  } else if (response.status >= 200 && response.status < 300) {
21460
- return response.json();
21488
+ const buffer = yield response.arrayBuffer();
21489
+ return Session.decode(new Uint8Array(buffer));
21461
21490
  } else {
21462
21491
  throw response;
21463
21492
  }
21464
- }),
21493
+ })),
21465
21494
  new Promise(
21466
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
21495
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
21467
21496
  )
21468
21497
  ]);
21469
21498
  }
@@ -10316,6 +10316,7 @@ function createBaseApp() {
10316
10316
  applogo: "",
10317
10317
  is_shadow: false,
10318
10318
  disable_time: void 0,
10319
+ create_time: void 0,
10319
10320
  token: "",
10320
10321
  role: 0,
10321
10322
  about: "",
@@ -10342,17 +10343,20 @@ var App = {
10342
10343
  if (message.disable_time !== void 0) {
10343
10344
  Timestamp.encode(toTimestamp(message.disable_time), writer.uint32(50).fork()).ldelim();
10344
10345
  }
10346
+ if (message.create_time !== void 0) {
10347
+ Timestamp.encode(toTimestamp(message.create_time), writer.uint32(58).fork()).ldelim();
10348
+ }
10345
10349
  if (message.token !== "") {
10346
- writer.uint32(58).string(message.token);
10350
+ writer.uint32(66).string(message.token);
10347
10351
  }
10348
10352
  if (message.role !== 0) {
10349
- writer.uint32(64).int32(message.role);
10353
+ writer.uint32(72).int32(message.role);
10350
10354
  }
10351
10355
  if (message.about !== "") {
10352
- writer.uint32(74).string(message.about);
10356
+ writer.uint32(82).string(message.about);
10353
10357
  }
10354
10358
  if (message.app_url !== "") {
10355
- writer.uint32(82).string(message.app_url);
10359
+ writer.uint32(90).string(message.app_url);
10356
10360
  }
10357
10361
  return writer;
10358
10362
  },
@@ -10403,24 +10407,30 @@ var App = {
10403
10407
  if (tag !== 58) {
10404
10408
  break;
10405
10409
  }
10406
- message.token = reader.string();
10410
+ message.create_time = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
10407
10411
  continue;
10408
10412
  case 8:
10409
- if (tag !== 64) {
10413
+ if (tag !== 66) {
10410
10414
  break;
10411
10415
  }
10412
- message.role = reader.int32();
10416
+ message.token = reader.string();
10413
10417
  continue;
10414
10418
  case 9:
10415
- if (tag !== 74) {
10419
+ if (tag !== 72) {
10416
10420
  break;
10417
10421
  }
10418
- message.about = reader.string();
10422
+ message.role = reader.int32();
10419
10423
  continue;
10420
10424
  case 10:
10421
10425
  if (tag !== 82) {
10422
10426
  break;
10423
10427
  }
10428
+ message.about = reader.string();
10429
+ continue;
10430
+ case 11:
10431
+ if (tag !== 90) {
10432
+ break;
10433
+ }
10424
10434
  message.app_url = reader.string();
10425
10435
  continue;
10426
10436
  }
@@ -10439,6 +10449,7 @@ var App = {
10439
10449
  applogo: isSet3(object.applogo) ? globalThis.String(object.applogo) : "",
10440
10450
  is_shadow: isSet3(object.is_shadow) ? globalThis.Boolean(object.is_shadow) : false,
10441
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,
10442
10453
  token: isSet3(object.token) ? globalThis.String(object.token) : "",
10443
10454
  role: isSet3(object.role) ? globalThis.Number(object.role) : 0,
10444
10455
  about: isSet3(object.about) ? globalThis.String(object.about) : "",
@@ -10465,6 +10476,9 @@ var App = {
10465
10476
  if (message.disable_time !== void 0) {
10466
10477
  obj.disable_time = message.disable_time.toISOString();
10467
10478
  }
10479
+ if (message.create_time !== void 0) {
10480
+ obj.create_time = message.create_time.toISOString();
10481
+ }
10468
10482
  if (message.token !== "") {
10469
10483
  obj.token = message.token;
10470
10484
  }
@@ -10483,7 +10497,7 @@ var App = {
10483
10497
  return App.fromPartial(base != null ? base : {});
10484
10498
  },
10485
10499
  fromPartial(object) {
10486
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
10500
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
10487
10501
  const message = createBaseApp();
10488
10502
  message.id = (_a = object.id) != null ? _a : "";
10489
10503
  message.appname = (_b = object.appname) != null ? _b : "";
@@ -10491,10 +10505,11 @@ var App = {
10491
10505
  message.applogo = (_d = object.applogo) != null ? _d : "";
10492
10506
  message.is_shadow = (_e = object.is_shadow) != null ? _e : false;
10493
10507
  message.disable_time = (_f = object.disable_time) != null ? _f : void 0;
10494
- message.token = (_g = object.token) != null ? _g : "";
10495
- message.role = (_h = object.role) != null ? _h : 0;
10496
- message.about = (_i = object.about) != null ? _i : "";
10497
- 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 : "";
10498
10513
  return message;
10499
10514
  }
10500
10515
  };
@@ -14815,7 +14830,7 @@ function createBaseLogedDevice() {
14815
14830
  ip: "",
14816
14831
  last_active: void 0,
14817
14832
  location: "",
14818
- is_current_device: false
14833
+ is_current: false
14819
14834
  };
14820
14835
  }
14821
14836
  var LogedDevice = {
@@ -14844,8 +14859,8 @@ var LogedDevice = {
14844
14859
  if (message.location !== "") {
14845
14860
  writer.uint32(66).string(message.location);
14846
14861
  }
14847
- if (message.is_current_device !== false) {
14848
- writer.uint32(72).bool(message.is_current_device);
14862
+ if (message.is_current !== false) {
14863
+ writer.uint32(72).bool(message.is_current);
14849
14864
  }
14850
14865
  return writer;
14851
14866
  },
@@ -14908,7 +14923,7 @@ var LogedDevice = {
14908
14923
  if (tag !== 72) {
14909
14924
  break;
14910
14925
  }
14911
- message.is_current_device = reader.bool();
14926
+ message.is_current = reader.bool();
14912
14927
  continue;
14913
14928
  }
14914
14929
  if ((tag & 7) === 4 || tag === 0) {
@@ -14928,7 +14943,7 @@ var LogedDevice = {
14928
14943
  ip: isSet3(object.ip) ? globalThis.String(object.ip) : "",
14929
14944
  last_active: isSet3(object.last_active) ? fromJsonTimestamp(object.last_active) : void 0,
14930
14945
  location: isSet3(object.location) ? globalThis.String(object.location) : "",
14931
- is_current_device: isSet3(object.is_current_device) ? globalThis.Boolean(object.is_current_device) : false
14946
+ is_current: isSet3(object.is_current) ? globalThis.Boolean(object.is_current) : false
14932
14947
  };
14933
14948
  },
14934
14949
  toJSON(message) {
@@ -14957,8 +14972,8 @@ var LogedDevice = {
14957
14972
  if (message.location !== "") {
14958
14973
  obj.location = message.location;
14959
14974
  }
14960
- if (message.is_current_device !== false) {
14961
- obj.is_current_device = message.is_current_device;
14975
+ if (message.is_current !== false) {
14976
+ obj.is_current = message.is_current;
14962
14977
  }
14963
14978
  return obj;
14964
14979
  },
@@ -14976,7 +14991,7 @@ var LogedDevice = {
14976
14991
  message.ip = (_f = object.ip) != null ? _f : "";
14977
14992
  message.last_active = (_g = object.last_active) != null ? _g : void 0;
14978
14993
  message.location = (_h = object.location) != null ? _h : "";
14979
- message.is_current_device = (_i = object.is_current_device) != null ? _i : false;
14994
+ message.is_current = (_i = object.is_current) != null ? _i : false;
14980
14995
  return message;
14981
14996
  }
14982
14997
  };
@@ -15153,18 +15168,20 @@ var MezonApi = class {
15153
15168
  if (basicAuthUsername) {
15154
15169
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
15155
15170
  }
15171
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15156
15172
  return Promise.race([
15157
- fetch(fullUrl, fetchOptions).then((response) => {
15173
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15158
15174
  if (response.status == 204) {
15159
- return response;
15175
+ return {};
15160
15176
  } else if (response.status >= 200 && response.status < 300) {
15161
- return response.json();
15177
+ const buffer = yield response.arrayBuffer();
15178
+ return Session.decode(new Uint8Array(buffer));
15162
15179
  } else {
15163
15180
  throw response;
15164
15181
  }
15165
- }),
15182
+ })),
15166
15183
  new Promise(
15167
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15184
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15168
15185
  )
15169
15186
  ]);
15170
15187
  }
@@ -15302,18 +15319,20 @@ var MezonApi = class {
15302
15319
  if (basicAuthUsername) {
15303
15320
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
15304
15321
  }
15322
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15305
15323
  return Promise.race([
15306
- fetch(fullUrl, fetchOptions).then((response) => {
15324
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15307
15325
  if (response.status == 204) {
15308
- return response;
15326
+ return {};
15309
15327
  } else if (response.status >= 200 && response.status < 300) {
15310
- return response.json();
15328
+ const buffer = yield response.arrayBuffer();
15329
+ return Session.decode(new Uint8Array(buffer));
15311
15330
  } else {
15312
15331
  throw response;
15313
15332
  }
15314
- }),
15333
+ })),
15315
15334
  new Promise(
15316
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15335
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15317
15336
  )
15318
15337
  ]);
15319
15338
  }
@@ -15334,18 +15353,20 @@ var MezonApi = class {
15334
15353
  if (basicAuthUsername) {
15335
15354
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
15336
15355
  }
15356
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15337
15357
  return Promise.race([
15338
- fetch(fullUrl, fetchOptions).then((response) => {
15358
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15339
15359
  if (response.status == 204) {
15340
- return response;
15360
+ return {};
15341
15361
  } else if (response.status >= 200 && response.status < 300) {
15342
- return response.json();
15362
+ const buffer = yield response.arrayBuffer();
15363
+ return Session.decode(new Uint8Array(buffer));
15343
15364
  } else {
15344
15365
  throw response;
15345
15366
  }
15346
- }),
15367
+ })),
15347
15368
  new Promise(
15348
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15369
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15349
15370
  )
15350
15371
  ]);
15351
15372
  }
@@ -15423,18 +15444,20 @@ var MezonApi = class {
15423
15444
  if (bearerToken) {
15424
15445
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
15425
15446
  }
15447
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15426
15448
  return Promise.race([
15427
- fetch(fullUrl, fetchOptions).then((response) => {
15449
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15428
15450
  if (response.status == 204) {
15429
- return response;
15451
+ return {};
15430
15452
  } else if (response.status >= 200 && response.status < 300) {
15431
- return response.json();
15453
+ const buffer = yield response.arrayBuffer();
15454
+ return Session.decode(new Uint8Array(buffer));
15432
15455
  } else {
15433
15456
  throw response;
15434
15457
  }
15435
- }),
15458
+ })),
15436
15459
  new Promise(
15437
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15460
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15438
15461
  )
15439
15462
  ]);
15440
15463
  }
@@ -15452,18 +15475,20 @@ var MezonApi = class {
15452
15475
  if (basicAuthUsername) {
15453
15476
  fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
15454
15477
  }
15478
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15455
15479
  return Promise.race([
15456
- fetch(fullUrl, fetchOptions).then((response) => {
15480
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15457
15481
  if (response.status == 204) {
15458
- return response;
15482
+ return {};
15459
15483
  } else if (response.status >= 200 && response.status < 300) {
15460
- return response.json();
15484
+ const buffer = yield response.arrayBuffer();
15485
+ return Session.decode(new Uint8Array(buffer));
15461
15486
  } else {
15462
15487
  throw response;
15463
15488
  }
15464
- }),
15489
+ })),
15465
15490
  new Promise(
15466
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15491
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15467
15492
  )
15468
15493
  ]);
15469
15494
  }
@@ -15483,18 +15508,20 @@ var MezonApi = class {
15483
15508
  if (bearerToken) {
15484
15509
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
15485
15510
  }
15511
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
15486
15512
  return Promise.race([
15487
- fetch(fullUrl, fetchOptions).then((response) => {
15513
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
15488
15514
  if (response.status == 204) {
15489
- return response;
15515
+ return {};
15490
15516
  } else if (response.status >= 200 && response.status < 300) {
15491
- return response.json();
15517
+ const buffer = yield response.arrayBuffer();
15518
+ return Session.decode(new Uint8Array(buffer));
15492
15519
  } else {
15493
15520
  throw response;
15494
15521
  }
15495
- }),
15522
+ })),
15496
15523
  new Promise(
15497
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
15524
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
15498
15525
  )
15499
15526
  ]);
15500
15527
  }
@@ -21427,18 +21454,20 @@ var MezonApi = class {
21427
21454
  if (bearerToken) {
21428
21455
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
21429
21456
  }
21457
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
21430
21458
  return Promise.race([
21431
- fetch(fullUrl, fetchOptions).then((response) => {
21459
+ fetch(fullUrl, fetchOptions).then((response) => __async(this, null, function* () {
21432
21460
  if (response.status == 204) {
21433
- return response;
21461
+ return {};
21434
21462
  } else if (response.status >= 200 && response.status < 300) {
21435
- return response.json();
21463
+ const buffer = yield response.arrayBuffer();
21464
+ return Session.decode(new Uint8Array(buffer));
21436
21465
  } else {
21437
21466
  throw response;
21438
21467
  }
21439
- }),
21468
+ })),
21440
21469
  new Promise(
21441
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
21470
+ (_, reject) => setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
21442
21471
  )
21443
21472
  ]);
21444
21473
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.13.73",
3
+ "version": "2.13.75",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },