@fatehan/tsrp 1.0.45 → 1.1.0

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.
Files changed (49) hide show
  1. package/dist/api.d.ts +10 -0
  2. package/dist/api.d.ts.map +1 -0
  3. package/dist/api.js +51 -0
  4. package/dist/api.test.d.ts +2 -0
  5. package/dist/api.test.d.ts.map +1 -0
  6. package/dist/api.test.js +20 -0
  7. package/dist/fatehan/apis/client.d.ts +213 -266
  8. package/dist/fatehan/apis/client.d.ts.map +1 -1
  9. package/dist/fatehan/apis/client.js +2277 -3223
  10. package/dist/fatehan/areas/area.d.ts +14 -0
  11. package/dist/fatehan/areas/area.d.ts.map +1 -1
  12. package/dist/fatehan/areas/area.js +212 -1
  13. package/dist/fatehan/devices/devices.d.ts +278 -0
  14. package/dist/fatehan/devices/devices.d.ts.map +1 -0
  15. package/dist/fatehan/devices/devices.js +3564 -0
  16. package/dist/fatehan/financial/financial.d.ts +45 -0
  17. package/dist/fatehan/financial/financial.d.ts.map +1 -0
  18. package/dist/fatehan/financial/financial.js +385 -0
  19. package/dist/fatehan/identities/identities.d.ts +154 -0
  20. package/dist/fatehan/identities/identities.d.ts.map +1 -0
  21. package/dist/fatehan/identities/identities.js +2068 -0
  22. package/dist/fatehan/models/models.d.ts +14 -80
  23. package/dist/fatehan/models/models.d.ts.map +1 -1
  24. package/dist/fatehan/models/models.js +478 -1401
  25. package/dist/fatehan/notifies/notify.d.ts +27 -0
  26. package/dist/fatehan/notifies/notify.d.ts.map +1 -1
  27. package/dist/fatehan/notifies/notify.js +419 -7
  28. package/dist/fatehan/reports/report.d.ts +1 -1
  29. package/dist/fatehan/reports/report.d.ts.map +1 -1
  30. package/dist/fatehan/reports/report.js +6 -6
  31. package/dist/fatehan/services/api.d.ts +60 -0
  32. package/dist/fatehan/services/api.d.ts.map +1 -0
  33. package/dist/fatehan/services/api.js +529 -0
  34. package/dist/fatehan/services/repositories.d.ts +49 -0
  35. package/dist/fatehan/services/repositories.d.ts.map +1 -0
  36. package/dist/fatehan/services/repositories.js +358 -0
  37. package/dist/index.test.js +3 -4
  38. package/dist/report.d.ts +24 -0
  39. package/dist/report.d.ts.map +1 -0
  40. package/dist/report.js +248 -0
  41. package/dist/report.test.d.ts +2 -0
  42. package/dist/report.test.d.ts.map +1 -0
  43. package/dist/report.test.js +382 -0
  44. package/dist/store/system.io.d.ts +1 -1
  45. package/dist/store/system.io.d.ts.map +1 -1
  46. package/dist/system.io.d.ts +1 -1
  47. package/dist/system.io.d.ts.map +1 -1
  48. package/dist/system.io.js +10 -14
  49. package/package.json +4 -4
@@ -8,11 +8,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
8
8
  return (mod && mod.__esModule) ? mod : { "default": mod };
9
9
  };
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.Config = exports.ShownIo = exports.SystemIo_UnknownEntry = exports.SystemIo = exports.SystemIoStyle = exports.TrialLog = exports.ChargeLog = exports.DeviceStatusList = exports.PersonalAccessToken = exports.Person = exports.SinotrackCache = exports.HeartbeatCache = exports.IoList_ItemsEntry = exports.IoList = exports.Gallery = exports.SystemIo_SystemIoType = exports.ChargeLog_Type = exports.protobufPackage = void 0;
11
+ exports.LiveLocationRelated = exports.LiveLocation = exports.TrialLog = exports.ChargeLog = exports.DeviceStatusList = exports.PersonalAccessToken = exports.SinotrackCache = exports.HeartbeatCache = exports.IoList_ItemsEntry = exports.IoList = exports.Gallery = exports.ChargeLog_Type = exports.protobufPackage = void 0;
12
12
  exports.chargeLog_TypeFromJSON = chargeLog_TypeFromJSON;
13
13
  exports.chargeLog_TypeToJSON = chargeLog_TypeToJSON;
14
- exports.systemIo_SystemIoTypeFromJSON = systemIo_SystemIoTypeFromJSON;
15
- exports.systemIo_SystemIoTypeToJSON = systemIo_SystemIoTypeToJSON;
16
14
  /* eslint-disable */
17
15
  const wire_1 = require("@bufbuild/protobuf/wire");
18
16
  const long_1 = __importDefault(require("long"));
@@ -80,49 +78,6 @@ function chargeLog_TypeToJSON(object) {
80
78
  return "UNRECOGNIZED";
81
79
  }
82
80
  }
83
- var SystemIo_SystemIoType;
84
- (function (SystemIo_SystemIoType) {
85
- SystemIo_SystemIoType[SystemIo_SystemIoType["STRING"] = 0] = "STRING";
86
- SystemIo_SystemIoType[SystemIo_SystemIoType["BOOLEAN"] = 1] = "BOOLEAN";
87
- SystemIo_SystemIoType[SystemIo_SystemIoType["NUMERIC"] = 2] = "NUMERIC";
88
- SystemIo_SystemIoType[SystemIo_SystemIoType["FLOAT"] = 3] = "FLOAT";
89
- SystemIo_SystemIoType[SystemIo_SystemIoType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
90
- })(SystemIo_SystemIoType || (exports.SystemIo_SystemIoType = SystemIo_SystemIoType = {}));
91
- function systemIo_SystemIoTypeFromJSON(object) {
92
- switch (object) {
93
- case 0:
94
- case "STRING":
95
- return SystemIo_SystemIoType.STRING;
96
- case 1:
97
- case "BOOLEAN":
98
- return SystemIo_SystemIoType.BOOLEAN;
99
- case 2:
100
- case "NUMERIC":
101
- return SystemIo_SystemIoType.NUMERIC;
102
- case 3:
103
- case "FLOAT":
104
- return SystemIo_SystemIoType.FLOAT;
105
- case -1:
106
- case "UNRECOGNIZED":
107
- default:
108
- return SystemIo_SystemIoType.UNRECOGNIZED;
109
- }
110
- }
111
- function systemIo_SystemIoTypeToJSON(object) {
112
- switch (object) {
113
- case SystemIo_SystemIoType.STRING:
114
- return "STRING";
115
- case SystemIo_SystemIoType.BOOLEAN:
116
- return "BOOLEAN";
117
- case SystemIo_SystemIoType.NUMERIC:
118
- return "NUMERIC";
119
- case SystemIo_SystemIoType.FLOAT:
120
- return "FLOAT";
121
- case SystemIo_SystemIoType.UNRECOGNIZED:
122
- default:
123
- return "UNRECOGNIZED";
124
- }
125
- }
126
81
  function createBaseGallery() {
127
82
  return {
128
83
  id: long_1.default.UZERO,
@@ -841,102 +796,82 @@ exports.SinotrackCache = {
841
796
  return message;
842
797
  },
843
798
  };
844
- function createBasePerson() {
799
+ function createBasePersonalAccessToken() {
845
800
  return {
846
801
  id: long_1.default.UZERO,
847
- type: 0,
848
- organizationId: long_1.default.UZERO,
849
- roleId: undefined,
850
- userId: undefined,
802
+ tokenableType: "",
803
+ tokenableId: long_1.default.UZERO,
804
+ name: "",
805
+ token: "",
806
+ abilities: undefined,
807
+ fcm: undefined,
808
+ ip: undefined,
809
+ domain: undefined,
851
810
  partnerId: undefined,
852
- createdUserId: undefined,
853
- updatedUserId: undefined,
854
- isComplete: false,
855
- name: undefined,
856
- image: undefined,
857
- nationalId: undefined,
858
- economicalId: undefined,
859
- identificationNumber: undefined,
860
- postalCode: undefined,
861
- address: undefined,
862
- birthDate: undefined,
863
- contactMobile: undefined,
864
- contactPhone: undefined,
811
+ userAgent: undefined,
812
+ deviceType: "",
813
+ lastUsedAt: undefined,
814
+ expiresAt: undefined,
865
815
  createdAt: undefined,
866
816
  updatedAt: undefined,
867
817
  };
868
818
  }
869
- exports.Person = {
819
+ exports.PersonalAccessToken = {
870
820
  encode(message, writer = new wire_1.BinaryWriter()) {
871
821
  if (!message.id.equals(long_1.default.UZERO)) {
872
822
  writer.uint32(8).uint64(message.id.toString());
873
823
  }
874
- if (message.type !== 0) {
875
- writer.uint32(16).uint32(message.type);
876
- }
877
- if (!message.organizationId.equals(long_1.default.UZERO)) {
878
- writer.uint32(24).uint64(message.organizationId.toString());
879
- }
880
- if (message.roleId !== undefined) {
881
- writer.uint32(32).uint64(message.roleId.toString());
882
- }
883
- if (message.userId !== undefined) {
884
- writer.uint32(40).uint64(message.userId.toString());
885
- }
886
- if (message.partnerId !== undefined) {
887
- writer.uint32(48).uint64(message.partnerId.toString());
888
- }
889
- if (message.createdUserId !== undefined) {
890
- writer.uint32(56).uint64(message.createdUserId.toString());
824
+ if (message.tokenableType !== "") {
825
+ writer.uint32(18).string(message.tokenableType);
891
826
  }
892
- if (message.updatedUserId !== undefined) {
893
- writer.uint32(64).uint64(message.updatedUserId.toString());
827
+ if (!message.tokenableId.equals(long_1.default.UZERO)) {
828
+ writer.uint32(24).uint64(message.tokenableId.toString());
894
829
  }
895
- if (message.isComplete !== false) {
896
- writer.uint32(72).bool(message.isComplete);
830
+ if (message.name !== "") {
831
+ writer.uint32(34).string(message.name);
897
832
  }
898
- if (message.name !== undefined) {
899
- writer.uint32(82).string(message.name);
833
+ if (message.token !== "") {
834
+ writer.uint32(42).string(message.token);
900
835
  }
901
- if (message.image !== undefined) {
902
- writer.uint32(90).string(message.image);
836
+ if (message.abilities !== undefined) {
837
+ writer.uint32(50).string(message.abilities);
903
838
  }
904
- if (message.nationalId !== undefined) {
905
- writer.uint32(98).string(message.nationalId);
839
+ if (message.fcm !== undefined) {
840
+ writer.uint32(58).string(message.fcm);
906
841
  }
907
- if (message.economicalId !== undefined) {
908
- writer.uint32(106).string(message.economicalId);
842
+ if (message.ip !== undefined) {
843
+ writer.uint32(66).string(message.ip);
909
844
  }
910
- if (message.identificationNumber !== undefined) {
911
- writer.uint32(114).string(message.identificationNumber);
845
+ if (message.domain !== undefined) {
846
+ writer.uint32(74).string(message.domain);
912
847
  }
913
- if (message.postalCode !== undefined) {
914
- writer.uint32(122).string(message.postalCode);
848
+ if (message.partnerId !== undefined) {
849
+ writer.uint32(80).uint64(message.partnerId.toString());
915
850
  }
916
- if (message.address !== undefined) {
917
- writer.uint32(130).string(message.address);
851
+ if (message.userAgent !== undefined) {
852
+ writer.uint32(90).string(message.userAgent);
918
853
  }
919
- if (message.birthDate !== undefined) {
920
- writer.uint32(138).string(message.birthDate);
854
+ if (message.deviceType !== "") {
855
+ writer.uint32(98).string(message.deviceType);
921
856
  }
922
- if (message.contactMobile !== undefined) {
923
- writer.uint32(146).string(message.contactMobile);
857
+ if (message.lastUsedAt !== undefined) {
858
+ timestamp_1.Timestamp.encode(toTimestamp(message.lastUsedAt), writer.uint32(106).fork()).join();
924
859
  }
925
- if (message.contactPhone !== undefined) {
926
- writer.uint32(154).string(message.contactPhone);
860
+ if (message.expiresAt !== undefined) {
861
+ timestamp_1.Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(114).fork()).join();
927
862
  }
928
863
  if (message.createdAt !== undefined) {
929
- timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(162).fork()).join();
864
+ timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(122).fork()).join();
930
865
  }
931
866
  if (message.updatedAt !== undefined) {
932
- timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(170).fork()).join();
867
+ timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(130).fork()).join();
933
868
  }
934
869
  return writer;
935
870
  },
936
871
  decode(input, length) {
937
872
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
938
873
  const end = length === undefined ? reader.len : reader.pos + length;
939
- const message = createBasePerson();
874
+ const message = createBasePersonalAccessToken();
940
875
  while (reader.pos < end) {
941
876
  const tag = reader.uint32();
942
877
  switch (tag >>> 3) {
@@ -948,142 +883,107 @@ exports.Person = {
948
883
  continue;
949
884
  }
950
885
  case 2: {
951
- if (tag !== 16) {
886
+ if (tag !== 18) {
952
887
  break;
953
888
  }
954
- message.type = reader.uint32();
889
+ message.tokenableType = reader.string();
955
890
  continue;
956
891
  }
957
892
  case 3: {
958
893
  if (tag !== 24) {
959
894
  break;
960
895
  }
961
- message.organizationId = long_1.default.fromString(reader.uint64().toString(), true);
896
+ message.tokenableId = long_1.default.fromString(reader.uint64().toString(), true);
962
897
  continue;
963
898
  }
964
899
  case 4: {
965
- if (tag !== 32) {
900
+ if (tag !== 34) {
966
901
  break;
967
902
  }
968
- message.roleId = long_1.default.fromString(reader.uint64().toString(), true);
903
+ message.name = reader.string();
969
904
  continue;
970
905
  }
971
906
  case 5: {
972
- if (tag !== 40) {
907
+ if (tag !== 42) {
973
908
  break;
974
909
  }
975
- message.userId = long_1.default.fromString(reader.uint64().toString(), true);
910
+ message.token = reader.string();
976
911
  continue;
977
912
  }
978
913
  case 6: {
979
- if (tag !== 48) {
914
+ if (tag !== 50) {
980
915
  break;
981
916
  }
982
- message.partnerId = long_1.default.fromString(reader.uint64().toString(), true);
917
+ message.abilities = reader.string();
983
918
  continue;
984
919
  }
985
920
  case 7: {
986
- if (tag !== 56) {
921
+ if (tag !== 58) {
987
922
  break;
988
923
  }
989
- message.createdUserId = long_1.default.fromString(reader.uint64().toString(), true);
924
+ message.fcm = reader.string();
990
925
  continue;
991
926
  }
992
927
  case 8: {
993
- if (tag !== 64) {
928
+ if (tag !== 66) {
994
929
  break;
995
930
  }
996
- message.updatedUserId = long_1.default.fromString(reader.uint64().toString(), true);
931
+ message.ip = reader.string();
997
932
  continue;
998
933
  }
999
934
  case 9: {
1000
- if (tag !== 72) {
935
+ if (tag !== 74) {
1001
936
  break;
1002
937
  }
1003
- message.isComplete = reader.bool();
938
+ message.domain = reader.string();
1004
939
  continue;
1005
940
  }
1006
941
  case 10: {
1007
- if (tag !== 82) {
942
+ if (tag !== 80) {
1008
943
  break;
1009
944
  }
1010
- message.name = reader.string();
945
+ message.partnerId = long_1.default.fromString(reader.uint64().toString(), true);
1011
946
  continue;
1012
947
  }
1013
948
  case 11: {
1014
949
  if (tag !== 90) {
1015
950
  break;
1016
951
  }
1017
- message.image = reader.string();
952
+ message.userAgent = reader.string();
1018
953
  continue;
1019
954
  }
1020
955
  case 12: {
1021
956
  if (tag !== 98) {
1022
957
  break;
1023
958
  }
1024
- message.nationalId = reader.string();
959
+ message.deviceType = reader.string();
1025
960
  continue;
1026
961
  }
1027
962
  case 13: {
1028
963
  if (tag !== 106) {
1029
964
  break;
1030
965
  }
1031
- message.economicalId = reader.string();
966
+ message.lastUsedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1032
967
  continue;
1033
968
  }
1034
969
  case 14: {
1035
970
  if (tag !== 114) {
1036
971
  break;
1037
972
  }
1038
- message.identificationNumber = reader.string();
973
+ message.expiresAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1039
974
  continue;
1040
975
  }
1041
976
  case 15: {
1042
977
  if (tag !== 122) {
1043
978
  break;
1044
979
  }
1045
- message.postalCode = reader.string();
980
+ message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1046
981
  continue;
1047
982
  }
1048
983
  case 16: {
1049
984
  if (tag !== 130) {
1050
985
  break;
1051
986
  }
1052
- message.address = reader.string();
1053
- continue;
1054
- }
1055
- case 17: {
1056
- if (tag !== 138) {
1057
- break;
1058
- }
1059
- message.birthDate = reader.string();
1060
- continue;
1061
- }
1062
- case 18: {
1063
- if (tag !== 146) {
1064
- break;
1065
- }
1066
- message.contactMobile = reader.string();
1067
- continue;
1068
- }
1069
- case 19: {
1070
- if (tag !== 154) {
1071
- break;
1072
- }
1073
- message.contactPhone = reader.string();
1074
- continue;
1075
- }
1076
- case 20: {
1077
- if (tag !== 162) {
1078
- break;
1079
- }
1080
- message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1081
- continue;
1082
- }
1083
- case 21: {
1084
- if (tag !== 170) {
1085
- break;
1086
- }
1087
987
  message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1088
988
  continue;
1089
989
  }
@@ -1098,26 +998,19 @@ exports.Person = {
1098
998
  fromJSON(object) {
1099
999
  return {
1100
1000
  id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
1101
- type: isSet(object.type) ? globalThis.Number(object.type) : 0,
1102
- organizationId: isSet(object.organization_id) ? long_1.default.fromValue(object.organization_id) : long_1.default.UZERO,
1103
- roleId: isSet(object.role_id) ? long_1.default.fromValue(object.role_id) : undefined,
1104
- userId: isSet(object.user_id) ? long_1.default.fromValue(object.user_id) : undefined,
1001
+ tokenableType: isSet(object.tokenable_type) ? globalThis.String(object.tokenable_type) : "",
1002
+ tokenableId: isSet(object.tokenable_id) ? long_1.default.fromValue(object.tokenable_id) : long_1.default.UZERO,
1003
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
1004
+ token: isSet(object.token) ? globalThis.String(object.token) : "",
1005
+ abilities: isSet(object.abilities) ? globalThis.String(object.abilities) : undefined,
1006
+ fcm: isSet(object.fcm) ? globalThis.String(object.fcm) : undefined,
1007
+ ip: isSet(object.ip) ? globalThis.String(object.ip) : undefined,
1008
+ domain: isSet(object.domain) ? globalThis.String(object.domain) : undefined,
1105
1009
  partnerId: isSet(object.partner_id) ? long_1.default.fromValue(object.partner_id) : undefined,
1106
- createdUserId: isSet(object.created_by) ? long_1.default.fromValue(object.created_by) : undefined,
1107
- updatedUserId: isSet(object.updated_by) ? long_1.default.fromValue(object.updated_by) : undefined,
1108
- isComplete: isSet(object.is_complete) ? globalThis.Boolean(object.is_complete) : false,
1109
- name: isSet(object.name) ? globalThis.String(object.name) : undefined,
1110
- image: isSet(object.image) ? globalThis.String(object.image) : undefined,
1111
- nationalId: isSet(object.national_id) ? globalThis.String(object.national_id) : undefined,
1112
- economicalId: isSet(object.economical_id) ? globalThis.String(object.economical_id) : undefined,
1113
- identificationNumber: isSet(object.identification_number)
1114
- ? globalThis.String(object.identification_number)
1115
- : undefined,
1116
- postalCode: isSet(object.postal_code) ? globalThis.String(object.postal_code) : undefined,
1117
- address: isSet(object.address) ? globalThis.String(object.address) : undefined,
1118
- birthDate: isSet(object.birth_date) ? globalThis.String(object.birth_date) : undefined,
1119
- contactMobile: isSet(object.contact_mobile) ? globalThis.String(object.contact_mobile) : undefined,
1120
- contactPhone: isSet(object.contact_phone) ? globalThis.String(object.contact_phone) : undefined,
1010
+ userAgent: isSet(object.user_agent) ? globalThis.String(object.user_agent) : undefined,
1011
+ deviceType: isSet(object.device_type) ? globalThis.String(object.device_type) : "",
1012
+ lastUsedAt: isSet(object.last_used_at) ? fromJsonTimestamp(object.last_used_at) : undefined,
1013
+ expiresAt: isSet(object.expires_at) ? fromJsonTimestamp(object.expires_at) : undefined,
1121
1014
  createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
1122
1015
  updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
1123
1016
  };
@@ -1127,59 +1020,44 @@ exports.Person = {
1127
1020
  if (!message.id.equals(long_1.default.UZERO)) {
1128
1021
  obj.id = (message.id || long_1.default.UZERO).toString();
1129
1022
  }
1130
- if (message.type !== 0) {
1131
- obj.type = Math.round(message.type);
1132
- }
1133
- if (!message.organizationId.equals(long_1.default.UZERO)) {
1134
- obj.organization_id = (message.organizationId || long_1.default.UZERO).toString();
1135
- }
1136
- if (message.roleId !== undefined) {
1137
- obj.role_id = (message.roleId || long_1.default.UZERO).toString();
1138
- }
1139
- if (message.userId !== undefined) {
1140
- obj.user_id = (message.userId || long_1.default.UZERO).toString();
1141
- }
1142
- if (message.partnerId !== undefined) {
1143
- obj.partner_id = (message.partnerId || long_1.default.UZERO).toString();
1144
- }
1145
- if (message.createdUserId !== undefined) {
1146
- obj.created_by = (message.createdUserId || long_1.default.UZERO).toString();
1147
- }
1148
- if (message.updatedUserId !== undefined) {
1149
- obj.updated_by = (message.updatedUserId || long_1.default.UZERO).toString();
1023
+ if (message.tokenableType !== "") {
1024
+ obj.tokenable_type = message.tokenableType;
1150
1025
  }
1151
- if (message.isComplete !== false) {
1152
- obj.is_complete = message.isComplete;
1026
+ if (!message.tokenableId.equals(long_1.default.UZERO)) {
1027
+ obj.tokenable_id = (message.tokenableId || long_1.default.UZERO).toString();
1153
1028
  }
1154
- if (message.name !== undefined) {
1029
+ if (message.name !== "") {
1155
1030
  obj.name = message.name;
1156
1031
  }
1157
- if (message.image !== undefined) {
1158
- obj.image = message.image;
1032
+ if (message.token !== "") {
1033
+ obj.token = message.token;
1034
+ }
1035
+ if (message.abilities !== undefined) {
1036
+ obj.abilities = message.abilities;
1159
1037
  }
1160
- if (message.nationalId !== undefined) {
1161
- obj.national_id = message.nationalId;
1038
+ if (message.fcm !== undefined) {
1039
+ obj.fcm = message.fcm;
1162
1040
  }
1163
- if (message.economicalId !== undefined) {
1164
- obj.economical_id = message.economicalId;
1041
+ if (message.ip !== undefined) {
1042
+ obj.ip = message.ip;
1165
1043
  }
1166
- if (message.identificationNumber !== undefined) {
1167
- obj.identification_number = message.identificationNumber;
1044
+ if (message.domain !== undefined) {
1045
+ obj.domain = message.domain;
1168
1046
  }
1169
- if (message.postalCode !== undefined) {
1170
- obj.postal_code = message.postalCode;
1047
+ if (message.partnerId !== undefined) {
1048
+ obj.partner_id = (message.partnerId || long_1.default.UZERO).toString();
1171
1049
  }
1172
- if (message.address !== undefined) {
1173
- obj.address = message.address;
1050
+ if (message.userAgent !== undefined) {
1051
+ obj.user_agent = message.userAgent;
1174
1052
  }
1175
- if (message.birthDate !== undefined) {
1176
- obj.birth_date = message.birthDate;
1053
+ if (message.deviceType !== "") {
1054
+ obj.device_type = message.deviceType;
1177
1055
  }
1178
- if (message.contactMobile !== undefined) {
1179
- obj.contact_mobile = message.contactMobile;
1056
+ if (message.lastUsedAt !== undefined) {
1057
+ obj.last_used_at = message.lastUsedAt.toISOString();
1180
1058
  }
1181
- if (message.contactPhone !== undefined) {
1182
- obj.contact_phone = message.contactPhone;
1059
+ if (message.expiresAt !== undefined) {
1060
+ obj.expires_at = message.expiresAt.toISOString();
1183
1061
  }
1184
1062
  if (message.createdAt !== undefined) {
1185
1063
  obj.created_at = message.createdAt.toISOString();
@@ -1190,754 +1068,54 @@ exports.Person = {
1190
1068
  return obj;
1191
1069
  },
1192
1070
  create(base) {
1193
- return exports.Person.fromPartial(base !== null && base !== void 0 ? base : {});
1071
+ return exports.PersonalAccessToken.fromPartial(base !== null && base !== void 0 ? base : {});
1194
1072
  },
1195
1073
  fromPartial(object) {
1196
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1197
- const message = createBasePerson();
1074
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1075
+ const message = createBasePersonalAccessToken();
1198
1076
  message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
1199
- message.type = (_a = object.type) !== null && _a !== void 0 ? _a : 0;
1200
- message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
1201
- ? long_1.default.fromValue(object.organizationId)
1077
+ message.tokenableType = (_a = object.tokenableType) !== null && _a !== void 0 ? _a : "";
1078
+ message.tokenableId = (object.tokenableId !== undefined && object.tokenableId !== null)
1079
+ ? long_1.default.fromValue(object.tokenableId)
1202
1080
  : long_1.default.UZERO;
1203
- message.roleId = (object.roleId !== undefined && object.roleId !== null)
1204
- ? long_1.default.fromValue(object.roleId)
1205
- : undefined;
1206
- message.userId = (object.userId !== undefined && object.userId !== null)
1207
- ? long_1.default.fromValue(object.userId)
1208
- : undefined;
1081
+ message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
1082
+ message.token = (_c = object.token) !== null && _c !== void 0 ? _c : "";
1083
+ message.abilities = (_d = object.abilities) !== null && _d !== void 0 ? _d : undefined;
1084
+ message.fcm = (_e = object.fcm) !== null && _e !== void 0 ? _e : undefined;
1085
+ message.ip = (_f = object.ip) !== null && _f !== void 0 ? _f : undefined;
1086
+ message.domain = (_g = object.domain) !== null && _g !== void 0 ? _g : undefined;
1209
1087
  message.partnerId = (object.partnerId !== undefined && object.partnerId !== null)
1210
1088
  ? long_1.default.fromValue(object.partnerId)
1211
1089
  : undefined;
1212
- message.createdUserId = (object.createdUserId !== undefined && object.createdUserId !== null)
1213
- ? long_1.default.fromValue(object.createdUserId)
1214
- : undefined;
1215
- message.updatedUserId = (object.updatedUserId !== undefined && object.updatedUserId !== null)
1216
- ? long_1.default.fromValue(object.updatedUserId)
1217
- : undefined;
1218
- message.isComplete = (_b = object.isComplete) !== null && _b !== void 0 ? _b : false;
1219
- message.name = (_c = object.name) !== null && _c !== void 0 ? _c : undefined;
1220
- message.image = (_d = object.image) !== null && _d !== void 0 ? _d : undefined;
1221
- message.nationalId = (_e = object.nationalId) !== null && _e !== void 0 ? _e : undefined;
1222
- message.economicalId = (_f = object.economicalId) !== null && _f !== void 0 ? _f : undefined;
1223
- message.identificationNumber = (_g = object.identificationNumber) !== null && _g !== void 0 ? _g : undefined;
1224
- message.postalCode = (_h = object.postalCode) !== null && _h !== void 0 ? _h : undefined;
1225
- message.address = (_j = object.address) !== null && _j !== void 0 ? _j : undefined;
1226
- message.birthDate = (_k = object.birthDate) !== null && _k !== void 0 ? _k : undefined;
1227
- message.contactMobile = (_l = object.contactMobile) !== null && _l !== void 0 ? _l : undefined;
1228
- message.contactPhone = (_m = object.contactPhone) !== null && _m !== void 0 ? _m : undefined;
1229
- message.createdAt = (_o = object.createdAt) !== null && _o !== void 0 ? _o : undefined;
1230
- message.updatedAt = (_p = object.updatedAt) !== null && _p !== void 0 ? _p : undefined;
1090
+ message.userAgent = (_h = object.userAgent) !== null && _h !== void 0 ? _h : undefined;
1091
+ message.deviceType = (_j = object.deviceType) !== null && _j !== void 0 ? _j : "";
1092
+ message.lastUsedAt = (_k = object.lastUsedAt) !== null && _k !== void 0 ? _k : undefined;
1093
+ message.expiresAt = (_l = object.expiresAt) !== null && _l !== void 0 ? _l : undefined;
1094
+ message.createdAt = (_m = object.createdAt) !== null && _m !== void 0 ? _m : undefined;
1095
+ message.updatedAt = (_o = object.updatedAt) !== null && _o !== void 0 ? _o : undefined;
1231
1096
  return message;
1232
1097
  },
1233
1098
  };
1234
- function createBasePersonalAccessToken() {
1235
- return {
1236
- id: long_1.default.UZERO,
1237
- tokenableType: "",
1238
- tokenableId: long_1.default.UZERO,
1239
- name: "",
1240
- token: "",
1241
- abilities: undefined,
1242
- fcm: undefined,
1243
- ip: undefined,
1244
- domain: undefined,
1245
- partnerId: undefined,
1246
- userAgent: undefined,
1247
- deviceType: "",
1248
- lastUsedAt: undefined,
1249
- expiresAt: undefined,
1250
- createdAt: undefined,
1251
- updatedAt: undefined,
1252
- };
1099
+ function createBaseDeviceStatusList() {
1100
+ return { cost: 0, accepted: 0, list: [] };
1253
1101
  }
1254
- exports.PersonalAccessToken = {
1102
+ exports.DeviceStatusList = {
1255
1103
  encode(message, writer = new wire_1.BinaryWriter()) {
1256
- if (!message.id.equals(long_1.default.UZERO)) {
1257
- writer.uint32(8).uint64(message.id.toString());
1258
- }
1259
- if (message.tokenableType !== "") {
1260
- writer.uint32(18).string(message.tokenableType);
1261
- }
1262
- if (!message.tokenableId.equals(long_1.default.UZERO)) {
1263
- writer.uint32(24).uint64(message.tokenableId.toString());
1264
- }
1265
- if (message.name !== "") {
1266
- writer.uint32(34).string(message.name);
1267
- }
1268
- if (message.token !== "") {
1269
- writer.uint32(42).string(message.token);
1270
- }
1271
- if (message.abilities !== undefined) {
1272
- writer.uint32(50).string(message.abilities);
1273
- }
1274
- if (message.fcm !== undefined) {
1275
- writer.uint32(58).string(message.fcm);
1104
+ if (message.cost !== 0) {
1105
+ writer.uint32(8).uint32(message.cost);
1276
1106
  }
1277
- if (message.ip !== undefined) {
1278
- writer.uint32(66).string(message.ip);
1107
+ if (message.accepted !== 0) {
1108
+ writer.uint32(16).uint32(message.accepted);
1279
1109
  }
1280
- if (message.domain !== undefined) {
1281
- writer.uint32(74).string(message.domain);
1282
- }
1283
- if (message.partnerId !== undefined) {
1284
- writer.uint32(80).uint64(message.partnerId.toString());
1285
- }
1286
- if (message.userAgent !== undefined) {
1287
- writer.uint32(90).string(message.userAgent);
1288
- }
1289
- if (message.deviceType !== "") {
1290
- writer.uint32(98).string(message.deviceType);
1291
- }
1292
- if (message.lastUsedAt !== undefined) {
1293
- timestamp_1.Timestamp.encode(toTimestamp(message.lastUsedAt), writer.uint32(106).fork()).join();
1294
- }
1295
- if (message.expiresAt !== undefined) {
1296
- timestamp_1.Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(114).fork()).join();
1297
- }
1298
- if (message.createdAt !== undefined) {
1299
- timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(122).fork()).join();
1300
- }
1301
- if (message.updatedAt !== undefined) {
1302
- timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(130).fork()).join();
1303
- }
1304
- return writer;
1305
- },
1306
- decode(input, length) {
1307
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1308
- const end = length === undefined ? reader.len : reader.pos + length;
1309
- const message = createBasePersonalAccessToken();
1310
- while (reader.pos < end) {
1311
- const tag = reader.uint32();
1312
- switch (tag >>> 3) {
1313
- case 1: {
1314
- if (tag !== 8) {
1315
- break;
1316
- }
1317
- message.id = long_1.default.fromString(reader.uint64().toString(), true);
1318
- continue;
1319
- }
1320
- case 2: {
1321
- if (tag !== 18) {
1322
- break;
1323
- }
1324
- message.tokenableType = reader.string();
1325
- continue;
1326
- }
1327
- case 3: {
1328
- if (tag !== 24) {
1329
- break;
1330
- }
1331
- message.tokenableId = long_1.default.fromString(reader.uint64().toString(), true);
1332
- continue;
1333
- }
1334
- case 4: {
1335
- if (tag !== 34) {
1336
- break;
1337
- }
1338
- message.name = reader.string();
1339
- continue;
1340
- }
1341
- case 5: {
1342
- if (tag !== 42) {
1343
- break;
1344
- }
1345
- message.token = reader.string();
1346
- continue;
1347
- }
1348
- case 6: {
1349
- if (tag !== 50) {
1350
- break;
1351
- }
1352
- message.abilities = reader.string();
1353
- continue;
1354
- }
1355
- case 7: {
1356
- if (tag !== 58) {
1357
- break;
1358
- }
1359
- message.fcm = reader.string();
1360
- continue;
1361
- }
1362
- case 8: {
1363
- if (tag !== 66) {
1364
- break;
1365
- }
1366
- message.ip = reader.string();
1367
- continue;
1368
- }
1369
- case 9: {
1370
- if (tag !== 74) {
1371
- break;
1372
- }
1373
- message.domain = reader.string();
1374
- continue;
1375
- }
1376
- case 10: {
1377
- if (tag !== 80) {
1378
- break;
1379
- }
1380
- message.partnerId = long_1.default.fromString(reader.uint64().toString(), true);
1381
- continue;
1382
- }
1383
- case 11: {
1384
- if (tag !== 90) {
1385
- break;
1386
- }
1387
- message.userAgent = reader.string();
1388
- continue;
1389
- }
1390
- case 12: {
1391
- if (tag !== 98) {
1392
- break;
1393
- }
1394
- message.deviceType = reader.string();
1395
- continue;
1396
- }
1397
- case 13: {
1398
- if (tag !== 106) {
1399
- break;
1400
- }
1401
- message.lastUsedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1402
- continue;
1403
- }
1404
- case 14: {
1405
- if (tag !== 114) {
1406
- break;
1407
- }
1408
- message.expiresAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1409
- continue;
1410
- }
1411
- case 15: {
1412
- if (tag !== 122) {
1413
- break;
1414
- }
1415
- message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1416
- continue;
1417
- }
1418
- case 16: {
1419
- if (tag !== 130) {
1420
- break;
1421
- }
1422
- message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1423
- continue;
1424
- }
1425
- }
1426
- if ((tag & 7) === 4 || tag === 0) {
1427
- break;
1428
- }
1429
- reader.skip(tag & 7);
1430
- }
1431
- return message;
1432
- },
1433
- fromJSON(object) {
1434
- return {
1435
- id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
1436
- tokenableType: isSet(object.tokenable_type) ? globalThis.String(object.tokenable_type) : "",
1437
- tokenableId: isSet(object.tokenable_id) ? long_1.default.fromValue(object.tokenable_id) : long_1.default.UZERO,
1438
- name: isSet(object.name) ? globalThis.String(object.name) : "",
1439
- token: isSet(object.token) ? globalThis.String(object.token) : "",
1440
- abilities: isSet(object.abilities) ? globalThis.String(object.abilities) : undefined,
1441
- fcm: isSet(object.fcm) ? globalThis.String(object.fcm) : undefined,
1442
- ip: isSet(object.ip) ? globalThis.String(object.ip) : undefined,
1443
- domain: isSet(object.domain) ? globalThis.String(object.domain) : undefined,
1444
- partnerId: isSet(object.partner_id) ? long_1.default.fromValue(object.partner_id) : undefined,
1445
- userAgent: isSet(object.user_agent) ? globalThis.String(object.user_agent) : undefined,
1446
- deviceType: isSet(object.device_type) ? globalThis.String(object.device_type) : "",
1447
- lastUsedAt: isSet(object.last_used_at) ? fromJsonTimestamp(object.last_used_at) : undefined,
1448
- expiresAt: isSet(object.expires_at) ? fromJsonTimestamp(object.expires_at) : undefined,
1449
- createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
1450
- updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
1451
- };
1452
- },
1453
- toJSON(message) {
1454
- const obj = {};
1455
- if (!message.id.equals(long_1.default.UZERO)) {
1456
- obj.id = (message.id || long_1.default.UZERO).toString();
1457
- }
1458
- if (message.tokenableType !== "") {
1459
- obj.tokenable_type = message.tokenableType;
1460
- }
1461
- if (!message.tokenableId.equals(long_1.default.UZERO)) {
1462
- obj.tokenable_id = (message.tokenableId || long_1.default.UZERO).toString();
1463
- }
1464
- if (message.name !== "") {
1465
- obj.name = message.name;
1466
- }
1467
- if (message.token !== "") {
1468
- obj.token = message.token;
1469
- }
1470
- if (message.abilities !== undefined) {
1471
- obj.abilities = message.abilities;
1472
- }
1473
- if (message.fcm !== undefined) {
1474
- obj.fcm = message.fcm;
1475
- }
1476
- if (message.ip !== undefined) {
1477
- obj.ip = message.ip;
1478
- }
1479
- if (message.domain !== undefined) {
1480
- obj.domain = message.domain;
1481
- }
1482
- if (message.partnerId !== undefined) {
1483
- obj.partner_id = (message.partnerId || long_1.default.UZERO).toString();
1484
- }
1485
- if (message.userAgent !== undefined) {
1486
- obj.user_agent = message.userAgent;
1487
- }
1488
- if (message.deviceType !== "") {
1489
- obj.device_type = message.deviceType;
1490
- }
1491
- if (message.lastUsedAt !== undefined) {
1492
- obj.last_used_at = message.lastUsedAt.toISOString();
1493
- }
1494
- if (message.expiresAt !== undefined) {
1495
- obj.expires_at = message.expiresAt.toISOString();
1496
- }
1497
- if (message.createdAt !== undefined) {
1498
- obj.created_at = message.createdAt.toISOString();
1499
- }
1500
- if (message.updatedAt !== undefined) {
1501
- obj.updated_at = message.updatedAt.toISOString();
1502
- }
1503
- return obj;
1504
- },
1505
- create(base) {
1506
- return exports.PersonalAccessToken.fromPartial(base !== null && base !== void 0 ? base : {});
1507
- },
1508
- fromPartial(object) {
1509
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1510
- const message = createBasePersonalAccessToken();
1511
- message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
1512
- message.tokenableType = (_a = object.tokenableType) !== null && _a !== void 0 ? _a : "";
1513
- message.tokenableId = (object.tokenableId !== undefined && object.tokenableId !== null)
1514
- ? long_1.default.fromValue(object.tokenableId)
1515
- : long_1.default.UZERO;
1516
- message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
1517
- message.token = (_c = object.token) !== null && _c !== void 0 ? _c : "";
1518
- message.abilities = (_d = object.abilities) !== null && _d !== void 0 ? _d : undefined;
1519
- message.fcm = (_e = object.fcm) !== null && _e !== void 0 ? _e : undefined;
1520
- message.ip = (_f = object.ip) !== null && _f !== void 0 ? _f : undefined;
1521
- message.domain = (_g = object.domain) !== null && _g !== void 0 ? _g : undefined;
1522
- message.partnerId = (object.partnerId !== undefined && object.partnerId !== null)
1523
- ? long_1.default.fromValue(object.partnerId)
1524
- : undefined;
1525
- message.userAgent = (_h = object.userAgent) !== null && _h !== void 0 ? _h : undefined;
1526
- message.deviceType = (_j = object.deviceType) !== null && _j !== void 0 ? _j : "";
1527
- message.lastUsedAt = (_k = object.lastUsedAt) !== null && _k !== void 0 ? _k : undefined;
1528
- message.expiresAt = (_l = object.expiresAt) !== null && _l !== void 0 ? _l : undefined;
1529
- message.createdAt = (_m = object.createdAt) !== null && _m !== void 0 ? _m : undefined;
1530
- message.updatedAt = (_o = object.updatedAt) !== null && _o !== void 0 ? _o : undefined;
1531
- return message;
1532
- },
1533
- };
1534
- function createBaseDeviceStatusList() {
1535
- return { cost: 0, accepted: 0, list: [] };
1536
- }
1537
- exports.DeviceStatusList = {
1538
- encode(message, writer = new wire_1.BinaryWriter()) {
1539
- if (message.cost !== 0) {
1540
- writer.uint32(8).uint32(message.cost);
1541
- }
1542
- if (message.accepted !== 0) {
1543
- writer.uint32(16).uint32(message.accepted);
1544
- }
1545
- for (const v of message.list) {
1546
- dataModel_1.DeviceStatus.encode(v, writer.uint32(26).fork()).join();
1547
- }
1548
- return writer;
1549
- },
1550
- decode(input, length) {
1551
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1552
- const end = length === undefined ? reader.len : reader.pos + length;
1553
- const message = createBaseDeviceStatusList();
1554
- while (reader.pos < end) {
1555
- const tag = reader.uint32();
1556
- switch (tag >>> 3) {
1557
- case 1: {
1558
- if (tag !== 8) {
1559
- break;
1560
- }
1561
- message.cost = reader.uint32();
1562
- continue;
1563
- }
1564
- case 2: {
1565
- if (tag !== 16) {
1566
- break;
1567
- }
1568
- message.accepted = reader.uint32();
1569
- continue;
1570
- }
1571
- case 3: {
1572
- if (tag !== 26) {
1573
- break;
1574
- }
1575
- message.list.push(dataModel_1.DeviceStatus.decode(reader, reader.uint32()));
1576
- continue;
1577
- }
1578
- }
1579
- if ((tag & 7) === 4 || tag === 0) {
1580
- break;
1581
- }
1582
- reader.skip(tag & 7);
1583
- }
1584
- return message;
1585
- },
1586
- fromJSON(object) {
1587
- return {
1588
- cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
1589
- accepted: isSet(object.accepted) ? globalThis.Number(object.accepted) : 0,
1590
- list: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.list) ? object.list.map((e) => dataModel_1.DeviceStatus.fromJSON(e)) : [],
1591
- };
1592
- },
1593
- toJSON(message) {
1594
- var _a;
1595
- const obj = {};
1596
- if (message.cost !== 0) {
1597
- obj.cost = Math.round(message.cost);
1598
- }
1599
- if (message.accepted !== 0) {
1600
- obj.accepted = Math.round(message.accepted);
1601
- }
1602
- if ((_a = message.list) === null || _a === void 0 ? void 0 : _a.length) {
1603
- obj.list = message.list.map((e) => dataModel_1.DeviceStatus.toJSON(e));
1604
- }
1605
- return obj;
1606
- },
1607
- create(base) {
1608
- return exports.DeviceStatusList.fromPartial(base !== null && base !== void 0 ? base : {});
1609
- },
1610
- fromPartial(object) {
1611
- var _a, _b, _c;
1612
- const message = createBaseDeviceStatusList();
1613
- message.cost = (_a = object.cost) !== null && _a !== void 0 ? _a : 0;
1614
- message.accepted = (_b = object.accepted) !== null && _b !== void 0 ? _b : 0;
1615
- message.list = ((_c = object.list) === null || _c === void 0 ? void 0 : _c.map((e) => dataModel_1.DeviceStatus.fromPartial(e))) || [];
1616
- return message;
1617
- },
1618
- };
1619
- function createBaseChargeLog() {
1620
- return {
1621
- id: long_1.default.UZERO,
1622
- userId: undefined,
1623
- deviceId: long_1.default.UZERO,
1624
- imei: long_1.default.UZERO,
1625
- objectId: undefined,
1626
- objectType: undefined,
1627
- type: 0,
1628
- description: undefined,
1629
- ip: undefined,
1630
- userAgent: undefined,
1631
- previousExpiration: undefined,
1632
- nextExpiration: undefined,
1633
- isUnlimited: false,
1634
- refund: false,
1635
- createdAt: undefined,
1636
- updatedAt: undefined,
1637
- };
1638
- }
1639
- exports.ChargeLog = {
1640
- encode(message, writer = new wire_1.BinaryWriter()) {
1641
- if (!message.id.equals(long_1.default.UZERO)) {
1642
- writer.uint32(8).uint64(message.id.toString());
1643
- }
1644
- if (message.userId !== undefined) {
1645
- writer.uint32(16).uint64(message.userId.toString());
1646
- }
1647
- if (!message.deviceId.equals(long_1.default.UZERO)) {
1648
- writer.uint32(24).uint64(message.deviceId.toString());
1649
- }
1650
- if (!message.imei.equals(long_1.default.UZERO)) {
1651
- writer.uint32(32).uint64(message.imei.toString());
1652
- }
1653
- if (message.objectId !== undefined) {
1654
- writer.uint32(40).uint64(message.objectId.toString());
1655
- }
1656
- if (message.objectType !== undefined) {
1657
- writer.uint32(50).string(message.objectType);
1658
- }
1659
- if (message.type !== 0) {
1660
- writer.uint32(56).int32(message.type);
1661
- }
1662
- if (message.description !== undefined) {
1663
- writer.uint32(66).string(message.description);
1664
- }
1665
- if (message.ip !== undefined) {
1666
- writer.uint32(74).string(message.ip);
1667
- }
1668
- if (message.userAgent !== undefined) {
1669
- writer.uint32(82).string(message.userAgent);
1670
- }
1671
- if (message.previousExpiration !== undefined) {
1672
- timestamp_1.Timestamp.encode(toTimestamp(message.previousExpiration), writer.uint32(90).fork()).join();
1673
- }
1674
- if (message.nextExpiration !== undefined) {
1675
- timestamp_1.Timestamp.encode(toTimestamp(message.nextExpiration), writer.uint32(98).fork()).join();
1676
- }
1677
- if (message.isUnlimited !== false) {
1678
- writer.uint32(104).bool(message.isUnlimited);
1679
- }
1680
- if (message.refund !== false) {
1681
- writer.uint32(112).bool(message.refund);
1682
- }
1683
- if (message.createdAt !== undefined) {
1684
- timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(122).fork()).join();
1685
- }
1686
- if (message.updatedAt !== undefined) {
1687
- timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(130).fork()).join();
1688
- }
1689
- return writer;
1690
- },
1691
- decode(input, length) {
1692
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1693
- const end = length === undefined ? reader.len : reader.pos + length;
1694
- const message = createBaseChargeLog();
1695
- while (reader.pos < end) {
1696
- const tag = reader.uint32();
1697
- switch (tag >>> 3) {
1698
- case 1: {
1699
- if (tag !== 8) {
1700
- break;
1701
- }
1702
- message.id = long_1.default.fromString(reader.uint64().toString(), true);
1703
- continue;
1704
- }
1705
- case 2: {
1706
- if (tag !== 16) {
1707
- break;
1708
- }
1709
- message.userId = long_1.default.fromString(reader.uint64().toString(), true);
1710
- continue;
1711
- }
1712
- case 3: {
1713
- if (tag !== 24) {
1714
- break;
1715
- }
1716
- message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
1717
- continue;
1718
- }
1719
- case 4: {
1720
- if (tag !== 32) {
1721
- break;
1722
- }
1723
- message.imei = long_1.default.fromString(reader.uint64().toString(), true);
1724
- continue;
1725
- }
1726
- case 5: {
1727
- if (tag !== 40) {
1728
- break;
1729
- }
1730
- message.objectId = long_1.default.fromString(reader.uint64().toString(), true);
1731
- continue;
1732
- }
1733
- case 6: {
1734
- if (tag !== 50) {
1735
- break;
1736
- }
1737
- message.objectType = reader.string();
1738
- continue;
1739
- }
1740
- case 7: {
1741
- if (tag !== 56) {
1742
- break;
1743
- }
1744
- message.type = reader.int32();
1745
- continue;
1746
- }
1747
- case 8: {
1748
- if (tag !== 66) {
1749
- break;
1750
- }
1751
- message.description = reader.string();
1752
- continue;
1753
- }
1754
- case 9: {
1755
- if (tag !== 74) {
1756
- break;
1757
- }
1758
- message.ip = reader.string();
1759
- continue;
1760
- }
1761
- case 10: {
1762
- if (tag !== 82) {
1763
- break;
1764
- }
1765
- message.userAgent = reader.string();
1766
- continue;
1767
- }
1768
- case 11: {
1769
- if (tag !== 90) {
1770
- break;
1771
- }
1772
- message.previousExpiration = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1773
- continue;
1774
- }
1775
- case 12: {
1776
- if (tag !== 98) {
1777
- break;
1778
- }
1779
- message.nextExpiration = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1780
- continue;
1781
- }
1782
- case 13: {
1783
- if (tag !== 104) {
1784
- break;
1785
- }
1786
- message.isUnlimited = reader.bool();
1787
- continue;
1788
- }
1789
- case 14: {
1790
- if (tag !== 112) {
1791
- break;
1792
- }
1793
- message.refund = reader.bool();
1794
- continue;
1795
- }
1796
- case 15: {
1797
- if (tag !== 122) {
1798
- break;
1799
- }
1800
- message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1801
- continue;
1802
- }
1803
- case 16: {
1804
- if (tag !== 130) {
1805
- break;
1806
- }
1807
- message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1808
- continue;
1809
- }
1810
- }
1811
- if ((tag & 7) === 4 || tag === 0) {
1812
- break;
1813
- }
1814
- reader.skip(tag & 7);
1815
- }
1816
- return message;
1817
- },
1818
- fromJSON(object) {
1819
- return {
1820
- id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
1821
- userId: isSet(object.user_id) ? long_1.default.fromValue(object.user_id) : undefined,
1822
- deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
1823
- imei: isSet(object.imei) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO,
1824
- objectId: isSet(object.object_id) ? long_1.default.fromValue(object.object_id) : undefined,
1825
- objectType: isSet(object.object_type) ? globalThis.String(object.object_type) : undefined,
1826
- type: isSet(object.type) ? chargeLog_TypeFromJSON(object.type) : 0,
1827
- description: isSet(object.description) ? globalThis.String(object.description) : undefined,
1828
- ip: isSet(object.ip) ? globalThis.String(object.ip) : undefined,
1829
- userAgent: isSet(object.user_agent) ? globalThis.String(object.user_agent) : undefined,
1830
- previousExpiration: isSet(object.previous_expiration) ? fromJsonTimestamp(object.previous_expiration) : undefined,
1831
- nextExpiration: isSet(object.next_expiration) ? fromJsonTimestamp(object.next_expiration) : undefined,
1832
- isUnlimited: isSet(object.is_unlimited) ? globalThis.Boolean(object.is_unlimited) : false,
1833
- refund: isSet(object.refund) ? globalThis.Boolean(object.refund) : false,
1834
- createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
1835
- updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
1836
- };
1837
- },
1838
- toJSON(message) {
1839
- const obj = {};
1840
- if (!message.id.equals(long_1.default.UZERO)) {
1841
- obj.id = (message.id || long_1.default.UZERO).toString();
1842
- }
1843
- if (message.userId !== undefined) {
1844
- obj.user_id = (message.userId || long_1.default.UZERO).toString();
1845
- }
1846
- if (!message.deviceId.equals(long_1.default.UZERO)) {
1847
- obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
1848
- }
1849
- if (!message.imei.equals(long_1.default.UZERO)) {
1850
- obj.imei = (message.imei || long_1.default.UZERO).toString();
1851
- }
1852
- if (message.objectId !== undefined) {
1853
- obj.object_id = (message.objectId || long_1.default.UZERO).toString();
1854
- }
1855
- if (message.objectType !== undefined) {
1856
- obj.object_type = message.objectType;
1857
- }
1858
- if (message.type !== 0) {
1859
- obj.type = chargeLog_TypeToJSON(message.type);
1860
- }
1861
- if (message.description !== undefined) {
1862
- obj.description = message.description;
1863
- }
1864
- if (message.ip !== undefined) {
1865
- obj.ip = message.ip;
1866
- }
1867
- if (message.userAgent !== undefined) {
1868
- obj.user_agent = message.userAgent;
1869
- }
1870
- if (message.previousExpiration !== undefined) {
1871
- obj.previous_expiration = message.previousExpiration.toISOString();
1872
- }
1873
- if (message.nextExpiration !== undefined) {
1874
- obj.next_expiration = message.nextExpiration.toISOString();
1875
- }
1876
- if (message.isUnlimited !== false) {
1877
- obj.is_unlimited = message.isUnlimited;
1878
- }
1879
- if (message.refund !== false) {
1880
- obj.refund = message.refund;
1881
- }
1882
- if (message.createdAt !== undefined) {
1883
- obj.created_at = message.createdAt.toISOString();
1884
- }
1885
- if (message.updatedAt !== undefined) {
1886
- obj.updated_at = message.updatedAt.toISOString();
1887
- }
1888
- return obj;
1889
- },
1890
- create(base) {
1891
- return exports.ChargeLog.fromPartial(base !== null && base !== void 0 ? base : {});
1892
- },
1893
- fromPartial(object) {
1894
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1895
- const message = createBaseChargeLog();
1896
- message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
1897
- message.userId = (object.userId !== undefined && object.userId !== null)
1898
- ? long_1.default.fromValue(object.userId)
1899
- : undefined;
1900
- message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
1901
- ? long_1.default.fromValue(object.deviceId)
1902
- : long_1.default.UZERO;
1903
- message.imei = (object.imei !== undefined && object.imei !== null) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO;
1904
- message.objectId = (object.objectId !== undefined && object.objectId !== null)
1905
- ? long_1.default.fromValue(object.objectId)
1906
- : undefined;
1907
- message.objectType = (_a = object.objectType) !== null && _a !== void 0 ? _a : undefined;
1908
- message.type = (_b = object.type) !== null && _b !== void 0 ? _b : 0;
1909
- message.description = (_c = object.description) !== null && _c !== void 0 ? _c : undefined;
1910
- message.ip = (_d = object.ip) !== null && _d !== void 0 ? _d : undefined;
1911
- message.userAgent = (_e = object.userAgent) !== null && _e !== void 0 ? _e : undefined;
1912
- message.previousExpiration = (_f = object.previousExpiration) !== null && _f !== void 0 ? _f : undefined;
1913
- message.nextExpiration = (_g = object.nextExpiration) !== null && _g !== void 0 ? _g : undefined;
1914
- message.isUnlimited = (_h = object.isUnlimited) !== null && _h !== void 0 ? _h : false;
1915
- message.refund = (_j = object.refund) !== null && _j !== void 0 ? _j : false;
1916
- message.createdAt = (_k = object.createdAt) !== null && _k !== void 0 ? _k : undefined;
1917
- message.updatedAt = (_l = object.updatedAt) !== null && _l !== void 0 ? _l : undefined;
1918
- return message;
1919
- },
1920
- };
1921
- function createBaseTrialLog() {
1922
- return { id: long_1.default.UZERO, imei: long_1.default.UZERO, createdAt: undefined };
1923
- }
1924
- exports.TrialLog = {
1925
- encode(message, writer = new wire_1.BinaryWriter()) {
1926
- if (!message.id.equals(long_1.default.UZERO)) {
1927
- writer.uint32(8).uint64(message.id.toString());
1928
- }
1929
- if (!message.imei.equals(long_1.default.UZERO)) {
1930
- writer.uint32(16).uint64(message.imei.toString());
1931
- }
1932
- if (message.createdAt !== undefined) {
1933
- timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(26).fork()).join();
1110
+ for (const v of message.list) {
1111
+ dataModel_1.DeviceStatus.encode(v, writer.uint32(26).fork()).join();
1934
1112
  }
1935
1113
  return writer;
1936
1114
  },
1937
1115
  decode(input, length) {
1938
1116
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1939
1117
  const end = length === undefined ? reader.len : reader.pos + length;
1940
- const message = createBaseTrialLog();
1118
+ const message = createBaseDeviceStatusList();
1941
1119
  while (reader.pos < end) {
1942
1120
  const tag = reader.uint32();
1943
1121
  switch (tag >>> 3) {
@@ -1945,21 +1123,21 @@ exports.TrialLog = {
1945
1123
  if (tag !== 8) {
1946
1124
  break;
1947
1125
  }
1948
- message.id = long_1.default.fromString(reader.uint64().toString(), true);
1126
+ message.cost = reader.uint32();
1949
1127
  continue;
1950
1128
  }
1951
1129
  case 2: {
1952
1130
  if (tag !== 16) {
1953
1131
  break;
1954
1132
  }
1955
- message.imei = long_1.default.fromString(reader.uint64().toString(), true);
1133
+ message.accepted = reader.uint32();
1956
1134
  continue;
1957
1135
  }
1958
1136
  case 3: {
1959
1137
  if (tag !== 26) {
1960
1138
  break;
1961
1139
  }
1962
- message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1140
+ message.list.push(dataModel_1.DeviceStatus.decode(reader, reader.uint32()));
1963
1141
  continue;
1964
1142
  }
1965
1143
  }
@@ -1972,200 +1150,113 @@ exports.TrialLog = {
1972
1150
  },
1973
1151
  fromJSON(object) {
1974
1152
  return {
1975
- id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
1976
- imei: isSet(object.imei) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO,
1977
- createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
1153
+ cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
1154
+ accepted: isSet(object.accepted) ? globalThis.Number(object.accepted) : 0,
1155
+ list: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.list) ? object.list.map((e) => dataModel_1.DeviceStatus.fromJSON(e)) : [],
1978
1156
  };
1979
1157
  },
1980
1158
  toJSON(message) {
1981
- const obj = {};
1982
- if (!message.id.equals(long_1.default.UZERO)) {
1983
- obj.id = (message.id || long_1.default.UZERO).toString();
1984
- }
1985
- if (!message.imei.equals(long_1.default.UZERO)) {
1986
- obj.imei = (message.imei || long_1.default.UZERO).toString();
1987
- }
1988
- if (message.createdAt !== undefined) {
1989
- obj.created_at = message.createdAt.toISOString();
1990
- }
1991
- return obj;
1992
- },
1993
- create(base) {
1994
- return exports.TrialLog.fromPartial(base !== null && base !== void 0 ? base : {});
1995
- },
1996
- fromPartial(object) {
1997
1159
  var _a;
1998
- const message = createBaseTrialLog();
1999
- message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
2000
- message.imei = (object.imei !== undefined && object.imei !== null) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO;
2001
- message.createdAt = (_a = object.createdAt) !== null && _a !== void 0 ? _a : undefined;
2002
- return message;
2003
- },
2004
- };
2005
- function createBaseSystemIoStyle() {
2006
- return { icon: undefined, name: undefined, color: undefined };
2007
- }
2008
- exports.SystemIoStyle = {
2009
- encode(message, writer = new wire_1.BinaryWriter()) {
2010
- if (message.icon !== undefined) {
2011
- writer.uint32(10).string(message.icon);
2012
- }
2013
- if (message.name !== undefined) {
2014
- writer.uint32(18).string(message.name);
2015
- }
2016
- if (message.color !== undefined) {
2017
- writer.uint32(26).string(message.color);
2018
- }
2019
- return writer;
2020
- },
2021
- decode(input, length) {
2022
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2023
- const end = length === undefined ? reader.len : reader.pos + length;
2024
- const message = createBaseSystemIoStyle();
2025
- while (reader.pos < end) {
2026
- const tag = reader.uint32();
2027
- switch (tag >>> 3) {
2028
- case 1: {
2029
- if (tag !== 10) {
2030
- break;
2031
- }
2032
- message.icon = reader.string();
2033
- continue;
2034
- }
2035
- case 2: {
2036
- if (tag !== 18) {
2037
- break;
2038
- }
2039
- message.name = reader.string();
2040
- continue;
2041
- }
2042
- case 3: {
2043
- if (tag !== 26) {
2044
- break;
2045
- }
2046
- message.color = reader.string();
2047
- continue;
2048
- }
2049
- }
2050
- if ((tag & 7) === 4 || tag === 0) {
2051
- break;
2052
- }
2053
- reader.skip(tag & 7);
2054
- }
2055
- return message;
2056
- },
2057
- fromJSON(object) {
2058
- return {
2059
- icon: isSet(object.icon) ? globalThis.String(object.icon) : undefined,
2060
- name: isSet(object.name) ? globalThis.String(object.name) : undefined,
2061
- color: isSet(object.color) ? globalThis.String(object.color) : undefined,
2062
- };
2063
- },
2064
- toJSON(message) {
2065
1160
  const obj = {};
2066
- if (message.icon !== undefined) {
2067
- obj.icon = message.icon;
1161
+ if (message.cost !== 0) {
1162
+ obj.cost = Math.round(message.cost);
2068
1163
  }
2069
- if (message.name !== undefined) {
2070
- obj.name = message.name;
1164
+ if (message.accepted !== 0) {
1165
+ obj.accepted = Math.round(message.accepted);
2071
1166
  }
2072
- if (message.color !== undefined) {
2073
- obj.color = message.color;
1167
+ if ((_a = message.list) === null || _a === void 0 ? void 0 : _a.length) {
1168
+ obj.list = message.list.map((e) => dataModel_1.DeviceStatus.toJSON(e));
2074
1169
  }
2075
1170
  return obj;
2076
1171
  },
2077
1172
  create(base) {
2078
- return exports.SystemIoStyle.fromPartial(base !== null && base !== void 0 ? base : {});
1173
+ return exports.DeviceStatusList.fromPartial(base !== null && base !== void 0 ? base : {});
2079
1174
  },
2080
1175
  fromPartial(object) {
2081
1176
  var _a, _b, _c;
2082
- const message = createBaseSystemIoStyle();
2083
- message.icon = (_a = object.icon) !== null && _a !== void 0 ? _a : undefined;
2084
- message.name = (_b = object.name) !== null && _b !== void 0 ? _b : undefined;
2085
- message.color = (_c = object.color) !== null && _c !== void 0 ? _c : undefined;
1177
+ const message = createBaseDeviceStatusList();
1178
+ message.cost = (_a = object.cost) !== null && _a !== void 0 ? _a : 0;
1179
+ message.accepted = (_b = object.accepted) !== null && _b !== void 0 ? _b : 0;
1180
+ message.list = ((_c = object.list) === null || _c === void 0 ? void 0 : _c.map((e) => dataModel_1.DeviceStatus.fromPartial(e))) || [];
2086
1181
  return message;
2087
1182
  },
2088
1183
  };
2089
- function createBaseSystemIo() {
1184
+ function createBaseChargeLog() {
2090
1185
  return {
2091
1186
  id: long_1.default.UZERO,
2092
- name: "",
2093
- deviceId: undefined,
2094
- formula: "",
1187
+ userId: undefined,
1188
+ deviceId: long_1.default.UZERO,
1189
+ imei: long_1.default.UZERO,
1190
+ objectId: undefined,
1191
+ objectType: undefined,
2095
1192
  type: 0,
2096
- unit: undefined,
2097
1193
  description: undefined,
2098
- activeStyle: undefined,
2099
- inactiveStyle: undefined,
2100
- active: false,
2101
- graphable: false,
2102
- sord: 0,
2103
- hidden: [],
2104
- unknown: {},
2105
- createdBy: undefined,
1194
+ ip: undefined,
1195
+ userAgent: undefined,
1196
+ previousExpiration: undefined,
1197
+ nextExpiration: undefined,
1198
+ isUnlimited: false,
1199
+ refund: false,
2106
1200
  createdAt: undefined,
2107
1201
  updatedAt: undefined,
2108
1202
  };
2109
1203
  }
2110
- exports.SystemIo = {
1204
+ exports.ChargeLog = {
2111
1205
  encode(message, writer = new wire_1.BinaryWriter()) {
2112
1206
  if (!message.id.equals(long_1.default.UZERO)) {
2113
1207
  writer.uint32(8).uint64(message.id.toString());
2114
1208
  }
2115
- if (message.name !== "") {
2116
- writer.uint32(18).string(message.name);
1209
+ if (message.userId !== undefined) {
1210
+ writer.uint32(16).uint64(message.userId.toString());
2117
1211
  }
2118
- if (message.deviceId !== undefined) {
1212
+ if (!message.deviceId.equals(long_1.default.UZERO)) {
2119
1213
  writer.uint32(24).uint64(message.deviceId.toString());
2120
1214
  }
2121
- if (message.formula !== "") {
2122
- writer.uint32(42).string(message.formula);
1215
+ if (!message.imei.equals(long_1.default.UZERO)) {
1216
+ writer.uint32(32).uint64(message.imei.toString());
1217
+ }
1218
+ if (message.objectId !== undefined) {
1219
+ writer.uint32(40).uint64(message.objectId.toString());
2123
1220
  }
2124
- if (message.type !== 0) {
2125
- writer.uint32(48).int32(message.type);
1221
+ if (message.objectType !== undefined) {
1222
+ writer.uint32(50).string(message.objectType);
2126
1223
  }
2127
- if (message.unit !== undefined) {
2128
- writer.uint32(58).string(message.unit);
1224
+ if (message.type !== 0) {
1225
+ writer.uint32(56).int32(message.type);
2129
1226
  }
2130
1227
  if (message.description !== undefined) {
2131
1228
  writer.uint32(66).string(message.description);
2132
1229
  }
2133
- if (message.activeStyle !== undefined) {
2134
- exports.SystemIoStyle.encode(message.activeStyle, writer.uint32(74).fork()).join();
2135
- }
2136
- if (message.inactiveStyle !== undefined) {
2137
- exports.SystemIoStyle.encode(message.inactiveStyle, writer.uint32(82).fork()).join();
1230
+ if (message.ip !== undefined) {
1231
+ writer.uint32(74).string(message.ip);
2138
1232
  }
2139
- if (message.active !== false) {
2140
- writer.uint32(88).bool(message.active);
1233
+ if (message.userAgent !== undefined) {
1234
+ writer.uint32(82).string(message.userAgent);
2141
1235
  }
2142
- if (message.graphable !== false) {
2143
- writer.uint32(96).bool(message.graphable);
1236
+ if (message.previousExpiration !== undefined) {
1237
+ timestamp_1.Timestamp.encode(toTimestamp(message.previousExpiration), writer.uint32(90).fork()).join();
2144
1238
  }
2145
- if (message.sord !== 0) {
2146
- writer.uint32(104).uint32(message.sord);
1239
+ if (message.nextExpiration !== undefined) {
1240
+ timestamp_1.Timestamp.encode(toTimestamp(message.nextExpiration), writer.uint32(98).fork()).join();
2147
1241
  }
2148
- for (const v of message.hidden) {
2149
- writer.uint32(114).string(v);
1242
+ if (message.isUnlimited !== false) {
1243
+ writer.uint32(104).bool(message.isUnlimited);
2150
1244
  }
2151
- Object.entries(message.unknown).forEach(([key, value]) => {
2152
- exports.SystemIo_UnknownEntry.encode({ key: key, value }, writer.uint32(122).fork()).join();
2153
- });
2154
- if (message.createdBy !== undefined) {
2155
- writer.uint32(128).uint64(message.createdBy.toString());
1245
+ if (message.refund !== false) {
1246
+ writer.uint32(112).bool(message.refund);
2156
1247
  }
2157
1248
  if (message.createdAt !== undefined) {
2158
- timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(138).fork()).join();
1249
+ timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(122).fork()).join();
2159
1250
  }
2160
1251
  if (message.updatedAt !== undefined) {
2161
- timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(146).fork()).join();
1252
+ timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(130).fork()).join();
2162
1253
  }
2163
1254
  return writer;
2164
1255
  },
2165
1256
  decode(input, length) {
2166
1257
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2167
1258
  const end = length === undefined ? reader.len : reader.pos + length;
2168
- const message = createBaseSystemIo();
1259
+ const message = createBaseChargeLog();
2169
1260
  while (reader.pos < end) {
2170
1261
  const tag = reader.uint32();
2171
1262
  switch (tag >>> 3) {
@@ -2177,10 +1268,10 @@ exports.SystemIo = {
2177
1268
  continue;
2178
1269
  }
2179
1270
  case 2: {
2180
- if (tag !== 18) {
1271
+ if (tag !== 16) {
2181
1272
  break;
2182
1273
  }
2183
- message.name = reader.string();
1274
+ message.userId = long_1.default.fromString(reader.uint64().toString(), true);
2184
1275
  continue;
2185
1276
  }
2186
1277
  case 3: {
@@ -2190,25 +1281,32 @@ exports.SystemIo = {
2190
1281
  message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
2191
1282
  continue;
2192
1283
  }
1284
+ case 4: {
1285
+ if (tag !== 32) {
1286
+ break;
1287
+ }
1288
+ message.imei = long_1.default.fromString(reader.uint64().toString(), true);
1289
+ continue;
1290
+ }
2193
1291
  case 5: {
2194
- if (tag !== 42) {
1292
+ if (tag !== 40) {
2195
1293
  break;
2196
1294
  }
2197
- message.formula = reader.string();
1295
+ message.objectId = long_1.default.fromString(reader.uint64().toString(), true);
2198
1296
  continue;
2199
1297
  }
2200
1298
  case 6: {
2201
- if (tag !== 48) {
1299
+ if (tag !== 50) {
2202
1300
  break;
2203
1301
  }
2204
- message.type = reader.int32();
1302
+ message.objectType = reader.string();
2205
1303
  continue;
2206
1304
  }
2207
1305
  case 7: {
2208
- if (tag !== 58) {
1306
+ if (tag !== 56) {
2209
1307
  break;
2210
1308
  }
2211
- message.unit = reader.string();
1309
+ message.type = reader.int32();
2212
1310
  continue;
2213
1311
  }
2214
1312
  case 8: {
@@ -2222,70 +1320,53 @@ exports.SystemIo = {
2222
1320
  if (tag !== 74) {
2223
1321
  break;
2224
1322
  }
2225
- message.activeStyle = exports.SystemIoStyle.decode(reader, reader.uint32());
1323
+ message.ip = reader.string();
2226
1324
  continue;
2227
1325
  }
2228
1326
  case 10: {
2229
1327
  if (tag !== 82) {
2230
1328
  break;
2231
1329
  }
2232
- message.inactiveStyle = exports.SystemIoStyle.decode(reader, reader.uint32());
1330
+ message.userAgent = reader.string();
2233
1331
  continue;
2234
1332
  }
2235
1333
  case 11: {
2236
- if (tag !== 88) {
1334
+ if (tag !== 90) {
2237
1335
  break;
2238
1336
  }
2239
- message.active = reader.bool();
1337
+ message.previousExpiration = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
2240
1338
  continue;
2241
1339
  }
2242
1340
  case 12: {
2243
- if (tag !== 96) {
1341
+ if (tag !== 98) {
2244
1342
  break;
2245
1343
  }
2246
- message.graphable = reader.bool();
1344
+ message.nextExpiration = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
2247
1345
  continue;
2248
1346
  }
2249
1347
  case 13: {
2250
1348
  if (tag !== 104) {
2251
1349
  break;
2252
1350
  }
2253
- message.sord = reader.uint32();
1351
+ message.isUnlimited = reader.bool();
2254
1352
  continue;
2255
1353
  }
2256
1354
  case 14: {
2257
- if (tag !== 114) {
1355
+ if (tag !== 112) {
2258
1356
  break;
2259
1357
  }
2260
- message.hidden.push(reader.string());
1358
+ message.refund = reader.bool();
2261
1359
  continue;
2262
1360
  }
2263
1361
  case 15: {
2264
1362
  if (tag !== 122) {
2265
1363
  break;
2266
1364
  }
2267
- const entry15 = exports.SystemIo_UnknownEntry.decode(reader, reader.uint32());
2268
- if (entry15.value !== undefined) {
2269
- message.unknown[entry15.key] = entry15.value;
2270
- }
2271
- continue;
2272
- }
2273
- case 16: {
2274
- if (tag !== 128) {
2275
- break;
2276
- }
2277
- message.createdBy = long_1.default.fromString(reader.uint64().toString(), true);
2278
- continue;
2279
- }
2280
- case 17: {
2281
- if (tag !== 138) {
2282
- break;
2283
- }
2284
1365
  message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
2285
1366
  continue;
2286
1367
  }
2287
- case 18: {
2288
- if (tag !== 146) {
1368
+ case 16: {
1369
+ if (tag !== 130) {
2289
1370
  break;
2290
1371
  }
2291
1372
  message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
@@ -2302,82 +1383,66 @@ exports.SystemIo = {
2302
1383
  fromJSON(object) {
2303
1384
  return {
2304
1385
  id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
2305
- name: isSet(object.name) ? globalThis.String(object.name) : "",
2306
- deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : undefined,
2307
- formula: isSet(object.formula) ? globalThis.String(object.formula) : "",
2308
- type: isSet(object.type) ? systemIo_SystemIoTypeFromJSON(object.type) : 0,
2309
- unit: isSet(object.unit) ? globalThis.String(object.unit) : undefined,
1386
+ userId: isSet(object.user_id) ? long_1.default.fromValue(object.user_id) : undefined,
1387
+ deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
1388
+ imei: isSet(object.imei) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO,
1389
+ objectId: isSet(object.object_id) ? long_1.default.fromValue(object.object_id) : undefined,
1390
+ objectType: isSet(object.object_type) ? globalThis.String(object.object_type) : undefined,
1391
+ type: isSet(object.type) ? chargeLog_TypeFromJSON(object.type) : 0,
2310
1392
  description: isSet(object.description) ? globalThis.String(object.description) : undefined,
2311
- activeStyle: isSet(object.active_style) ? exports.SystemIoStyle.fromJSON(object.active_style) : undefined,
2312
- inactiveStyle: isSet(object.inactive_style) ? exports.SystemIoStyle.fromJSON(object.inactive_style) : undefined,
2313
- active: isSet(object.active) ? globalThis.Boolean(object.active) : false,
2314
- graphable: isSet(object.graphable) ? globalThis.Boolean(object.graphable) : false,
2315
- sord: isSet(object.sord) ? globalThis.Number(object.sord) : 0,
2316
- hidden: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.hidden) ? object.hidden.map((e) => globalThis.String(e)) : [],
2317
- unknown: isObject(object.unknown)
2318
- ? Object.entries(object.unknown).reduce((acc, [key, value]) => {
2319
- acc[key] = String(value);
2320
- return acc;
2321
- }, {})
2322
- : {},
2323
- createdBy: isSet(object.created_by) ? long_1.default.fromValue(object.created_by) : undefined,
1393
+ ip: isSet(object.ip) ? globalThis.String(object.ip) : undefined,
1394
+ userAgent: isSet(object.user_agent) ? globalThis.String(object.user_agent) : undefined,
1395
+ previousExpiration: isSet(object.previous_expiration) ? fromJsonTimestamp(object.previous_expiration) : undefined,
1396
+ nextExpiration: isSet(object.next_expiration) ? fromJsonTimestamp(object.next_expiration) : undefined,
1397
+ isUnlimited: isSet(object.is_unlimited) ? globalThis.Boolean(object.is_unlimited) : false,
1398
+ refund: isSet(object.refund) ? globalThis.Boolean(object.refund) : false,
2324
1399
  createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
2325
1400
  updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
2326
1401
  };
2327
1402
  },
2328
1403
  toJSON(message) {
2329
- var _a;
2330
1404
  const obj = {};
2331
1405
  if (!message.id.equals(long_1.default.UZERO)) {
2332
1406
  obj.id = (message.id || long_1.default.UZERO).toString();
2333
1407
  }
2334
- if (message.name !== "") {
2335
- obj.name = message.name;
1408
+ if (message.userId !== undefined) {
1409
+ obj.user_id = (message.userId || long_1.default.UZERO).toString();
2336
1410
  }
2337
- if (message.deviceId !== undefined) {
1411
+ if (!message.deviceId.equals(long_1.default.UZERO)) {
2338
1412
  obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
2339
1413
  }
2340
- if (message.formula !== "") {
2341
- obj.formula = message.formula;
1414
+ if (!message.imei.equals(long_1.default.UZERO)) {
1415
+ obj.imei = (message.imei || long_1.default.UZERO).toString();
2342
1416
  }
2343
- if (message.type !== 0) {
2344
- obj.type = systemIo_SystemIoTypeToJSON(message.type);
1417
+ if (message.objectId !== undefined) {
1418
+ obj.object_id = (message.objectId || long_1.default.UZERO).toString();
1419
+ }
1420
+ if (message.objectType !== undefined) {
1421
+ obj.object_type = message.objectType;
2345
1422
  }
2346
- if (message.unit !== undefined) {
2347
- obj.unit = message.unit;
1423
+ if (message.type !== 0) {
1424
+ obj.type = chargeLog_TypeToJSON(message.type);
2348
1425
  }
2349
1426
  if (message.description !== undefined) {
2350
1427
  obj.description = message.description;
2351
1428
  }
2352
- if (message.activeStyle !== undefined) {
2353
- obj.active_style = exports.SystemIoStyle.toJSON(message.activeStyle);
2354
- }
2355
- if (message.inactiveStyle !== undefined) {
2356
- obj.inactive_style = exports.SystemIoStyle.toJSON(message.inactiveStyle);
2357
- }
2358
- if (message.active !== false) {
2359
- obj.active = message.active;
1429
+ if (message.ip !== undefined) {
1430
+ obj.ip = message.ip;
2360
1431
  }
2361
- if (message.graphable !== false) {
2362
- obj.graphable = message.graphable;
1432
+ if (message.userAgent !== undefined) {
1433
+ obj.user_agent = message.userAgent;
2363
1434
  }
2364
- if (message.sord !== 0) {
2365
- obj.sord = Math.round(message.sord);
1435
+ if (message.previousExpiration !== undefined) {
1436
+ obj.previous_expiration = message.previousExpiration.toISOString();
2366
1437
  }
2367
- if ((_a = message.hidden) === null || _a === void 0 ? void 0 : _a.length) {
2368
- obj.hidden = message.hidden;
1438
+ if (message.nextExpiration !== undefined) {
1439
+ obj.next_expiration = message.nextExpiration.toISOString();
2369
1440
  }
2370
- if (message.unknown) {
2371
- const entries = Object.entries(message.unknown);
2372
- if (entries.length > 0) {
2373
- obj.unknown = {};
2374
- entries.forEach(([k, v]) => {
2375
- obj.unknown[k] = v;
2376
- });
2377
- }
1441
+ if (message.isUnlimited !== false) {
1442
+ obj.is_unlimited = message.isUnlimited;
2378
1443
  }
2379
- if (message.createdBy !== undefined) {
2380
- obj.created_by = (message.createdBy || long_1.default.UZERO).toString();
1444
+ if (message.refund !== false) {
1445
+ obj.refund = message.refund;
2381
1446
  }
2382
1447
  if (message.createdAt !== undefined) {
2383
1448
  obj.created_at = message.createdAt.toISOString();
@@ -2388,76 +1453,78 @@ exports.SystemIo = {
2388
1453
  return obj;
2389
1454
  },
2390
1455
  create(base) {
2391
- return exports.SystemIo.fromPartial(base !== null && base !== void 0 ? base : {});
1456
+ return exports.ChargeLog.fromPartial(base !== null && base !== void 0 ? base : {});
2392
1457
  },
2393
1458
  fromPartial(object) {
2394
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
2395
- const message = createBaseSystemIo();
1459
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1460
+ const message = createBaseChargeLog();
2396
1461
  message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
2397
- message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
1462
+ message.userId = (object.userId !== undefined && object.userId !== null)
1463
+ ? long_1.default.fromValue(object.userId)
1464
+ : undefined;
2398
1465
  message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
2399
1466
  ? long_1.default.fromValue(object.deviceId)
1467
+ : long_1.default.UZERO;
1468
+ message.imei = (object.imei !== undefined && object.imei !== null) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO;
1469
+ message.objectId = (object.objectId !== undefined && object.objectId !== null)
1470
+ ? long_1.default.fromValue(object.objectId)
2400
1471
  : undefined;
2401
- message.formula = (_b = object.formula) !== null && _b !== void 0 ? _b : "";
2402
- message.type = (_c = object.type) !== null && _c !== void 0 ? _c : 0;
2403
- message.unit = (_d = object.unit) !== null && _d !== void 0 ? _d : undefined;
2404
- message.description = (_e = object.description) !== null && _e !== void 0 ? _e : undefined;
2405
- message.activeStyle = (object.activeStyle !== undefined && object.activeStyle !== null)
2406
- ? exports.SystemIoStyle.fromPartial(object.activeStyle)
2407
- : undefined;
2408
- message.inactiveStyle = (object.inactiveStyle !== undefined && object.inactiveStyle !== null)
2409
- ? exports.SystemIoStyle.fromPartial(object.inactiveStyle)
2410
- : undefined;
2411
- message.active = (_f = object.active) !== null && _f !== void 0 ? _f : false;
2412
- message.graphable = (_g = object.graphable) !== null && _g !== void 0 ? _g : false;
2413
- message.sord = (_h = object.sord) !== null && _h !== void 0 ? _h : 0;
2414
- message.hidden = ((_j = object.hidden) === null || _j === void 0 ? void 0 : _j.map((e) => e)) || [];
2415
- message.unknown = Object.entries((_k = object.unknown) !== null && _k !== void 0 ? _k : {}).reduce((acc, [key, value]) => {
2416
- if (value !== undefined) {
2417
- acc[key] = globalThis.String(value);
2418
- }
2419
- return acc;
2420
- }, {});
2421
- message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
2422
- ? long_1.default.fromValue(object.createdBy)
2423
- : undefined;
2424
- message.createdAt = (_l = object.createdAt) !== null && _l !== void 0 ? _l : undefined;
2425
- message.updatedAt = (_m = object.updatedAt) !== null && _m !== void 0 ? _m : undefined;
1472
+ message.objectType = (_a = object.objectType) !== null && _a !== void 0 ? _a : undefined;
1473
+ message.type = (_b = object.type) !== null && _b !== void 0 ? _b : 0;
1474
+ message.description = (_c = object.description) !== null && _c !== void 0 ? _c : undefined;
1475
+ message.ip = (_d = object.ip) !== null && _d !== void 0 ? _d : undefined;
1476
+ message.userAgent = (_e = object.userAgent) !== null && _e !== void 0 ? _e : undefined;
1477
+ message.previousExpiration = (_f = object.previousExpiration) !== null && _f !== void 0 ? _f : undefined;
1478
+ message.nextExpiration = (_g = object.nextExpiration) !== null && _g !== void 0 ? _g : undefined;
1479
+ message.isUnlimited = (_h = object.isUnlimited) !== null && _h !== void 0 ? _h : false;
1480
+ message.refund = (_j = object.refund) !== null && _j !== void 0 ? _j : false;
1481
+ message.createdAt = (_k = object.createdAt) !== null && _k !== void 0 ? _k : undefined;
1482
+ message.updatedAt = (_l = object.updatedAt) !== null && _l !== void 0 ? _l : undefined;
2426
1483
  return message;
2427
1484
  },
2428
1485
  };
2429
- function createBaseSystemIo_UnknownEntry() {
2430
- return { key: "", value: "" };
1486
+ function createBaseTrialLog() {
1487
+ return { id: long_1.default.UZERO, imei: long_1.default.UZERO, createdAt: undefined };
2431
1488
  }
2432
- exports.SystemIo_UnknownEntry = {
1489
+ exports.TrialLog = {
2433
1490
  encode(message, writer = new wire_1.BinaryWriter()) {
2434
- if (message.key !== "") {
2435
- writer.uint32(10).string(message.key);
1491
+ if (!message.id.equals(long_1.default.UZERO)) {
1492
+ writer.uint32(8).uint64(message.id.toString());
1493
+ }
1494
+ if (!message.imei.equals(long_1.default.UZERO)) {
1495
+ writer.uint32(16).uint64(message.imei.toString());
2436
1496
  }
2437
- if (message.value !== "") {
2438
- writer.uint32(18).string(message.value);
1497
+ if (message.createdAt !== undefined) {
1498
+ timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(26).fork()).join();
2439
1499
  }
2440
1500
  return writer;
2441
1501
  },
2442
1502
  decode(input, length) {
2443
1503
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2444
1504
  const end = length === undefined ? reader.len : reader.pos + length;
2445
- const message = createBaseSystemIo_UnknownEntry();
1505
+ const message = createBaseTrialLog();
2446
1506
  while (reader.pos < end) {
2447
1507
  const tag = reader.uint32();
2448
1508
  switch (tag >>> 3) {
2449
1509
  case 1: {
2450
- if (tag !== 10) {
1510
+ if (tag !== 8) {
2451
1511
  break;
2452
1512
  }
2453
- message.key = reader.string();
1513
+ message.id = long_1.default.fromString(reader.uint64().toString(), true);
2454
1514
  continue;
2455
1515
  }
2456
1516
  case 2: {
2457
- if (tag !== 18) {
1517
+ if (tag !== 16) {
2458
1518
  break;
2459
1519
  }
2460
- message.value = reader.string();
1520
+ message.imei = long_1.default.fromString(reader.uint64().toString(), true);
1521
+ continue;
1522
+ }
1523
+ case 3: {
1524
+ if (tag !== 26) {
1525
+ break;
1526
+ }
1527
+ message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
2461
1528
  continue;
2462
1529
  }
2463
1530
  }
@@ -2470,132 +1537,159 @@ exports.SystemIo_UnknownEntry = {
2470
1537
  },
2471
1538
  fromJSON(object) {
2472
1539
  return {
2473
- key: isSet(object.key) ? globalThis.String(object.key) : "",
2474
- value: isSet(object.value) ? globalThis.String(object.value) : "",
1540
+ id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
1541
+ imei: isSet(object.imei) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO,
1542
+ createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
2475
1543
  };
2476
1544
  },
2477
1545
  toJSON(message) {
2478
1546
  const obj = {};
2479
- if (message.key !== "") {
2480
- obj.key = message.key;
1547
+ if (!message.id.equals(long_1.default.UZERO)) {
1548
+ obj.id = (message.id || long_1.default.UZERO).toString();
1549
+ }
1550
+ if (!message.imei.equals(long_1.default.UZERO)) {
1551
+ obj.imei = (message.imei || long_1.default.UZERO).toString();
2481
1552
  }
2482
- if (message.value !== "") {
2483
- obj.value = message.value;
1553
+ if (message.createdAt !== undefined) {
1554
+ obj.created_at = message.createdAt.toISOString();
2484
1555
  }
2485
1556
  return obj;
2486
1557
  },
2487
1558
  create(base) {
2488
- return exports.SystemIo_UnknownEntry.fromPartial(base !== null && base !== void 0 ? base : {});
1559
+ return exports.TrialLog.fromPartial(base !== null && base !== void 0 ? base : {});
2489
1560
  },
2490
1561
  fromPartial(object) {
2491
- var _a, _b;
2492
- const message = createBaseSystemIo_UnknownEntry();
2493
- message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
2494
- message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
1562
+ var _a;
1563
+ const message = createBaseTrialLog();
1564
+ message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
1565
+ message.imei = (object.imei !== undefined && object.imei !== null) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO;
1566
+ message.createdAt = (_a = object.createdAt) !== null && _a !== void 0 ? _a : undefined;
2495
1567
  return message;
2496
1568
  },
2497
1569
  };
2498
- function createBaseShownIo() {
1570
+ function createBaseLiveLocation() {
2499
1571
  return {
2500
- name: "",
2501
- style: undefined,
2502
- unit: undefined,
2503
- description: undefined,
2504
- value: "",
2505
- active: false,
2506
- graphable: false,
2507
- sord: 0,
1572
+ id: long_1.default.UZERO,
1573
+ organizationId: long_1.default.UZERO,
1574
+ createdBy: undefined,
1575
+ updatedBy: undefined,
1576
+ uuid: "",
1577
+ expiresAt: undefined,
1578
+ password: undefined,
1579
+ createdAt: undefined,
1580
+ updatedAt: undefined,
1581
+ objects: [],
2508
1582
  };
2509
1583
  }
2510
- exports.ShownIo = {
1584
+ exports.LiveLocation = {
2511
1585
  encode(message, writer = new wire_1.BinaryWriter()) {
2512
- if (message.name !== "") {
2513
- writer.uint32(10).string(message.name);
1586
+ if (!message.id.equals(long_1.default.UZERO)) {
1587
+ writer.uint32(8).uint64(message.id.toString());
1588
+ }
1589
+ if (!message.organizationId.equals(long_1.default.UZERO)) {
1590
+ writer.uint32(16).uint64(message.organizationId.toString());
2514
1591
  }
2515
- if (message.style !== undefined) {
2516
- exports.SystemIoStyle.encode(message.style, writer.uint32(18).fork()).join();
1592
+ if (message.createdBy !== undefined) {
1593
+ writer.uint32(24).uint64(message.createdBy.toString());
1594
+ }
1595
+ if (message.updatedBy !== undefined) {
1596
+ writer.uint32(32).uint64(message.updatedBy.toString());
2517
1597
  }
2518
- if (message.unit !== undefined) {
2519
- writer.uint32(26).string(message.unit);
1598
+ if (message.uuid !== "") {
1599
+ writer.uint32(42).string(message.uuid);
2520
1600
  }
2521
- if (message.description !== undefined) {
2522
- writer.uint32(34).string(message.description);
1601
+ if (message.expiresAt !== undefined) {
1602
+ timestamp_1.Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(50).fork()).join();
2523
1603
  }
2524
- if (message.value !== "") {
2525
- writer.uint32(42).string(message.value);
1604
+ if (message.password !== undefined) {
1605
+ writer.uint32(58).string(message.password);
2526
1606
  }
2527
- if (message.active !== false) {
2528
- writer.uint32(48).bool(message.active);
1607
+ if (message.createdAt !== undefined) {
1608
+ timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(66).fork()).join();
2529
1609
  }
2530
- if (message.graphable !== false) {
2531
- writer.uint32(56).bool(message.graphable);
1610
+ if (message.updatedAt !== undefined) {
1611
+ timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(74).fork()).join();
2532
1612
  }
2533
- if (message.sord !== 0) {
2534
- writer.uint32(64).uint32(message.sord);
1613
+ for (const v of message.objects) {
1614
+ exports.LiveLocationRelated.encode(v, writer.uint32(82).fork()).join();
2535
1615
  }
2536
1616
  return writer;
2537
1617
  },
2538
1618
  decode(input, length) {
2539
1619
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2540
1620
  const end = length === undefined ? reader.len : reader.pos + length;
2541
- const message = createBaseShownIo();
1621
+ const message = createBaseLiveLocation();
2542
1622
  while (reader.pos < end) {
2543
1623
  const tag = reader.uint32();
2544
1624
  switch (tag >>> 3) {
2545
1625
  case 1: {
2546
- if (tag !== 10) {
1626
+ if (tag !== 8) {
2547
1627
  break;
2548
1628
  }
2549
- message.name = reader.string();
1629
+ message.id = long_1.default.fromString(reader.uint64().toString(), true);
2550
1630
  continue;
2551
1631
  }
2552
1632
  case 2: {
2553
- if (tag !== 18) {
1633
+ if (tag !== 16) {
2554
1634
  break;
2555
1635
  }
2556
- message.style = exports.SystemIoStyle.decode(reader, reader.uint32());
1636
+ message.organizationId = long_1.default.fromString(reader.uint64().toString(), true);
2557
1637
  continue;
2558
1638
  }
2559
1639
  case 3: {
2560
- if (tag !== 26) {
1640
+ if (tag !== 24) {
2561
1641
  break;
2562
1642
  }
2563
- message.unit = reader.string();
1643
+ message.createdBy = long_1.default.fromString(reader.uint64().toString(), true);
2564
1644
  continue;
2565
1645
  }
2566
1646
  case 4: {
2567
- if (tag !== 34) {
1647
+ if (tag !== 32) {
2568
1648
  break;
2569
1649
  }
2570
- message.description = reader.string();
1650
+ message.updatedBy = long_1.default.fromString(reader.uint64().toString(), true);
2571
1651
  continue;
2572
1652
  }
2573
1653
  case 5: {
2574
1654
  if (tag !== 42) {
2575
1655
  break;
2576
1656
  }
2577
- message.value = reader.string();
1657
+ message.uuid = reader.string();
2578
1658
  continue;
2579
1659
  }
2580
1660
  case 6: {
2581
- if (tag !== 48) {
1661
+ if (tag !== 50) {
2582
1662
  break;
2583
1663
  }
2584
- message.active = reader.bool();
1664
+ message.expiresAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
2585
1665
  continue;
2586
1666
  }
2587
1667
  case 7: {
2588
- if (tag !== 56) {
1668
+ if (tag !== 58) {
2589
1669
  break;
2590
1670
  }
2591
- message.graphable = reader.bool();
1671
+ message.password = reader.string();
2592
1672
  continue;
2593
1673
  }
2594
1674
  case 8: {
2595
- if (tag !== 64) {
1675
+ if (tag !== 66) {
1676
+ break;
1677
+ }
1678
+ message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1679
+ continue;
1680
+ }
1681
+ case 9: {
1682
+ if (tag !== 74) {
1683
+ break;
1684
+ }
1685
+ message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
1686
+ continue;
1687
+ }
1688
+ case 10: {
1689
+ if (tag !== 82) {
2596
1690
  break;
2597
1691
  }
2598
- message.sord = reader.uint32();
1692
+ message.objects.push(exports.LiveLocationRelated.decode(reader, reader.uint32()));
2599
1693
  continue;
2600
1694
  }
2601
1695
  }
@@ -2608,107 +1702,116 @@ exports.ShownIo = {
2608
1702
  },
2609
1703
  fromJSON(object) {
2610
1704
  return {
2611
- name: isSet(object.name) ? globalThis.String(object.name) : "",
2612
- style: isSet(object.style) ? exports.SystemIoStyle.fromJSON(object.style) : undefined,
2613
- unit: isSet(object.unit) ? globalThis.String(object.unit) : undefined,
2614
- description: isSet(object.description) ? globalThis.String(object.description) : undefined,
2615
- value: isSet(object.value) ? globalThis.String(object.value) : "",
2616
- active: isSet(object.active) ? globalThis.Boolean(object.active) : false,
2617
- graphable: isSet(object.graphable) ? globalThis.Boolean(object.graphable) : false,
2618
- sord: isSet(object.sord) ? globalThis.Number(object.sord) : 0,
1705
+ id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
1706
+ organizationId: isSet(object.organizationId) ? long_1.default.fromValue(object.organizationId) : long_1.default.UZERO,
1707
+ createdBy: isSet(object.createdBy) ? long_1.default.fromValue(object.createdBy) : undefined,
1708
+ updatedBy: isSet(object.updatedBy) ? long_1.default.fromValue(object.updatedBy) : undefined,
1709
+ uuid: isSet(object.uuid) ? globalThis.String(object.uuid) : "",
1710
+ expiresAt: isSet(object.expiresAt) ? fromJsonTimestamp(object.expiresAt) : undefined,
1711
+ password: isSet(object.password) ? globalThis.String(object.password) : undefined,
1712
+ createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
1713
+ updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
1714
+ objects: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.objects)
1715
+ ? object.objects.map((e) => exports.LiveLocationRelated.fromJSON(e))
1716
+ : [],
2619
1717
  };
2620
1718
  },
2621
1719
  toJSON(message) {
1720
+ var _a;
2622
1721
  const obj = {};
2623
- if (message.name !== "") {
2624
- obj.name = message.name;
1722
+ if (!message.id.equals(long_1.default.UZERO)) {
1723
+ obj.id = (message.id || long_1.default.UZERO).toString();
2625
1724
  }
2626
- if (message.style !== undefined) {
2627
- obj.style = exports.SystemIoStyle.toJSON(message.style);
1725
+ if (!message.organizationId.equals(long_1.default.UZERO)) {
1726
+ obj.organizationId = (message.organizationId || long_1.default.UZERO).toString();
2628
1727
  }
2629
- if (message.unit !== undefined) {
2630
- obj.unit = message.unit;
1728
+ if (message.createdBy !== undefined) {
1729
+ obj.createdBy = (message.createdBy || long_1.default.UZERO).toString();
2631
1730
  }
2632
- if (message.description !== undefined) {
2633
- obj.description = message.description;
1731
+ if (message.updatedBy !== undefined) {
1732
+ obj.updatedBy = (message.updatedBy || long_1.default.UZERO).toString();
2634
1733
  }
2635
- if (message.value !== "") {
2636
- obj.value = message.value;
1734
+ if (message.uuid !== "") {
1735
+ obj.uuid = message.uuid;
2637
1736
  }
2638
- if (message.active !== false) {
2639
- obj.active = message.active;
1737
+ if (message.expiresAt !== undefined) {
1738
+ obj.expiresAt = message.expiresAt.toISOString();
1739
+ }
1740
+ if (message.password !== undefined) {
1741
+ obj.password = message.password;
1742
+ }
1743
+ if (message.createdAt !== undefined) {
1744
+ obj.createdAt = message.createdAt.toISOString();
2640
1745
  }
2641
- if (message.graphable !== false) {
2642
- obj.graphable = message.graphable;
1746
+ if (message.updatedAt !== undefined) {
1747
+ obj.updatedAt = message.updatedAt.toISOString();
2643
1748
  }
2644
- if (message.sord !== 0) {
2645
- obj.sord = Math.round(message.sord);
1749
+ if ((_a = message.objects) === null || _a === void 0 ? void 0 : _a.length) {
1750
+ obj.objects = message.objects.map((e) => exports.LiveLocationRelated.toJSON(e));
2646
1751
  }
2647
1752
  return obj;
2648
1753
  },
2649
1754
  create(base) {
2650
- return exports.ShownIo.fromPartial(base !== null && base !== void 0 ? base : {});
1755
+ return exports.LiveLocation.fromPartial(base !== null && base !== void 0 ? base : {});
2651
1756
  },
2652
1757
  fromPartial(object) {
2653
- var _a, _b, _c, _d, _e, _f, _g;
2654
- const message = createBaseShownIo();
2655
- message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
2656
- message.style = (object.style !== undefined && object.style !== null)
2657
- ? exports.SystemIoStyle.fromPartial(object.style)
1758
+ var _a, _b, _c, _d, _e, _f;
1759
+ const message = createBaseLiveLocation();
1760
+ message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
1761
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
1762
+ ? long_1.default.fromValue(object.organizationId)
1763
+ : long_1.default.UZERO;
1764
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
1765
+ ? long_1.default.fromValue(object.createdBy)
2658
1766
  : undefined;
2659
- message.unit = (_b = object.unit) !== null && _b !== void 0 ? _b : undefined;
2660
- message.description = (_c = object.description) !== null && _c !== void 0 ? _c : undefined;
2661
- message.value = (_d = object.value) !== null && _d !== void 0 ? _d : "";
2662
- message.active = (_e = object.active) !== null && _e !== void 0 ? _e : false;
2663
- message.graphable = (_f = object.graphable) !== null && _f !== void 0 ? _f : false;
2664
- message.sord = (_g = object.sord) !== null && _g !== void 0 ? _g : 0;
1767
+ message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
1768
+ ? long_1.default.fromValue(object.updatedBy)
1769
+ : undefined;
1770
+ message.uuid = (_a = object.uuid) !== null && _a !== void 0 ? _a : "";
1771
+ message.expiresAt = (_b = object.expiresAt) !== null && _b !== void 0 ? _b : undefined;
1772
+ message.password = (_c = object.password) !== null && _c !== void 0 ? _c : undefined;
1773
+ message.createdAt = (_d = object.createdAt) !== null && _d !== void 0 ? _d : undefined;
1774
+ message.updatedAt = (_e = object.updatedAt) !== null && _e !== void 0 ? _e : undefined;
1775
+ message.objects = ((_f = object.objects) === null || _f === void 0 ? void 0 : _f.map((e) => exports.LiveLocationRelated.fromPartial(e))) || [];
2665
1776
  return message;
2666
1777
  },
2667
1778
  };
2668
- function createBaseConfig() {
1779
+ function createBaseLiveLocationRelated() {
2669
1780
  return {
2670
- id: 0,
2671
- organizationId: long_1.default.UZERO,
2672
- createdBy: undefined,
2673
- updatedBy: undefined,
2674
- key: "",
2675
- value: "",
1781
+ id: long_1.default.UZERO,
1782
+ liveLocationId: long_1.default.UZERO,
1783
+ objectId: long_1.default.UZERO,
1784
+ objectType: "",
2676
1785
  createdAt: undefined,
2677
1786
  updatedAt: undefined,
2678
1787
  };
2679
1788
  }
2680
- exports.Config = {
1789
+ exports.LiveLocationRelated = {
2681
1790
  encode(message, writer = new wire_1.BinaryWriter()) {
2682
- if (message.id !== 0) {
2683
- writer.uint32(8).uint32(message.id);
2684
- }
2685
- if (!message.organizationId.equals(long_1.default.UZERO)) {
2686
- writer.uint32(16).uint64(message.organizationId.toString());
2687
- }
2688
- if (message.createdBy !== undefined) {
2689
- writer.uint32(24).uint64(message.createdBy.toString());
1791
+ if (!message.id.equals(long_1.default.UZERO)) {
1792
+ writer.uint32(8).uint64(message.id.toString());
2690
1793
  }
2691
- if (message.updatedBy !== undefined) {
2692
- writer.uint32(32).uint64(message.updatedBy.toString());
1794
+ if (!message.liveLocationId.equals(long_1.default.UZERO)) {
1795
+ writer.uint32(16).uint64(message.liveLocationId.toString());
2693
1796
  }
2694
- if (message.key !== "") {
2695
- writer.uint32(42).string(message.key);
1797
+ if (!message.objectId.equals(long_1.default.UZERO)) {
1798
+ writer.uint32(24).uint64(message.objectId.toString());
2696
1799
  }
2697
- if (message.value !== "") {
2698
- writer.uint32(50).string(message.value);
1800
+ if (message.objectType !== "") {
1801
+ writer.uint32(34).string(message.objectType);
2699
1802
  }
2700
1803
  if (message.createdAt !== undefined) {
2701
- timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).join();
1804
+ timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(42).fork()).join();
2702
1805
  }
2703
1806
  if (message.updatedAt !== undefined) {
2704
- timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(66).fork()).join();
1807
+ timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(50).fork()).join();
2705
1808
  }
2706
1809
  return writer;
2707
1810
  },
2708
1811
  decode(input, length) {
2709
1812
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2710
1813
  const end = length === undefined ? reader.len : reader.pos + length;
2711
- const message = createBaseConfig();
1814
+ const message = createBaseLiveLocationRelated();
2712
1815
  while (reader.pos < end) {
2713
1816
  const tag = reader.uint32();
2714
1817
  switch (tag >>> 3) {
@@ -2716,55 +1819,41 @@ exports.Config = {
2716
1819
  if (tag !== 8) {
2717
1820
  break;
2718
1821
  }
2719
- message.id = reader.uint32();
1822
+ message.id = long_1.default.fromString(reader.uint64().toString(), true);
2720
1823
  continue;
2721
1824
  }
2722
1825
  case 2: {
2723
1826
  if (tag !== 16) {
2724
1827
  break;
2725
1828
  }
2726
- message.organizationId = long_1.default.fromString(reader.uint64().toString(), true);
1829
+ message.liveLocationId = long_1.default.fromString(reader.uint64().toString(), true);
2727
1830
  continue;
2728
1831
  }
2729
1832
  case 3: {
2730
1833
  if (tag !== 24) {
2731
1834
  break;
2732
1835
  }
2733
- message.createdBy = long_1.default.fromString(reader.uint64().toString(), true);
1836
+ message.objectId = long_1.default.fromString(reader.uint64().toString(), true);
2734
1837
  continue;
2735
1838
  }
2736
1839
  case 4: {
2737
- if (tag !== 32) {
1840
+ if (tag !== 34) {
2738
1841
  break;
2739
1842
  }
2740
- message.updatedBy = long_1.default.fromString(reader.uint64().toString(), true);
1843
+ message.objectType = reader.string();
2741
1844
  continue;
2742
1845
  }
2743
1846
  case 5: {
2744
1847
  if (tag !== 42) {
2745
1848
  break;
2746
1849
  }
2747
- message.key = reader.string();
1850
+ message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
2748
1851
  continue;
2749
1852
  }
2750
1853
  case 6: {
2751
1854
  if (tag !== 50) {
2752
1855
  break;
2753
1856
  }
2754
- message.value = reader.string();
2755
- continue;
2756
- }
2757
- case 7: {
2758
- if (tag !== 58) {
2759
- break;
2760
- }
2761
- message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
2762
- continue;
2763
- }
2764
- case 8: {
2765
- if (tag !== 66) {
2766
- break;
2767
- }
2768
1857
  message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
2769
1858
  continue;
2770
1859
  }
@@ -2778,64 +1867,52 @@ exports.Config = {
2778
1867
  },
2779
1868
  fromJSON(object) {
2780
1869
  return {
2781
- id: isSet(object.id) ? globalThis.Number(object.id) : 0,
2782
- organizationId: isSet(object.organization_id) ? long_1.default.fromValue(object.organization_id) : long_1.default.UZERO,
2783
- createdBy: isSet(object.created_by) ? long_1.default.fromValue(object.created_by) : undefined,
2784
- updatedBy: isSet(object.updated_by) ? long_1.default.fromValue(object.updated_by) : undefined,
2785
- key: isSet(object.key) ? globalThis.String(object.key) : "",
2786
- value: isSet(object.value) ? globalThis.String(object.value) : "",
2787
- createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
2788
- updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
1870
+ id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
1871
+ liveLocationId: isSet(object.liveLocationId) ? long_1.default.fromValue(object.liveLocationId) : long_1.default.UZERO,
1872
+ objectId: isSet(object.objectId) ? long_1.default.fromValue(object.objectId) : long_1.default.UZERO,
1873
+ objectType: isSet(object.objectType) ? globalThis.String(object.objectType) : "",
1874
+ createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
1875
+ updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
2789
1876
  };
2790
1877
  },
2791
1878
  toJSON(message) {
2792
1879
  const obj = {};
2793
- if (message.id !== 0) {
2794
- obj.id = Math.round(message.id);
2795
- }
2796
- if (!message.organizationId.equals(long_1.default.UZERO)) {
2797
- obj.organization_id = (message.organizationId || long_1.default.UZERO).toString();
2798
- }
2799
- if (message.createdBy !== undefined) {
2800
- obj.created_by = (message.createdBy || long_1.default.UZERO).toString();
1880
+ if (!message.id.equals(long_1.default.UZERO)) {
1881
+ obj.id = (message.id || long_1.default.UZERO).toString();
2801
1882
  }
2802
- if (message.updatedBy !== undefined) {
2803
- obj.updated_by = (message.updatedBy || long_1.default.UZERO).toString();
1883
+ if (!message.liveLocationId.equals(long_1.default.UZERO)) {
1884
+ obj.liveLocationId = (message.liveLocationId || long_1.default.UZERO).toString();
2804
1885
  }
2805
- if (message.key !== "") {
2806
- obj.key = message.key;
1886
+ if (!message.objectId.equals(long_1.default.UZERO)) {
1887
+ obj.objectId = (message.objectId || long_1.default.UZERO).toString();
2807
1888
  }
2808
- if (message.value !== "") {
2809
- obj.value = message.value;
1889
+ if (message.objectType !== "") {
1890
+ obj.objectType = message.objectType;
2810
1891
  }
2811
1892
  if (message.createdAt !== undefined) {
2812
- obj.created_at = message.createdAt.toISOString();
1893
+ obj.createdAt = message.createdAt.toISOString();
2813
1894
  }
2814
1895
  if (message.updatedAt !== undefined) {
2815
- obj.updated_at = message.updatedAt.toISOString();
1896
+ obj.updatedAt = message.updatedAt.toISOString();
2816
1897
  }
2817
1898
  return obj;
2818
1899
  },
2819
1900
  create(base) {
2820
- return exports.Config.fromPartial(base !== null && base !== void 0 ? base : {});
1901
+ return exports.LiveLocationRelated.fromPartial(base !== null && base !== void 0 ? base : {});
2821
1902
  },
2822
1903
  fromPartial(object) {
2823
- var _a, _b, _c, _d, _e;
2824
- const message = createBaseConfig();
2825
- message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
2826
- message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
2827
- ? long_1.default.fromValue(object.organizationId)
1904
+ var _a, _b, _c;
1905
+ const message = createBaseLiveLocationRelated();
1906
+ message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
1907
+ message.liveLocationId = (object.liveLocationId !== undefined && object.liveLocationId !== null)
1908
+ ? long_1.default.fromValue(object.liveLocationId)
2828
1909
  : long_1.default.UZERO;
2829
- message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
2830
- ? long_1.default.fromValue(object.createdBy)
2831
- : undefined;
2832
- message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
2833
- ? long_1.default.fromValue(object.updatedBy)
2834
- : undefined;
2835
- message.key = (_b = object.key) !== null && _b !== void 0 ? _b : "";
2836
- message.value = (_c = object.value) !== null && _c !== void 0 ? _c : "";
2837
- message.createdAt = (_d = object.createdAt) !== null && _d !== void 0 ? _d : undefined;
2838
- message.updatedAt = (_e = object.updatedAt) !== null && _e !== void 0 ? _e : undefined;
1910
+ message.objectId = (object.objectId !== undefined && object.objectId !== null)
1911
+ ? long_1.default.fromValue(object.objectId)
1912
+ : long_1.default.UZERO;
1913
+ message.objectType = (_a = object.objectType) !== null && _a !== void 0 ? _a : "";
1914
+ message.createdAt = (_b = object.createdAt) !== null && _b !== void 0 ? _b : undefined;
1915
+ message.updatedAt = (_c = object.updatedAt) !== null && _c !== void 0 ? _c : undefined;
2839
1916
  return message;
2840
1917
  },
2841
1918
  };