@fatehan/tsrp 1.5.3 → 1.5.4

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 (76) hide show
  1. package/dist/fatehan/activities/workflow.d.ts +8 -0
  2. package/dist/fatehan/activities/workflow.d.ts.map +1 -1
  3. package/dist/fatehan/activities/workflow.js +66 -3
  4. package/dist/fatehan/apis/client.d.ts +1 -1
  5. package/dist/fatehan/apis/client.js +3 -3
  6. package/dist/fatehan/areas/area.js +2 -2
  7. package/dist/fatehan/devices/devices.js +2 -2
  8. package/dist/fatehan/devices/maintenance.js +2 -2
  9. package/dist/fatehan/financial/financial.js +2 -2
  10. package/dist/fatehan/google/protobuf/descriptor.d.ts +470 -39
  11. package/dist/fatehan/google/protobuf/descriptor.d.ts.map +1 -1
  12. package/dist/fatehan/google/protobuf/descriptor.js +1070 -57
  13. package/dist/fatehan/google/protobuf/duration.js +2 -2
  14. package/dist/fatehan/google/protobuf/field_mask.d.ts +16 -18
  15. package/dist/fatehan/google/protobuf/field_mask.d.ts.map +1 -1
  16. package/dist/fatehan/google/protobuf/field_mask.js +2 -2
  17. package/dist/fatehan/google/protobuf/timestamp.d.ts +10 -9
  18. package/dist/fatehan/google/protobuf/timestamp.d.ts.map +1 -1
  19. package/dist/fatehan/google/protobuf/timestamp.js +2 -2
  20. package/dist/fatehan/identities/authentication.d.ts +82 -6
  21. package/dist/fatehan/identities/authentication.d.ts.map +1 -1
  22. package/dist/fatehan/identities/authentication.js +575 -47
  23. package/dist/fatehan/identities/identities.d.ts +13 -1
  24. package/dist/fatehan/identities/identities.d.ts.map +1 -1
  25. package/dist/fatehan/identities/identities.js +15 -3
  26. package/dist/fatehan/models/fusion.js +2 -2
  27. package/dist/fatehan/models/models.js +2 -2
  28. package/dist/fatehan/notifies/notify.js +2 -2
  29. package/dist/fatehan/packets/{messages.d.ts → commands.d.ts} +58 -1
  30. package/dist/fatehan/packets/commands.d.ts.map +1 -0
  31. package/dist/fatehan/packets/{messages.js → commands.js} +588 -3
  32. package/dist/fatehan/packets/dataModel.d.ts +188 -127
  33. package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
  34. package/dist/fatehan/packets/dataModel.js +1641 -1005
  35. package/dist/fatehan/packets/dataModule.js +2 -2
  36. package/dist/fatehan/packets/forge.d.ts +117 -0
  37. package/dist/fatehan/packets/forge.d.ts.map +1 -0
  38. package/dist/fatehan/packets/forge.js +1079 -0
  39. package/dist/fatehan/services/api.d.ts +812 -26
  40. package/dist/fatehan/services/api.d.ts.map +1 -1
  41. package/dist/fatehan/services/api.js +8438 -244
  42. package/dist/fatehan/services/repositories.js +2 -2
  43. package/dist/fatehan/stream/stream.d.ts +224 -0
  44. package/dist/fatehan/stream/stream.d.ts.map +1 -0
  45. package/dist/fatehan/stream/stream.js +1416 -0
  46. package/dist/fatehan/trips/trip.d.ts +159 -159
  47. package/dist/fatehan/trips/trip.d.ts.map +1 -1
  48. package/dist/fatehan/trips/trip.js +169 -169
  49. package/dist/fatehan/utils/buf/validate/validate.js +2 -2
  50. package/dist/services.d.ts +65 -0
  51. package/dist/services.d.ts.map +1 -0
  52. package/dist/services.js +205 -0
  53. package/package.json +12 -12
  54. package/dist/api.d.ts +0 -36
  55. package/dist/api.d.ts.map +0 -1
  56. package/dist/api.js +0 -146
  57. package/dist/fatehan/activities/camera.d.ts +0 -95
  58. package/dist/fatehan/activities/camera.d.ts.map +0 -1
  59. package/dist/fatehan/activities/camera.js +0 -811
  60. package/dist/fatehan/google/protobuf/any.d.ts +0 -146
  61. package/dist/fatehan/google/protobuf/any.d.ts.map +0 -1
  62. package/dist/fatehan/google/protobuf/any.js +0 -104
  63. package/dist/fatehan/google/status.d.ts +0 -53
  64. package/dist/fatehan/google/status.d.ts.map +0 -1
  65. package/dist/fatehan/google/status.js +0 -95
  66. package/dist/fatehan/packets/messages.d.ts.map +0 -1
  67. package/dist/fatehan/reports/report.d.ts +0 -830
  68. package/dist/fatehan/reports/report.d.ts.map +0 -1
  69. package/dist/fatehan/reports/report.js +0 -8380
  70. package/dist/index.d.ts +0 -2
  71. package/dist/index.d.ts.map +0 -1
  72. package/dist/index.js +0 -1
  73. package/dist/report.d.ts +0 -29
  74. package/dist/report.d.ts.map +0 -1
  75. package/dist/report.js +0 -139
  76. package/readme.md +0 -26
@@ -1,8 +1,8 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.10.1
4
- // protoc v3.21.12
5
- // source: packets/messages.proto
3
+ // protoc-gen-ts_proto v2.11.6
4
+ // protoc v7.34.1
5
+ // source: packets/commands.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
8
  import Long from "long";
@@ -16,6 +16,14 @@ export var CommandStatus;
16
16
  CommandStatus[CommandStatus["SENT"] = 3] = "SENT";
17
17
  CommandStatus[CommandStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
18
18
  })(CommandStatus || (CommandStatus = {}));
19
+ export var GroupCommandState;
20
+ (function (GroupCommandState) {
21
+ GroupCommandState[GroupCommandState["QUEUED"] = 0] = "QUEUED";
22
+ GroupCommandState[GroupCommandState["SENDING"] = 1] = "SENDING";
23
+ GroupCommandState[GroupCommandState["FINISHED"] = 2] = "FINISHED";
24
+ GroupCommandState[GroupCommandState["STOPPED"] = 3] = "STOPPED";
25
+ GroupCommandState[GroupCommandState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
26
+ })(GroupCommandState || (GroupCommandState = {}));
19
27
  function createBaseCommandContent() {
20
28
  return { deviceId: Long.UZERO, commandId: undefined, message: undefined, params: [], rawCommand: undefined };
21
29
  }
@@ -164,6 +172,7 @@ function createBaseCommand() {
164
172
  userId: undefined,
165
173
  commandId: undefined,
166
174
  replyId: undefined,
175
+ groupCommandId: undefined,
167
176
  status: 0,
168
177
  command: undefined,
169
178
  akn: undefined,
@@ -188,6 +197,9 @@ export const Command = {
188
197
  if (message.replyId !== undefined) {
189
198
  writer.uint32(40).uint64(message.replyId.toString());
190
199
  }
200
+ if (message.groupCommandId !== undefined) {
201
+ writer.uint32(88).uint64(message.groupCommandId.toString());
202
+ }
191
203
  if (message.status !== 0) {
192
204
  writer.uint32(48).int32(message.status);
193
205
  }
@@ -247,6 +259,13 @@ export const Command = {
247
259
  message.replyId = Long.fromString(reader.uint64().toString(), true);
248
260
  continue;
249
261
  }
262
+ case 11: {
263
+ if (tag !== 88) {
264
+ break;
265
+ }
266
+ message.groupCommandId = Long.fromString(reader.uint64().toString(), true);
267
+ continue;
268
+ }
250
269
  case 6: {
251
270
  if (tag !== 48) {
252
271
  break;
@@ -308,6 +327,9 @@ export const Command = {
308
327
  message.replyId = (object.replyId !== undefined && object.replyId !== null)
309
328
  ? Long.fromValue(object.replyId)
310
329
  : undefined;
330
+ message.groupCommandId = (object.groupCommandId !== undefined && object.groupCommandId !== null)
331
+ ? Long.fromValue(object.groupCommandId)
332
+ : undefined;
311
333
  message.status = object.status ?? 0;
312
334
  message.command = (object.command !== undefined && object.command !== null)
313
335
  ? CommandContent.fromPartial(object.command)
@@ -764,6 +786,569 @@ export const DevicePoolRequest = {
764
786
  return message;
765
787
  },
766
788
  };
789
+ function createBaseGroupCommandCreateRequest() {
790
+ return { commandId: Long.UZERO, rawCommand: "", trackerId: Long.UZERO, organizationId: Long.UZERO, deviceIds: [] };
791
+ }
792
+ export const GroupCommandCreateRequest = {
793
+ encode(message, writer = new BinaryWriter()) {
794
+ if (!message.commandId.equals(Long.UZERO)) {
795
+ writer.uint32(8).uint64(message.commandId.toString());
796
+ }
797
+ if (message.rawCommand !== "") {
798
+ writer.uint32(18).string(message.rawCommand);
799
+ }
800
+ if (!message.trackerId.equals(Long.UZERO)) {
801
+ writer.uint32(24).uint64(message.trackerId.toString());
802
+ }
803
+ if (!message.organizationId.equals(Long.UZERO)) {
804
+ writer.uint32(32).uint64(message.organizationId.toString());
805
+ }
806
+ writer.uint32(42).fork();
807
+ for (const v of message.deviceIds) {
808
+ writer.uint64(v.toString());
809
+ }
810
+ writer.join();
811
+ return writer;
812
+ },
813
+ decode(input, length) {
814
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
815
+ const end = length === undefined ? reader.len : reader.pos + length;
816
+ const message = createBaseGroupCommandCreateRequest();
817
+ while (reader.pos < end) {
818
+ const tag = reader.uint32();
819
+ switch (tag >>> 3) {
820
+ case 1: {
821
+ if (tag !== 8) {
822
+ break;
823
+ }
824
+ message.commandId = Long.fromString(reader.uint64().toString(), true);
825
+ continue;
826
+ }
827
+ case 2: {
828
+ if (tag !== 18) {
829
+ break;
830
+ }
831
+ message.rawCommand = reader.string();
832
+ continue;
833
+ }
834
+ case 3: {
835
+ if (tag !== 24) {
836
+ break;
837
+ }
838
+ message.trackerId = Long.fromString(reader.uint64().toString(), true);
839
+ continue;
840
+ }
841
+ case 4: {
842
+ if (tag !== 32) {
843
+ break;
844
+ }
845
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
846
+ continue;
847
+ }
848
+ case 5: {
849
+ if (tag === 40) {
850
+ message.deviceIds.push(Long.fromString(reader.uint64().toString(), true));
851
+ continue;
852
+ }
853
+ if (tag === 42) {
854
+ const end2 = reader.uint32() + reader.pos;
855
+ while (reader.pos < end2) {
856
+ message.deviceIds.push(Long.fromString(reader.uint64().toString(), true));
857
+ }
858
+ continue;
859
+ }
860
+ break;
861
+ }
862
+ }
863
+ if ((tag & 7) === 4 || tag === 0) {
864
+ break;
865
+ }
866
+ reader.skip(tag & 7);
867
+ }
868
+ return message;
869
+ },
870
+ create(base) {
871
+ return GroupCommandCreateRequest.fromPartial(base ?? {});
872
+ },
873
+ fromPartial(object) {
874
+ const message = createBaseGroupCommandCreateRequest();
875
+ message.commandId = (object.commandId !== undefined && object.commandId !== null)
876
+ ? Long.fromValue(object.commandId)
877
+ : Long.UZERO;
878
+ message.rawCommand = object.rawCommand ?? "";
879
+ message.trackerId = (object.trackerId !== undefined && object.trackerId !== null)
880
+ ? Long.fromValue(object.trackerId)
881
+ : Long.UZERO;
882
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
883
+ ? Long.fromValue(object.organizationId)
884
+ : Long.UZERO;
885
+ message.deviceIds = object.deviceIds?.map((e) => Long.fromValue(e)) || [];
886
+ return message;
887
+ },
888
+ };
889
+ function createBaseGroupCommand() {
890
+ return {
891
+ id: Long.UZERO,
892
+ commandId: Long.UZERO,
893
+ organizationId: Long.UZERO,
894
+ trackerId: Long.UZERO,
895
+ createdBy: Long.UZERO,
896
+ rawCommand: "",
897
+ queries: undefined,
898
+ state: 0,
899
+ startedAt: undefined,
900
+ finishedAt: undefined,
901
+ createdAt: undefined,
902
+ updatedAt: undefined,
903
+ };
904
+ }
905
+ export const GroupCommand = {
906
+ encode(message, writer = new BinaryWriter()) {
907
+ if (!message.id.equals(Long.UZERO)) {
908
+ writer.uint32(8).uint64(message.id.toString());
909
+ }
910
+ if (!message.commandId.equals(Long.UZERO)) {
911
+ writer.uint32(16).uint64(message.commandId.toString());
912
+ }
913
+ if (!message.organizationId.equals(Long.UZERO)) {
914
+ writer.uint32(24).uint64(message.organizationId.toString());
915
+ }
916
+ if (!message.trackerId.equals(Long.UZERO)) {
917
+ writer.uint32(32).uint64(message.trackerId.toString());
918
+ }
919
+ if (!message.createdBy.equals(Long.UZERO)) {
920
+ writer.uint32(40).uint64(message.createdBy.toString());
921
+ }
922
+ if (message.rawCommand !== "") {
923
+ writer.uint32(50).string(message.rawCommand);
924
+ }
925
+ if (message.queries !== undefined) {
926
+ GroupCommand_Queries.encode(message.queries, writer.uint32(58).fork()).join();
927
+ }
928
+ if (message.state !== 0) {
929
+ writer.uint32(64).int32(message.state);
930
+ }
931
+ if (message.startedAt !== undefined) {
932
+ Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(74).fork()).join();
933
+ }
934
+ if (message.finishedAt !== undefined) {
935
+ Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(82).fork()).join();
936
+ }
937
+ if (message.createdAt !== undefined) {
938
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(90).fork()).join();
939
+ }
940
+ if (message.updatedAt !== undefined) {
941
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(98).fork()).join();
942
+ }
943
+ return writer;
944
+ },
945
+ decode(input, length) {
946
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
947
+ const end = length === undefined ? reader.len : reader.pos + length;
948
+ const message = createBaseGroupCommand();
949
+ while (reader.pos < end) {
950
+ const tag = reader.uint32();
951
+ switch (tag >>> 3) {
952
+ case 1: {
953
+ if (tag !== 8) {
954
+ break;
955
+ }
956
+ message.id = Long.fromString(reader.uint64().toString(), true);
957
+ continue;
958
+ }
959
+ case 2: {
960
+ if (tag !== 16) {
961
+ break;
962
+ }
963
+ message.commandId = Long.fromString(reader.uint64().toString(), true);
964
+ continue;
965
+ }
966
+ case 3: {
967
+ if (tag !== 24) {
968
+ break;
969
+ }
970
+ message.organizationId = Long.fromString(reader.uint64().toString(), true);
971
+ continue;
972
+ }
973
+ case 4: {
974
+ if (tag !== 32) {
975
+ break;
976
+ }
977
+ message.trackerId = Long.fromString(reader.uint64().toString(), true);
978
+ continue;
979
+ }
980
+ case 5: {
981
+ if (tag !== 40) {
982
+ break;
983
+ }
984
+ message.createdBy = Long.fromString(reader.uint64().toString(), true);
985
+ continue;
986
+ }
987
+ case 6: {
988
+ if (tag !== 50) {
989
+ break;
990
+ }
991
+ message.rawCommand = reader.string();
992
+ continue;
993
+ }
994
+ case 7: {
995
+ if (tag !== 58) {
996
+ break;
997
+ }
998
+ message.queries = GroupCommand_Queries.decode(reader, reader.uint32());
999
+ continue;
1000
+ }
1001
+ case 8: {
1002
+ if (tag !== 64) {
1003
+ break;
1004
+ }
1005
+ message.state = reader.int32();
1006
+ continue;
1007
+ }
1008
+ case 9: {
1009
+ if (tag !== 74) {
1010
+ break;
1011
+ }
1012
+ message.startedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1013
+ continue;
1014
+ }
1015
+ case 10: {
1016
+ if (tag !== 82) {
1017
+ break;
1018
+ }
1019
+ message.finishedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1020
+ continue;
1021
+ }
1022
+ case 11: {
1023
+ if (tag !== 90) {
1024
+ break;
1025
+ }
1026
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1027
+ continue;
1028
+ }
1029
+ case 12: {
1030
+ if (tag !== 98) {
1031
+ break;
1032
+ }
1033
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1034
+ continue;
1035
+ }
1036
+ }
1037
+ if ((tag & 7) === 4 || tag === 0) {
1038
+ break;
1039
+ }
1040
+ reader.skip(tag & 7);
1041
+ }
1042
+ return message;
1043
+ },
1044
+ create(base) {
1045
+ return GroupCommand.fromPartial(base ?? {});
1046
+ },
1047
+ fromPartial(object) {
1048
+ const message = createBaseGroupCommand();
1049
+ message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
1050
+ message.commandId = (object.commandId !== undefined && object.commandId !== null)
1051
+ ? Long.fromValue(object.commandId)
1052
+ : Long.UZERO;
1053
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
1054
+ ? Long.fromValue(object.organizationId)
1055
+ : Long.UZERO;
1056
+ message.trackerId = (object.trackerId !== undefined && object.trackerId !== null)
1057
+ ? Long.fromValue(object.trackerId)
1058
+ : Long.UZERO;
1059
+ message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
1060
+ ? Long.fromValue(object.createdBy)
1061
+ : Long.UZERO;
1062
+ message.rawCommand = object.rawCommand ?? "";
1063
+ message.queries = (object.queries !== undefined && object.queries !== null)
1064
+ ? GroupCommand_Queries.fromPartial(object.queries)
1065
+ : undefined;
1066
+ message.state = object.state ?? 0;
1067
+ message.startedAt = object.startedAt ?? undefined;
1068
+ message.finishedAt = object.finishedAt ?? undefined;
1069
+ message.createdAt = object.createdAt ?? undefined;
1070
+ message.updatedAt = object.updatedAt ?? undefined;
1071
+ return message;
1072
+ },
1073
+ };
1074
+ function createBaseGroupCommand_Queries() {
1075
+ return { request: undefined, organizationGeneration: "", trackerGeneration: "" };
1076
+ }
1077
+ export const GroupCommand_Queries = {
1078
+ encode(message, writer = new BinaryWriter()) {
1079
+ if (message.request !== undefined) {
1080
+ GroupCommandCreateRequest.encode(message.request, writer.uint32(10).fork()).join();
1081
+ }
1082
+ if (message.organizationGeneration !== "") {
1083
+ writer.uint32(18).string(message.organizationGeneration);
1084
+ }
1085
+ if (message.trackerGeneration !== "") {
1086
+ writer.uint32(26).string(message.trackerGeneration);
1087
+ }
1088
+ return writer;
1089
+ },
1090
+ decode(input, length) {
1091
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1092
+ const end = length === undefined ? reader.len : reader.pos + length;
1093
+ const message = createBaseGroupCommand_Queries();
1094
+ while (reader.pos < end) {
1095
+ const tag = reader.uint32();
1096
+ switch (tag >>> 3) {
1097
+ case 1: {
1098
+ if (tag !== 10) {
1099
+ break;
1100
+ }
1101
+ message.request = GroupCommandCreateRequest.decode(reader, reader.uint32());
1102
+ continue;
1103
+ }
1104
+ case 2: {
1105
+ if (tag !== 18) {
1106
+ break;
1107
+ }
1108
+ message.organizationGeneration = reader.string();
1109
+ continue;
1110
+ }
1111
+ case 3: {
1112
+ if (tag !== 26) {
1113
+ break;
1114
+ }
1115
+ message.trackerGeneration = reader.string();
1116
+ continue;
1117
+ }
1118
+ }
1119
+ if ((tag & 7) === 4 || tag === 0) {
1120
+ break;
1121
+ }
1122
+ reader.skip(tag & 7);
1123
+ }
1124
+ return message;
1125
+ },
1126
+ create(base) {
1127
+ return GroupCommand_Queries.fromPartial(base ?? {});
1128
+ },
1129
+ fromPartial(object) {
1130
+ const message = createBaseGroupCommand_Queries();
1131
+ message.request = (object.request !== undefined && object.request !== null)
1132
+ ? GroupCommandCreateRequest.fromPartial(object.request)
1133
+ : undefined;
1134
+ message.organizationGeneration = object.organizationGeneration ?? "";
1135
+ message.trackerGeneration = object.trackerGeneration ?? "";
1136
+ return message;
1137
+ },
1138
+ };
1139
+ function createBaseGroupCommandShowRequest() {
1140
+ return { groupCommandId: Long.UZERO };
1141
+ }
1142
+ export const GroupCommandShowRequest = {
1143
+ encode(message, writer = new BinaryWriter()) {
1144
+ if (!message.groupCommandId.equals(Long.UZERO)) {
1145
+ writer.uint32(8).uint64(message.groupCommandId.toString());
1146
+ }
1147
+ return writer;
1148
+ },
1149
+ decode(input, length) {
1150
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1151
+ const end = length === undefined ? reader.len : reader.pos + length;
1152
+ const message = createBaseGroupCommandShowRequest();
1153
+ while (reader.pos < end) {
1154
+ const tag = reader.uint32();
1155
+ switch (tag >>> 3) {
1156
+ case 1: {
1157
+ if (tag !== 8) {
1158
+ break;
1159
+ }
1160
+ message.groupCommandId = Long.fromString(reader.uint64().toString(), true);
1161
+ continue;
1162
+ }
1163
+ }
1164
+ if ((tag & 7) === 4 || tag === 0) {
1165
+ break;
1166
+ }
1167
+ reader.skip(tag & 7);
1168
+ }
1169
+ return message;
1170
+ },
1171
+ create(base) {
1172
+ return GroupCommandShowRequest.fromPartial(base ?? {});
1173
+ },
1174
+ fromPartial(object) {
1175
+ const message = createBaseGroupCommandShowRequest();
1176
+ message.groupCommandId = (object.groupCommandId !== undefined && object.groupCommandId !== null)
1177
+ ? Long.fromValue(object.groupCommandId)
1178
+ : Long.UZERO;
1179
+ return message;
1180
+ },
1181
+ };
1182
+ function createBaseGroupCommandListRequest() {
1183
+ return { organizationId: undefined, trackerId: undefined, createdBy: undefined, page: undefined, perPage: undefined };
1184
+ }
1185
+ export const GroupCommandListRequest = {
1186
+ encode(message, writer = new BinaryWriter()) {
1187
+ if (message.organizationId !== undefined) {
1188
+ writer.uint32(8).uint32(message.organizationId);
1189
+ }
1190
+ if (message.trackerId !== undefined) {
1191
+ writer.uint32(16).uint32(message.trackerId);
1192
+ }
1193
+ if (message.createdBy !== undefined) {
1194
+ writer.uint32(24).uint32(message.createdBy);
1195
+ }
1196
+ if (message.page !== undefined) {
1197
+ writer.uint32(32).uint32(message.page);
1198
+ }
1199
+ if (message.perPage !== undefined) {
1200
+ writer.uint32(40).uint32(message.perPage);
1201
+ }
1202
+ return writer;
1203
+ },
1204
+ decode(input, length) {
1205
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1206
+ const end = length === undefined ? reader.len : reader.pos + length;
1207
+ const message = createBaseGroupCommandListRequest();
1208
+ while (reader.pos < end) {
1209
+ const tag = reader.uint32();
1210
+ switch (tag >>> 3) {
1211
+ case 1: {
1212
+ if (tag !== 8) {
1213
+ break;
1214
+ }
1215
+ message.organizationId = reader.uint32();
1216
+ continue;
1217
+ }
1218
+ case 2: {
1219
+ if (tag !== 16) {
1220
+ break;
1221
+ }
1222
+ message.trackerId = reader.uint32();
1223
+ continue;
1224
+ }
1225
+ case 3: {
1226
+ if (tag !== 24) {
1227
+ break;
1228
+ }
1229
+ message.createdBy = reader.uint32();
1230
+ continue;
1231
+ }
1232
+ case 4: {
1233
+ if (tag !== 32) {
1234
+ break;
1235
+ }
1236
+ message.page = reader.uint32();
1237
+ continue;
1238
+ }
1239
+ case 5: {
1240
+ if (tag !== 40) {
1241
+ break;
1242
+ }
1243
+ message.perPage = reader.uint32();
1244
+ continue;
1245
+ }
1246
+ }
1247
+ if ((tag & 7) === 4 || tag === 0) {
1248
+ break;
1249
+ }
1250
+ reader.skip(tag & 7);
1251
+ }
1252
+ return message;
1253
+ },
1254
+ create(base) {
1255
+ return GroupCommandListRequest.fromPartial(base ?? {});
1256
+ },
1257
+ fromPartial(object) {
1258
+ const message = createBaseGroupCommandListRequest();
1259
+ message.organizationId = object.organizationId ?? undefined;
1260
+ message.trackerId = object.trackerId ?? undefined;
1261
+ message.createdBy = object.createdBy ?? undefined;
1262
+ message.page = object.page ?? undefined;
1263
+ message.perPage = object.perPage ?? undefined;
1264
+ return message;
1265
+ },
1266
+ };
1267
+ function createBaseGroupCommandListResponse() {
1268
+ return { total: 0, currentPage: 0, lastPage: 0, perPage: 0, commands: [] };
1269
+ }
1270
+ export const GroupCommandListResponse = {
1271
+ encode(message, writer = new BinaryWriter()) {
1272
+ if (message.total !== 0) {
1273
+ writer.uint32(8).uint32(message.total);
1274
+ }
1275
+ if (message.currentPage !== 0) {
1276
+ writer.uint32(16).uint32(message.currentPage);
1277
+ }
1278
+ if (message.lastPage !== 0) {
1279
+ writer.uint32(24).uint32(message.lastPage);
1280
+ }
1281
+ if (message.perPage !== 0) {
1282
+ writer.uint32(32).uint32(message.perPage);
1283
+ }
1284
+ for (const v of message.commands) {
1285
+ GroupCommand.encode(v, writer.uint32(42).fork()).join();
1286
+ }
1287
+ return writer;
1288
+ },
1289
+ decode(input, length) {
1290
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1291
+ const end = length === undefined ? reader.len : reader.pos + length;
1292
+ const message = createBaseGroupCommandListResponse();
1293
+ while (reader.pos < end) {
1294
+ const tag = reader.uint32();
1295
+ switch (tag >>> 3) {
1296
+ case 1: {
1297
+ if (tag !== 8) {
1298
+ break;
1299
+ }
1300
+ message.total = reader.uint32();
1301
+ continue;
1302
+ }
1303
+ case 2: {
1304
+ if (tag !== 16) {
1305
+ break;
1306
+ }
1307
+ message.currentPage = reader.uint32();
1308
+ continue;
1309
+ }
1310
+ case 3: {
1311
+ if (tag !== 24) {
1312
+ break;
1313
+ }
1314
+ message.lastPage = reader.uint32();
1315
+ continue;
1316
+ }
1317
+ case 4: {
1318
+ if (tag !== 32) {
1319
+ break;
1320
+ }
1321
+ message.perPage = reader.uint32();
1322
+ continue;
1323
+ }
1324
+ case 5: {
1325
+ if (tag !== 42) {
1326
+ break;
1327
+ }
1328
+ message.commands.push(GroupCommand.decode(reader, reader.uint32()));
1329
+ continue;
1330
+ }
1331
+ }
1332
+ if ((tag & 7) === 4 || tag === 0) {
1333
+ break;
1334
+ }
1335
+ reader.skip(tag & 7);
1336
+ }
1337
+ return message;
1338
+ },
1339
+ create(base) {
1340
+ return GroupCommandListResponse.fromPartial(base ?? {});
1341
+ },
1342
+ fromPartial(object) {
1343
+ const message = createBaseGroupCommandListResponse();
1344
+ message.total = object.total ?? 0;
1345
+ message.currentPage = object.currentPage ?? 0;
1346
+ message.lastPage = object.lastPage ?? 0;
1347
+ message.perPage = object.perPage ?? 0;
1348
+ message.commands = object.commands?.map((e) => GroupCommand.fromPartial(e)) || [];
1349
+ return message;
1350
+ },
1351
+ };
767
1352
  function toTimestamp(date) {
768
1353
  const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
769
1354
  const nanos = (date.getTime() % 1_000) * 1_000_000;