@fatehan/tsrp 1.0.12 → 1.0.14

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.
@@ -5,8 +5,8 @@
5
5
  // protoc v3.21.12
6
6
  // source: packets/dataModel.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.Concox = exports.ConcoxLikeR31 = exports.Jtt808SignalingDataMessage1212 = exports.Jtt1078EventMediaDataUpload = exports.Jtt1078EventMediaInfoUpload = exports.Jtt10780x0001Answer = exports.Jtt808SignalingDataMessage1210_Attachment = exports.Jtt808SignalingDataMessage1210 = exports.Jtt808SignalingDataMessage1211 = exports.AdditionalInformation = exports.Packet = exports.Authorize = exports.Data = exports.Log = exports.Compact_AlertValuesEntry = exports.Compact = exports.ADAS = exports.CanAdaptersElements_LcCan = exports.CanAdaptersElements_Cisf = exports.CanAdaptersElements_Usf = exports.CanAdaptersElements_Asf = exports.CanAdaptersElements_Isf = exports.CanAdaptersElements_Csf = exports.CanAdaptersElements_Ssf = exports.CanAdaptersElements = exports.BleSensorsIoElements = exports.ObdOemElements = exports.ObdElements = exports.EventualIoElements = exports.IoElement_MSP500 = exports.IoElement_Driver = exports.IoElement_Ble = exports.IoElement_Eye = exports.IoElement_LLS = exports.IoElement_DallasTemperature = exports.IoElement = exports.OdysseyDevice_TripType = exports.OdysseyDevice_ObjectType = exports.AdditionalInformation_Key = exports.Packet_AnswerType = exports.Packet_CustomPacketType = exports.Packet_Type = exports.ADAS_DeviationType = exports.ADAS_RoadSignType = exports.EventualIoElements_ZoneEvent = exports.FileFormat = exports.FileType = exports.Protocol = exports.Alert = exports.protobufPackage = void 0;
9
- exports.JTT808MediaRetrieval0802_Item = exports.JTT808MediaRetrieval0802 = exports.DeviceStatus = exports.Task_AlertIdNumberEntry = exports.Task = exports.DeviceData = exports.FusionDevice = exports.OdysseyDevice = exports.Client = exports.ConcoxRecording0x8d = void 0;
8
+ exports.Jtt1078EventMediaDataUpload = exports.Jtt1078EventMediaInfoUpload = exports.Jtt10780x0001Answer = exports.Jtt808SignalingDataMessage1210_Attachment = exports.Jtt808SignalingDataMessage1210 = exports.Jtt808SignalingDataMessage1211 = exports.AdditionalInformation = exports.ReplyTeltonika = exports.ReplyConcox = exports.Stream = exports.Packet = exports.Authorize = exports.Data = exports.Log = exports.Compact_AlertValuesEntry = exports.Compact = exports.ADAS = exports.CanAdaptersElements_LcCan = exports.CanAdaptersElements_Cisf = exports.CanAdaptersElements_Usf = exports.CanAdaptersElements_Asf = exports.CanAdaptersElements_Isf = exports.CanAdaptersElements_Csf = exports.CanAdaptersElements_Ssf = exports.CanAdaptersElements = exports.BleSensorsIoElements = exports.ObdOemElements = exports.ObdElements = exports.EventualIoElements = exports.IoElement_MSP500 = exports.IoElement_Driver = exports.IoElement_Ble = exports.IoElement_Eye = exports.IoElement_LLS = exports.IoElement_DallasTemperature = exports.IoElement = exports.OdysseyDevice_TripType = exports.OdysseyDevice_ObjectType = exports.AdditionalInformation_Key = exports.Packet_AnswerType = exports.Packet_CustomPacketType = exports.Packet_Type = exports.ADAS_DeviationType = exports.ADAS_RoadSignType = exports.EventualIoElements_ZoneEvent = exports.FileFormat = exports.FileType = exports.Protocol = exports.Alert = exports.protobufPackage = void 0;
9
+ exports.JTT808MediaRetrieval0802_Item = exports.JTT808MediaRetrieval0802 = exports.DeviceStatus = exports.Task_AlertIdNumberEntry = exports.Task = exports.DeviceData = exports.FusionDevice = exports.OdysseyDevice = exports.Client = exports.ConcoxRecording0x8d = exports.ConcoxLikeR31 = exports.Jtt808SignalingDataMessage1212 = void 0;
10
10
  exports.alertFromJSON = alertFromJSON;
11
11
  exports.alertToJSON = alertToJSON;
12
12
  exports.protocolFromJSON = protocolFromJSON;
@@ -1727,7 +1727,6 @@ var Packet_AnswerType;
1727
1727
  Packet_AnswerType[Packet_AnswerType["Int"] = 2] = "Int";
1728
1728
  Packet_AnswerType[Packet_AnswerType["Jtt10780x0001"] = 3] = "Jtt10780x0001";
1729
1729
  Packet_AnswerType[Packet_AnswerType["ConcoxLikeR31"] = 4] = "ConcoxLikeR31";
1730
- Packet_AnswerType[Packet_AnswerType["Concox"] = 5] = "Concox";
1731
1730
  Packet_AnswerType[Packet_AnswerType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
1732
1731
  })(Packet_AnswerType || (exports.Packet_AnswerType = Packet_AnswerType = {}));
1733
1732
  function packet_AnswerTypeFromJSON(object) {
@@ -1747,9 +1746,6 @@ function packet_AnswerTypeFromJSON(object) {
1747
1746
  case 4:
1748
1747
  case "ConcoxLikeR31":
1749
1748
  return Packet_AnswerType.ConcoxLikeR31;
1750
- case 5:
1751
- case "Concox":
1752
- return Packet_AnswerType.Concox;
1753
1749
  case -1:
1754
1750
  case "UNRECOGNIZED":
1755
1751
  default:
@@ -1768,8 +1764,6 @@ function packet_AnswerTypeToJSON(object) {
1768
1764
  return "Jtt10780x0001";
1769
1765
  case Packet_AnswerType.ConcoxLikeR31:
1770
1766
  return "ConcoxLikeR31";
1771
- case Packet_AnswerType.Concox:
1772
- return "Concox";
1773
1767
  case Packet_AnswerType.UNRECOGNIZED:
1774
1768
  default:
1775
1769
  return "UNRECOGNIZED";
@@ -14777,6 +14771,9 @@ function createBasePacket() {
14777
14771
  customPayload: undefined,
14778
14772
  answerType: 0,
14779
14773
  additional: [],
14774
+ concox: undefined,
14775
+ teltonika: undefined,
14776
+ stream: undefined,
14780
14777
  };
14781
14778
  }
14782
14779
  exports.Packet = {
@@ -14808,6 +14805,15 @@ exports.Packet = {
14808
14805
  for (const v of message.additional) {
14809
14806
  exports.AdditionalInformation.encode(v, writer.uint32(74).fork()).join();
14810
14807
  }
14808
+ if (message.concox !== undefined) {
14809
+ exports.ReplyConcox.encode(message.concox, writer.uint32(82).fork()).join();
14810
+ }
14811
+ if (message.teltonika !== undefined) {
14812
+ exports.ReplyTeltonika.encode(message.teltonika, writer.uint32(98).fork()).join();
14813
+ }
14814
+ if (message.stream !== undefined) {
14815
+ exports.Stream.encode(message.stream, writer.uint32(90).fork()).join();
14816
+ }
14811
14817
  return writer;
14812
14818
  },
14813
14819
  decode(input, length) {
@@ -14880,6 +14886,27 @@ exports.Packet = {
14880
14886
  message.additional.push(exports.AdditionalInformation.decode(reader, reader.uint32()));
14881
14887
  continue;
14882
14888
  }
14889
+ case 10: {
14890
+ if (tag !== 82) {
14891
+ break;
14892
+ }
14893
+ message.concox = exports.ReplyConcox.decode(reader, reader.uint32());
14894
+ continue;
14895
+ }
14896
+ case 12: {
14897
+ if (tag !== 98) {
14898
+ break;
14899
+ }
14900
+ message.teltonika = exports.ReplyTeltonika.decode(reader, reader.uint32());
14901
+ continue;
14902
+ }
14903
+ case 11: {
14904
+ if (tag !== 90) {
14905
+ break;
14906
+ }
14907
+ message.stream = exports.Stream.decode(reader, reader.uint32());
14908
+ continue;
14909
+ }
14883
14910
  }
14884
14911
  if ((tag & 7) === 4 || tag === 0) {
14885
14912
  break;
@@ -14901,6 +14928,9 @@ exports.Packet = {
14901
14928
  additional: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.additional)
14902
14929
  ? object.additional.map((e) => exports.AdditionalInformation.fromJSON(e))
14903
14930
  : [],
14931
+ concox: isSet(object.concox_reply) ? exports.ReplyConcox.fromJSON(object.concox_reply) : undefined,
14932
+ teltonika: isSet(object.teltonika_reply) ? exports.ReplyTeltonika.fromJSON(object.teltonika_reply) : undefined,
14933
+ stream: isSet(object.stream_packet) ? exports.Stream.fromJSON(object.stream_packet) : undefined,
14904
14934
  };
14905
14935
  },
14906
14936
  toJSON(message) {
@@ -14933,6 +14963,15 @@ exports.Packet = {
14933
14963
  if ((_b = message.additional) === null || _b === void 0 ? void 0 : _b.length) {
14934
14964
  obj.additional = message.additional.map((e) => exports.AdditionalInformation.toJSON(e));
14935
14965
  }
14966
+ if (message.concox !== undefined) {
14967
+ obj.concox_reply = exports.ReplyConcox.toJSON(message.concox);
14968
+ }
14969
+ if (message.teltonika !== undefined) {
14970
+ obj.teltonika_reply = exports.ReplyTeltonika.toJSON(message.teltonika);
14971
+ }
14972
+ if (message.stream !== undefined) {
14973
+ obj.stream_packet = exports.Stream.toJSON(message.stream);
14974
+ }
14936
14975
  return obj;
14937
14976
  },
14938
14977
  create(base) {
@@ -14952,6 +14991,267 @@ exports.Packet = {
14952
14991
  message.customPayload = (_f = object.customPayload) !== null && _f !== void 0 ? _f : undefined;
14953
14992
  message.answerType = (_g = object.answerType) !== null && _g !== void 0 ? _g : 0;
14954
14993
  message.additional = ((_h = object.additional) === null || _h === void 0 ? void 0 : _h.map((e) => exports.AdditionalInformation.fromPartial(e))) || [];
14994
+ message.concox = (object.concox !== undefined && object.concox !== null)
14995
+ ? exports.ReplyConcox.fromPartial(object.concox)
14996
+ : undefined;
14997
+ message.teltonika = (object.teltonika !== undefined && object.teltonika !== null)
14998
+ ? exports.ReplyTeltonika.fromPartial(object.teltonika)
14999
+ : undefined;
15000
+ message.stream = (object.stream !== undefined && object.stream !== null)
15001
+ ? exports.Stream.fromPartial(object.stream)
15002
+ : undefined;
15003
+ return message;
15004
+ },
15005
+ };
15006
+ function createBaseStream() {
15007
+ return { dataLength: 0, payload: new Uint8Array(0) };
15008
+ }
15009
+ exports.Stream = {
15010
+ encode(message, writer = new wire_1.BinaryWriter()) {
15011
+ if (message.dataLength !== 0) {
15012
+ writer.uint32(8).uint32(message.dataLength);
15013
+ }
15014
+ if (message.payload.length !== 0) {
15015
+ writer.uint32(18).bytes(message.payload);
15016
+ }
15017
+ return writer;
15018
+ },
15019
+ decode(input, length) {
15020
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
15021
+ let end = length === undefined ? reader.len : reader.pos + length;
15022
+ const message = createBaseStream();
15023
+ while (reader.pos < end) {
15024
+ const tag = reader.uint32();
15025
+ switch (tag >>> 3) {
15026
+ case 1: {
15027
+ if (tag !== 8) {
15028
+ break;
15029
+ }
15030
+ message.dataLength = reader.uint32();
15031
+ continue;
15032
+ }
15033
+ case 2: {
15034
+ if (tag !== 18) {
15035
+ break;
15036
+ }
15037
+ message.payload = reader.bytes();
15038
+ continue;
15039
+ }
15040
+ }
15041
+ if ((tag & 7) === 4 || tag === 0) {
15042
+ break;
15043
+ }
15044
+ reader.skip(tag & 7);
15045
+ }
15046
+ return message;
15047
+ },
15048
+ fromJSON(object) {
15049
+ return {
15050
+ dataLength: isSet(object.data_length) ? globalThis.Number(object.data_length) : 0,
15051
+ payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0),
15052
+ };
15053
+ },
15054
+ toJSON(message) {
15055
+ const obj = {};
15056
+ if (message.dataLength !== 0) {
15057
+ obj.data_length = Math.round(message.dataLength);
15058
+ }
15059
+ if (message.payload.length !== 0) {
15060
+ obj.payload = base64FromBytes(message.payload);
15061
+ }
15062
+ return obj;
15063
+ },
15064
+ create(base) {
15065
+ return exports.Stream.fromPartial(base !== null && base !== void 0 ? base : {});
15066
+ },
15067
+ fromPartial(object) {
15068
+ var _a, _b;
15069
+ const message = createBaseStream();
15070
+ message.dataLength = (_a = object.dataLength) !== null && _a !== void 0 ? _a : 0;
15071
+ message.payload = (_b = object.payload) !== null && _b !== void 0 ? _b : new Uint8Array(0);
15072
+ return message;
15073
+ },
15074
+ };
15075
+ function createBaseReplyConcox() {
15076
+ return { serverFlagBit: 0, content: "" };
15077
+ }
15078
+ exports.ReplyConcox = {
15079
+ encode(message, writer = new wire_1.BinaryWriter()) {
15080
+ if (message.serverFlagBit !== 0) {
15081
+ writer.uint32(8).uint32(message.serverFlagBit);
15082
+ }
15083
+ if (message.content !== "") {
15084
+ writer.uint32(18).string(message.content);
15085
+ }
15086
+ return writer;
15087
+ },
15088
+ decode(input, length) {
15089
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
15090
+ let end = length === undefined ? reader.len : reader.pos + length;
15091
+ const message = createBaseReplyConcox();
15092
+ while (reader.pos < end) {
15093
+ const tag = reader.uint32();
15094
+ switch (tag >>> 3) {
15095
+ case 1: {
15096
+ if (tag !== 8) {
15097
+ break;
15098
+ }
15099
+ message.serverFlagBit = reader.uint32();
15100
+ continue;
15101
+ }
15102
+ case 2: {
15103
+ if (tag !== 18) {
15104
+ break;
15105
+ }
15106
+ message.content = reader.string();
15107
+ continue;
15108
+ }
15109
+ }
15110
+ if ((tag & 7) === 4 || tag === 0) {
15111
+ break;
15112
+ }
15113
+ reader.skip(tag & 7);
15114
+ }
15115
+ return message;
15116
+ },
15117
+ fromJSON(object) {
15118
+ return {
15119
+ serverFlagBit: isSet(object.server_flag_bit) ? globalThis.Number(object.server_flag_bit) : 0,
15120
+ content: isSet(object.content) ? globalThis.String(object.content) : "",
15121
+ };
15122
+ },
15123
+ toJSON(message) {
15124
+ const obj = {};
15125
+ if (message.serverFlagBit !== 0) {
15126
+ obj.server_flag_bit = Math.round(message.serverFlagBit);
15127
+ }
15128
+ if (message.content !== "") {
15129
+ obj.content = message.content;
15130
+ }
15131
+ return obj;
15132
+ },
15133
+ create(base) {
15134
+ return exports.ReplyConcox.fromPartial(base !== null && base !== void 0 ? base : {});
15135
+ },
15136
+ fromPartial(object) {
15137
+ var _a, _b;
15138
+ const message = createBaseReplyConcox();
15139
+ message.serverFlagBit = (_a = object.serverFlagBit) !== null && _a !== void 0 ? _a : 0;
15140
+ message.content = (_b = object.content) !== null && _b !== void 0 ? _b : "";
15141
+ return message;
15142
+ },
15143
+ };
15144
+ function createBaseReplyTeltonika() {
15145
+ return { quantity1: 0, type: 0, responseSize: 0, response: new Uint8Array(0), quantity2: 0 };
15146
+ }
15147
+ exports.ReplyTeltonika = {
15148
+ encode(message, writer = new wire_1.BinaryWriter()) {
15149
+ if (message.quantity1 !== 0) {
15150
+ writer.uint32(8).uint32(message.quantity1);
15151
+ }
15152
+ if (message.type !== 0) {
15153
+ writer.uint32(16).uint32(message.type);
15154
+ }
15155
+ if (message.responseSize !== 0) {
15156
+ writer.uint32(24).uint32(message.responseSize);
15157
+ }
15158
+ if (message.response.length !== 0) {
15159
+ writer.uint32(34).bytes(message.response);
15160
+ }
15161
+ if (message.quantity2 !== 0) {
15162
+ writer.uint32(40).uint32(message.quantity2);
15163
+ }
15164
+ return writer;
15165
+ },
15166
+ decode(input, length) {
15167
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
15168
+ let end = length === undefined ? reader.len : reader.pos + length;
15169
+ const message = createBaseReplyTeltonika();
15170
+ while (reader.pos < end) {
15171
+ const tag = reader.uint32();
15172
+ switch (tag >>> 3) {
15173
+ case 1: {
15174
+ if (tag !== 8) {
15175
+ break;
15176
+ }
15177
+ message.quantity1 = reader.uint32();
15178
+ continue;
15179
+ }
15180
+ case 2: {
15181
+ if (tag !== 16) {
15182
+ break;
15183
+ }
15184
+ message.type = reader.uint32();
15185
+ continue;
15186
+ }
15187
+ case 3: {
15188
+ if (tag !== 24) {
15189
+ break;
15190
+ }
15191
+ message.responseSize = reader.uint32();
15192
+ continue;
15193
+ }
15194
+ case 4: {
15195
+ if (tag !== 34) {
15196
+ break;
15197
+ }
15198
+ message.response = reader.bytes();
15199
+ continue;
15200
+ }
15201
+ case 5: {
15202
+ if (tag !== 40) {
15203
+ break;
15204
+ }
15205
+ message.quantity2 = reader.uint32();
15206
+ continue;
15207
+ }
15208
+ }
15209
+ if ((tag & 7) === 4 || tag === 0) {
15210
+ break;
15211
+ }
15212
+ reader.skip(tag & 7);
15213
+ }
15214
+ return message;
15215
+ },
15216
+ fromJSON(object) {
15217
+ return {
15218
+ quantity1: isSet(object.quantity_1) ? globalThis.Number(object.quantity_1) : 0,
15219
+ type: isSet(object.type) ? globalThis.Number(object.type) : 0,
15220
+ responseSize: isSet(object.response_size) ? globalThis.Number(object.response_size) : 0,
15221
+ response: isSet(object.response) ? bytesFromBase64(object.response) : new Uint8Array(0),
15222
+ quantity2: isSet(object.quantity_2) ? globalThis.Number(object.quantity_2) : 0,
15223
+ };
15224
+ },
15225
+ toJSON(message) {
15226
+ const obj = {};
15227
+ if (message.quantity1 !== 0) {
15228
+ obj.quantity_1 = Math.round(message.quantity1);
15229
+ }
15230
+ if (message.type !== 0) {
15231
+ obj.type = Math.round(message.type);
15232
+ }
15233
+ if (message.responseSize !== 0) {
15234
+ obj.response_size = Math.round(message.responseSize);
15235
+ }
15236
+ if (message.response.length !== 0) {
15237
+ obj.response = base64FromBytes(message.response);
15238
+ }
15239
+ if (message.quantity2 !== 0) {
15240
+ obj.quantity_2 = Math.round(message.quantity2);
15241
+ }
15242
+ return obj;
15243
+ },
15244
+ create(base) {
15245
+ return exports.ReplyTeltonika.fromPartial(base !== null && base !== void 0 ? base : {});
15246
+ },
15247
+ fromPartial(object) {
15248
+ var _a, _b, _c, _d, _e;
15249
+ const message = createBaseReplyTeltonika();
15250
+ message.quantity1 = (_a = object.quantity1) !== null && _a !== void 0 ? _a : 0;
15251
+ message.type = (_b = object.type) !== null && _b !== void 0 ? _b : 0;
15252
+ message.responseSize = (_c = object.responseSize) !== null && _c !== void 0 ? _c : 0;
15253
+ message.response = (_d = object.response) !== null && _d !== void 0 ? _d : new Uint8Array(0);
15254
+ message.quantity2 = (_e = object.quantity2) !== null && _e !== void 0 ? _e : 0;
14955
15255
  return message;
14956
15256
  },
14957
15257
  };
@@ -15829,90 +16129,6 @@ exports.ConcoxLikeR31 = {
15829
16129
  return message;
15830
16130
  },
15831
16131
  };
15832
- function createBaseConcox() {
15833
- return { serverFlag: 0, contentCode: 0, content: "" };
15834
- }
15835
- exports.Concox = {
15836
- encode(message, writer = new wire_1.BinaryWriter()) {
15837
- if (message.serverFlag !== 0) {
15838
- writer.uint32(8).uint32(message.serverFlag);
15839
- }
15840
- if (message.contentCode !== 0) {
15841
- writer.uint32(16).uint32(message.contentCode);
15842
- }
15843
- if (message.content !== "") {
15844
- writer.uint32(26).string(message.content);
15845
- }
15846
- return writer;
15847
- },
15848
- decode(input, length) {
15849
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
15850
- let end = length === undefined ? reader.len : reader.pos + length;
15851
- const message = createBaseConcox();
15852
- while (reader.pos < end) {
15853
- const tag = reader.uint32();
15854
- switch (tag >>> 3) {
15855
- case 1: {
15856
- if (tag !== 8) {
15857
- break;
15858
- }
15859
- message.serverFlag = reader.uint32();
15860
- continue;
15861
- }
15862
- case 2: {
15863
- if (tag !== 16) {
15864
- break;
15865
- }
15866
- message.contentCode = reader.uint32();
15867
- continue;
15868
- }
15869
- case 3: {
15870
- if (tag !== 26) {
15871
- break;
15872
- }
15873
- message.content = reader.string();
15874
- continue;
15875
- }
15876
- }
15877
- if ((tag & 7) === 4 || tag === 0) {
15878
- break;
15879
- }
15880
- reader.skip(tag & 7);
15881
- }
15882
- return message;
15883
- },
15884
- fromJSON(object) {
15885
- return {
15886
- serverFlag: isSet(object.serverFlag) ? globalThis.Number(object.serverFlag) : 0,
15887
- contentCode: isSet(object.contentCode) ? globalThis.Number(object.contentCode) : 0,
15888
- content: isSet(object.content) ? globalThis.String(object.content) : "",
15889
- };
15890
- },
15891
- toJSON(message) {
15892
- const obj = {};
15893
- if (message.serverFlag !== 0) {
15894
- obj.serverFlag = Math.round(message.serverFlag);
15895
- }
15896
- if (message.contentCode !== 0) {
15897
- obj.contentCode = Math.round(message.contentCode);
15898
- }
15899
- if (message.content !== "") {
15900
- obj.content = message.content;
15901
- }
15902
- return obj;
15903
- },
15904
- create(base) {
15905
- return exports.Concox.fromPartial(base !== null && base !== void 0 ? base : {});
15906
- },
15907
- fromPartial(object) {
15908
- var _a, _b, _c;
15909
- const message = createBaseConcox();
15910
- message.serverFlag = (_a = object.serverFlag) !== null && _a !== void 0 ? _a : 0;
15911
- message.contentCode = (_b = object.contentCode) !== null && _b !== void 0 ? _b : 0;
15912
- message.content = (_c = object.content) !== null && _c !== void 0 ? _c : "";
15913
- return message;
15914
- },
15915
- };
15916
16132
  function createBaseConcoxRecording0x8d() {
15917
16133
  return { fileType: 0, fileSize: 0, totalFiles: 0, currentSequence: 0, currentLength: 0, payload: new Uint8Array(0) };
15918
16134
  }
@@ -16941,7 +17157,7 @@ exports.Task_AlertIdNumberEntry = {
16941
17157
  },
16942
17158
  };
16943
17159
  function createBaseDeviceStatus() {
16944
- return { deviceId: 0, imei: 0, data: undefined, client: undefined, online: false, lastOnline: undefined };
17160
+ return { deviceId: 0, imei: 0, data: undefined, client: undefined, online: false, lastOnline: undefined, logs: [] };
16945
17161
  }
16946
17162
  exports.DeviceStatus = {
16947
17163
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -16963,6 +17179,9 @@ exports.DeviceStatus = {
16963
17179
  if (message.lastOnline !== undefined) {
16964
17180
  timestamp_1.Timestamp.encode(toTimestamp(message.lastOnline), writer.uint32(50).fork()).join();
16965
17181
  }
17182
+ for (const v of message.logs) {
17183
+ exports.Log.encode(v, writer.uint32(58).fork()).join();
17184
+ }
16966
17185
  return writer;
16967
17186
  },
16968
17187
  decode(input, length) {
@@ -17014,6 +17233,13 @@ exports.DeviceStatus = {
17014
17233
  message.lastOnline = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
17015
17234
  continue;
17016
17235
  }
17236
+ case 7: {
17237
+ if (tag !== 58) {
17238
+ break;
17239
+ }
17240
+ message.logs.push(exports.Log.decode(reader, reader.uint32()));
17241
+ continue;
17242
+ }
17017
17243
  }
17018
17244
  if ((tag & 7) === 4 || tag === 0) {
17019
17245
  break;
@@ -17030,9 +17256,11 @@ exports.DeviceStatus = {
17030
17256
  client: isSet(object.client) ? exports.Client.fromJSON(object.client) : undefined,
17031
17257
  online: isSet(object.online) ? globalThis.Boolean(object.online) : false,
17032
17258
  lastOnline: isSet(object.last_online) ? fromJsonTimestamp(object.last_online) : undefined,
17259
+ logs: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.logs) ? object.logs.map((e) => exports.Log.fromJSON(e)) : [],
17033
17260
  };
17034
17261
  },
17035
17262
  toJSON(message) {
17263
+ var _a;
17036
17264
  const obj = {};
17037
17265
  if (message.deviceId !== 0) {
17038
17266
  obj.device_id = Math.round(message.deviceId);
@@ -17052,13 +17280,16 @@ exports.DeviceStatus = {
17052
17280
  if (message.lastOnline !== undefined) {
17053
17281
  obj.last_online = message.lastOnline.toISOString();
17054
17282
  }
17283
+ if ((_a = message.logs) === null || _a === void 0 ? void 0 : _a.length) {
17284
+ obj.logs = message.logs.map((e) => exports.Log.toJSON(e));
17285
+ }
17055
17286
  return obj;
17056
17287
  },
17057
17288
  create(base) {
17058
17289
  return exports.DeviceStatus.fromPartial(base !== null && base !== void 0 ? base : {});
17059
17290
  },
17060
17291
  fromPartial(object) {
17061
- var _a, _b, _c, _d;
17292
+ var _a, _b, _c, _d, _e;
17062
17293
  const message = createBaseDeviceStatus();
17063
17294
  message.deviceId = (_a = object.deviceId) !== null && _a !== void 0 ? _a : 0;
17064
17295
  message.imei = (_b = object.imei) !== null && _b !== void 0 ? _b : 0;
@@ -17068,6 +17299,7 @@ exports.DeviceStatus = {
17068
17299
  : undefined;
17069
17300
  message.online = (_c = object.online) !== null && _c !== void 0 ? _c : false;
17070
17301
  message.lastOnline = (_d = object.lastOnline) !== null && _d !== void 0 ? _d : undefined;
17302
+ message.logs = ((_e = object.logs) === null || _e === void 0 ? void 0 : _e.map((e) => exports.Log.fromPartial(e))) || [];
17071
17303
  return message;
17072
17304
  },
17073
17305
  };
@@ -1,35 +1,38 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  export declare const protobufPackage = "com.fatehan.packets";
3
- export interface DeviceCommand {
4
- command: string;
5
- }
6
- export interface DeviceCommandAkn {
7
- status: DeviceCommandAkn_Status;
8
- code?: number | undefined;
9
- message?: string | undefined;
10
- }
11
- export declare enum DeviceCommandAkn_Status {
12
- OFFLINE = 0,
13
- SENT = 1,
3
+ export declare enum CommandStatus {
4
+ PENDING = 0,
5
+ OFFLINE = 1,
14
6
  ERROR = 2,
7
+ SENT = 3,
15
8
  UNRECOGNIZED = -1
16
9
  }
17
- export declare function deviceCommandAkn_StatusFromJSON(object: any): DeviceCommandAkn_Status;
18
- export declare function deviceCommandAkn_StatusToJSON(object: DeviceCommandAkn_Status): string;
19
- export interface DeviceAnswer {
20
- answer: string;
10
+ export declare function commandStatusFromJSON(object: any): CommandStatus;
11
+ export declare function commandStatusToJSON(object: CommandStatus): string;
12
+ export interface CommandContent {
13
+ commandId: number;
14
+ message?: string | undefined;
15
+ params: string[];
16
+ }
17
+ export interface CommandAkn {
18
+ code: number;
19
+ message: string;
21
20
  }
22
- export interface DeviceMessage {
21
+ export interface Command {
22
+ id: number;
23
23
  deviceId: number;
24
- transactionId: number;
25
- command?: DeviceCommand | undefined;
26
- akn?: DeviceCommandAkn | undefined;
27
- answer?: DeviceAnswer | undefined;
24
+ userId: number;
25
+ commandId: number;
26
+ replyId: number;
27
+ status: CommandStatus;
28
+ command: CommandContent | undefined;
29
+ akn: CommandAkn | undefined;
30
+ createdAt: Date | undefined;
31
+ updatedAt: Date | undefined;
28
32
  }
29
- export declare const DeviceCommand: MessageFns<DeviceCommand>;
30
- export declare const DeviceCommandAkn: MessageFns<DeviceCommandAkn>;
31
- export declare const DeviceAnswer: MessageFns<DeviceAnswer>;
32
- export declare const DeviceMessage: MessageFns<DeviceMessage>;
33
+ export declare const CommandContent: MessageFns<CommandContent>;
34
+ export declare const CommandAkn: MessageFns<CommandAkn>;
35
+ export declare const Command: MessageFns<Command>;
33
36
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
34
37
  export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
35
38
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/fatehan/packets/messages.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAErE,eAAO,MAAM,eAAe,wBAAwB,CAAC;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