@fatehan/tsrp 1.1.7 → 1.1.9

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.
@@ -8,9 +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.DashboardIndividualResponse_Environmental = exports.DashboardIndividualResponse = exports.LatestDataModelRequest = exports.TripPerformance_SpeedsEntry = exports.TripPerformance_CrashesEntry = exports.TripPerformance_HumidityEntry = exports.TripPerformance_TemperatureEntry = exports.TripPerformance_DrivingEntry = exports.TripPerformance_Average = exports.TripPerformance = exports.TripPerformanceResponse = exports.TripPerformanceRequest = exports.MaintenanceResponse_Device = exports.MaintenanceResponse_Service = exports.MaintenanceResponse_Group = exports.MaintenanceResponse_List = exports.MaintenanceResponse_Cost = exports.MaintenanceResponse = exports.MaintenanceRequest = exports.AreaSplitterResponse_Record = exports.AreaSplitterResponse_Area = exports.AreaSplitterResponse = exports.AreaSplitterRequest = exports.TripReportRequest = exports.WorkCycleResponse = exports.WorkCycleRequest = exports.CommandHistoryResponse = exports.CommandHistoryRequest = exports.ChartResponse_ChartEntry = exports.ChartResponse_Chart_IosEntry = exports.ChartResponse_Chart = exports.ChartResponse_Series = exports.ChartResponse = exports.ChartRequest = exports.SystemIoResponse = exports.SystemIoRequest = exports.TripsSummaryRequest_GroupBy = exports.AttendanceResponse_EventType = exports.TrafficResponse_Traffic_EventType = exports.AreaReviewResponse_AreaReview_AreaEventType = exports.AreaSummaryReviewResponse_trafficType = exports.AreaSummaryReviewRequest_AreaSourceEnum = exports.AreaSummaryReviewRequest_ScopeEnum = exports.Traffix_Event_Type = exports.TripPerformanceRequest_GroupBy = exports.MaintenanceRequest_GroupBy = exports.StopCalculateIo = exports.RouteStopType = exports.Source = exports.protobufPackage = void 0;
12
- exports.TripsSummaryRequest = exports.TripsResponse = exports.TripsRequest = exports.AttendanceResponse_Attendance = exports.AttendanceResponse_Event = exports.AttendanceResponse = exports.AttendanceXRequest = exports.AttendanceRequest = exports.TrafficResponse_Traffic = exports.TrafficResponse = exports.TrafficRequest = exports.LogRequest = exports.LogResponse = exports.DeviceDataResponse = exports.DeviceDataRequest = exports.AreaReviewResponse_AreaReview = exports.AreaReviewResponse = exports.AreaReviewRequest = exports.RouteReviewResponse = exports.RouteReviewRequest = exports.RouteStopRequest = exports.RouteStopResponse = exports.RouteStopPoint = exports.DailyTrafficRequest = exports.DailyTrafficResponse_DailyTraffic = exports.DailyTrafficResponse_Traffic = exports.DailyTrafficResponse = exports.DeviceDataCountResponse_DeviceDataCount = exports.DeviceDataCountResponse = exports.DeviceDataCountRequest = exports.ShiftSummaryRequest = exports.ShiftResponse_Shift = exports.ShiftResponse = exports.ShiftRequest = exports.ShiftSummaryResponse_Summary = exports.ShiftSummaryResponse = exports.AreaSummaryReviewResponse_Review = exports.AreaSummaryReviewResponse = exports.AreaSummaryReviewRequest = exports.TripReportResponse = exports.TraffixRequest = exports.Traffix_STOP = exports.Traffix_Event = exports.Traffix = exports.TraffixResponse = exports.DashboardIndividualRequest = exports.DashboardIndividualResponse_SpeedsEntry = exports.DashboardIndividualResponse_GreenDrivingEntry = exports.DashboardIndividualResponse_Environmental_HumidityEntry = exports.DashboardIndividualResponse_Environmental_TemperatureEntry = void 0;
13
- exports.TripsSummaryResponse = void 0;
11
+ exports.LatestDataModelRequest = exports.TripPerformance_SpeedsEntry = exports.TripPerformance_CrashesEntry = exports.TripPerformance_HumidityEntry = exports.TripPerformance_TemperatureEntry = exports.TripPerformance_DrivingEntry = exports.TripPerformance_Average = exports.TripPerformance = exports.TripPerformanceResponse = exports.TripPerformanceRequest = exports.MaintenanceResponse_Device = exports.MaintenanceResponse_Service = exports.MaintenanceResponse_Group = exports.MaintenanceResponse_List = exports.MaintenanceResponse_Cost = exports.MaintenanceResponse = exports.MaintenanceRequest = exports.AreaSplitterResponse_Record = exports.AreaSplitterResponse_Area = exports.AreaSplitterResponse = exports.AreaSplitterRequest = exports.TripReportRequest = exports.WorkCycleResponse = exports.WorkCycleRequest = exports.CommandHistoryResponse = exports.CommandHistoryRequest = exports.ChartResponse_ChartEntry = exports.ChartResponse_Chart_IosEntry = exports.ChartResponse_Chart = exports.ChartResponse_Series = exports.ChartResponse = exports.ChartRequest = exports.SystemIoResponse = exports.SystemIoRequest = exports.WorkflowResponse = exports.WorkflowRequest = exports.TripsSummaryRequest_GroupBy = exports.AttendanceResponse_EventType = exports.TrafficResponse_Traffic_EventType = exports.AreaReviewResponse_AreaReview_AreaEventType = exports.AreaSummaryReviewResponse_trafficType = exports.AreaSummaryReviewRequest_AreaSourceEnum = exports.AreaSummaryReviewRequest_ScopeEnum = exports.Traffix_Event_Type = exports.TripPerformanceRequest_GroupBy = exports.MaintenanceRequest_GroupBy = exports.StopCalculateIo = exports.RouteStopType = exports.Source = exports.protobufPackage = void 0;
12
+ exports.TripsRequest = exports.AttendanceResponse_Attendance = exports.AttendanceResponse_Event = exports.AttendanceResponse = exports.AttendanceXRequest = exports.AttendanceRequest = exports.TrafficResponse_Traffic = exports.TrafficResponse = exports.TrafficRequest = exports.LogRequest = exports.LogResponse = exports.DeviceDataResponse = exports.DeviceDataRequest = exports.AreaReviewResponse_AreaReview = exports.AreaReviewResponse = exports.AreaReviewRequest = exports.RouteReviewResponse = exports.RouteReviewRequest = exports.RouteStopRequest = exports.RouteStopResponse = exports.RouteStopPoint = exports.DailyTrafficRequest = exports.DailyTrafficResponse_DailyTraffic = exports.DailyTrafficResponse_Traffic = exports.DailyTrafficResponse = exports.DeviceDataCountResponse_DeviceDataCount = exports.DeviceDataCountResponse = exports.DeviceDataCountRequest = exports.ShiftSummaryRequest = exports.ShiftResponse_Shift = exports.ShiftResponse = exports.ShiftRequest = exports.ShiftSummaryResponse_Summary = exports.ShiftSummaryResponse = exports.AreaSummaryReviewResponse_Review = exports.AreaSummaryReviewResponse = exports.AreaSummaryReviewRequest = exports.TripReportResponse = exports.TraffixRequest = exports.Traffix_STOP = exports.Traffix_Event = exports.Traffix = exports.TraffixResponse = exports.DashboardIndividualRequest = exports.DashboardIndividualResponse_SpeedsEntry = exports.DashboardIndividualResponse_GreenDrivingEntry = exports.DashboardIndividualResponse_Environmental_HumidityEntry = exports.DashboardIndividualResponse_Environmental_TemperatureEntry = exports.DashboardIndividualResponse_Environmental = exports.DashboardIndividualResponse = void 0;
13
+ exports.TripsSummaryResponse = exports.TripsSummaryRequest = exports.TripsResponse = void 0;
14
14
  exports.sourceFromJSON = sourceFromJSON;
15
15
  exports.sourceToJSON = sourceToJSON;
16
16
  exports.routeStopTypeFromJSON = routeStopTypeFromJSON;
@@ -40,6 +40,7 @@ exports.tripsSummaryRequest_GroupByToJSON = tripsSummaryRequest_GroupByToJSON;
40
40
  /* eslint-disable */
41
41
  const wire_1 = require("@bufbuild/protobuf/wire");
42
42
  const long_1 = __importDefault(require("long"));
43
+ const workflow_1 = require("../activities/workflow");
43
44
  const area_1 = require("../areas/area");
44
45
  const devices_1 = require("../devices/devices");
45
46
  const timestamp_1 = require("../google/protobuf/timestamp");
@@ -534,6 +535,356 @@ function tripsSummaryRequest_GroupByToJSON(object) {
534
535
  return "UNRECOGNIZED";
535
536
  }
536
537
  }
538
+ function createBaseWorkflowRequest() {
539
+ return {
540
+ organizationId: undefined,
541
+ workflowId: undefined,
542
+ deviceId: undefined,
543
+ status: undefined,
544
+ startedAt: undefined,
545
+ finishedAt: undefined,
546
+ disablePagination: false,
547
+ page: undefined,
548
+ perPage: undefined,
549
+ };
550
+ }
551
+ exports.WorkflowRequest = {
552
+ encode(message, writer = new wire_1.BinaryWriter()) {
553
+ if (message.organizationId !== undefined) {
554
+ writer.uint32(8).uint64(message.organizationId.toString());
555
+ }
556
+ if (message.workflowId !== undefined) {
557
+ writer.uint32(16).uint64(message.workflowId.toString());
558
+ }
559
+ if (message.deviceId !== undefined) {
560
+ writer.uint32(24).uint64(message.deviceId.toString());
561
+ }
562
+ if (message.status !== undefined) {
563
+ writer.uint32(32).int32(message.status);
564
+ }
565
+ if (message.startedAt !== undefined) {
566
+ timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(42).fork()).join();
567
+ }
568
+ if (message.finishedAt !== undefined) {
569
+ timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(50).fork()).join();
570
+ }
571
+ if (message.disablePagination !== false) {
572
+ writer.uint32(56).bool(message.disablePagination);
573
+ }
574
+ if (message.page !== undefined) {
575
+ writer.uint32(64).uint32(message.page);
576
+ }
577
+ if (message.perPage !== undefined) {
578
+ writer.uint32(72).uint32(message.perPage);
579
+ }
580
+ return writer;
581
+ },
582
+ decode(input, length) {
583
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
584
+ const end = length === undefined ? reader.len : reader.pos + length;
585
+ const message = createBaseWorkflowRequest();
586
+ while (reader.pos < end) {
587
+ const tag = reader.uint32();
588
+ switch (tag >>> 3) {
589
+ case 1: {
590
+ if (tag !== 8) {
591
+ break;
592
+ }
593
+ message.organizationId = long_1.default.fromString(reader.uint64().toString(), true);
594
+ continue;
595
+ }
596
+ case 2: {
597
+ if (tag !== 16) {
598
+ break;
599
+ }
600
+ message.workflowId = long_1.default.fromString(reader.uint64().toString(), true);
601
+ continue;
602
+ }
603
+ case 3: {
604
+ if (tag !== 24) {
605
+ break;
606
+ }
607
+ message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
608
+ continue;
609
+ }
610
+ case 4: {
611
+ if (tag !== 32) {
612
+ break;
613
+ }
614
+ message.status = reader.int32();
615
+ continue;
616
+ }
617
+ case 5: {
618
+ if (tag !== 42) {
619
+ break;
620
+ }
621
+ message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
622
+ continue;
623
+ }
624
+ case 6: {
625
+ if (tag !== 50) {
626
+ break;
627
+ }
628
+ message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
629
+ continue;
630
+ }
631
+ case 7: {
632
+ if (tag !== 56) {
633
+ break;
634
+ }
635
+ message.disablePagination = reader.bool();
636
+ continue;
637
+ }
638
+ case 8: {
639
+ if (tag !== 64) {
640
+ break;
641
+ }
642
+ message.page = reader.uint32();
643
+ continue;
644
+ }
645
+ case 9: {
646
+ if (tag !== 72) {
647
+ break;
648
+ }
649
+ message.perPage = reader.uint32();
650
+ continue;
651
+ }
652
+ }
653
+ if ((tag & 7) === 4 || tag === 0) {
654
+ break;
655
+ }
656
+ reader.skip(tag & 7);
657
+ }
658
+ return message;
659
+ },
660
+ fromJSON(object) {
661
+ return {
662
+ organizationId: isSet(object.organization_id) ? long_1.default.fromValue(object.organization_id) : undefined,
663
+ workflowId: isSet(object.workflow_id) ? long_1.default.fromValue(object.workflow_id) : undefined,
664
+ deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : undefined,
665
+ status: isSet(object.status) ? (0, workflow_1.workflowStatFromJSON)(object.status) : undefined,
666
+ startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
667
+ finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
668
+ disablePagination: isSet(object.disable_pagination) ? globalThis.Boolean(object.disable_pagination) : false,
669
+ page: isSet(object.page) ? globalThis.Number(object.page) : undefined,
670
+ perPage: isSet(object.per_page) ? globalThis.Number(object.per_page) : undefined,
671
+ };
672
+ },
673
+ toJSON(message) {
674
+ const obj = {};
675
+ if (message.organizationId !== undefined) {
676
+ obj.organization_id = (message.organizationId || long_1.default.UZERO).toString();
677
+ }
678
+ if (message.workflowId !== undefined) {
679
+ obj.workflow_id = (message.workflowId || long_1.default.UZERO).toString();
680
+ }
681
+ if (message.deviceId !== undefined) {
682
+ obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
683
+ }
684
+ if (message.status !== undefined) {
685
+ obj.status = (0, workflow_1.workflowStatToJSON)(message.status);
686
+ }
687
+ if (message.startedAt !== undefined) {
688
+ obj.started_at = message.startedAt.toISOString();
689
+ }
690
+ if (message.finishedAt !== undefined) {
691
+ obj.finished_at = message.finishedAt.toISOString();
692
+ }
693
+ if (message.disablePagination !== false) {
694
+ obj.disable_pagination = message.disablePagination;
695
+ }
696
+ if (message.page !== undefined) {
697
+ obj.page = Math.round(message.page);
698
+ }
699
+ if (message.perPage !== undefined) {
700
+ obj.per_page = Math.round(message.perPage);
701
+ }
702
+ return obj;
703
+ },
704
+ create(base) {
705
+ return exports.WorkflowRequest.fromPartial(base !== null && base !== void 0 ? base : {});
706
+ },
707
+ fromPartial(object) {
708
+ var _a, _b, _c, _d, _e, _f;
709
+ const message = createBaseWorkflowRequest();
710
+ message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
711
+ ? long_1.default.fromValue(object.organizationId)
712
+ : undefined;
713
+ message.workflowId = (object.workflowId !== undefined && object.workflowId !== null)
714
+ ? long_1.default.fromValue(object.workflowId)
715
+ : undefined;
716
+ message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
717
+ ? long_1.default.fromValue(object.deviceId)
718
+ : undefined;
719
+ message.status = (_a = object.status) !== null && _a !== void 0 ? _a : undefined;
720
+ message.startedAt = (_b = object.startedAt) !== null && _b !== void 0 ? _b : undefined;
721
+ message.finishedAt = (_c = object.finishedAt) !== null && _c !== void 0 ? _c : undefined;
722
+ message.disablePagination = (_d = object.disablePagination) !== null && _d !== void 0 ? _d : false;
723
+ message.page = (_e = object.page) !== null && _e !== void 0 ? _e : undefined;
724
+ message.perPage = (_f = object.perPage) !== null && _f !== void 0 ? _f : undefined;
725
+ return message;
726
+ },
727
+ };
728
+ function createBaseWorkflowResponse() {
729
+ return { currentPage: 0, from: 0, to: 0, lastPage: 0, perPage: 0, cost: long_1.default.ZERO, total: 0, data: [] };
730
+ }
731
+ exports.WorkflowResponse = {
732
+ encode(message, writer = new wire_1.BinaryWriter()) {
733
+ if (message.currentPage !== 0) {
734
+ writer.uint32(8).uint32(message.currentPage);
735
+ }
736
+ if (message.from !== 0) {
737
+ writer.uint32(16).uint32(message.from);
738
+ }
739
+ if (message.to !== 0) {
740
+ writer.uint32(24).uint32(message.to);
741
+ }
742
+ if (message.lastPage !== 0) {
743
+ writer.uint32(32).uint32(message.lastPage);
744
+ }
745
+ if (message.perPage !== 0) {
746
+ writer.uint32(40).uint32(message.perPage);
747
+ }
748
+ if (!message.cost.equals(long_1.default.ZERO)) {
749
+ writer.uint32(48).sint64(message.cost.toString());
750
+ }
751
+ if (message.total !== 0) {
752
+ writer.uint32(56).uint32(message.total);
753
+ }
754
+ for (const v of message.data) {
755
+ workflow_1.WorkflowTask.encode(v, writer.uint32(74).fork()).join();
756
+ }
757
+ return writer;
758
+ },
759
+ decode(input, length) {
760
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
761
+ const end = length === undefined ? reader.len : reader.pos + length;
762
+ const message = createBaseWorkflowResponse();
763
+ while (reader.pos < end) {
764
+ const tag = reader.uint32();
765
+ switch (tag >>> 3) {
766
+ case 1: {
767
+ if (tag !== 8) {
768
+ break;
769
+ }
770
+ message.currentPage = reader.uint32();
771
+ continue;
772
+ }
773
+ case 2: {
774
+ if (tag !== 16) {
775
+ break;
776
+ }
777
+ message.from = reader.uint32();
778
+ continue;
779
+ }
780
+ case 3: {
781
+ if (tag !== 24) {
782
+ break;
783
+ }
784
+ message.to = reader.uint32();
785
+ continue;
786
+ }
787
+ case 4: {
788
+ if (tag !== 32) {
789
+ break;
790
+ }
791
+ message.lastPage = reader.uint32();
792
+ continue;
793
+ }
794
+ case 5: {
795
+ if (tag !== 40) {
796
+ break;
797
+ }
798
+ message.perPage = reader.uint32();
799
+ continue;
800
+ }
801
+ case 6: {
802
+ if (tag !== 48) {
803
+ break;
804
+ }
805
+ message.cost = long_1.default.fromString(reader.sint64().toString());
806
+ continue;
807
+ }
808
+ case 7: {
809
+ if (tag !== 56) {
810
+ break;
811
+ }
812
+ message.total = reader.uint32();
813
+ continue;
814
+ }
815
+ case 9: {
816
+ if (tag !== 74) {
817
+ break;
818
+ }
819
+ message.data.push(workflow_1.WorkflowTask.decode(reader, reader.uint32()));
820
+ continue;
821
+ }
822
+ }
823
+ if ((tag & 7) === 4 || tag === 0) {
824
+ break;
825
+ }
826
+ reader.skip(tag & 7);
827
+ }
828
+ return message;
829
+ },
830
+ fromJSON(object) {
831
+ return {
832
+ currentPage: isSet(object.current_page) ? globalThis.Number(object.current_page) : 0,
833
+ from: isSet(object.from) ? globalThis.Number(object.from) : 0,
834
+ to: isSet(object.to) ? globalThis.Number(object.to) : 0,
835
+ lastPage: isSet(object.last_page) ? globalThis.Number(object.last_page) : 0,
836
+ perPage: isSet(object.per_page) ? globalThis.Number(object.per_page) : 0,
837
+ cost: isSet(object.cost) ? long_1.default.fromValue(object.cost) : long_1.default.ZERO,
838
+ total: isSet(object.total) ? globalThis.Number(object.total) : 0,
839
+ data: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.data) ? object.data.map((e) => workflow_1.WorkflowTask.fromJSON(e)) : [],
840
+ };
841
+ },
842
+ toJSON(message) {
843
+ var _a;
844
+ const obj = {};
845
+ if (message.currentPage !== 0) {
846
+ obj.current_page = Math.round(message.currentPage);
847
+ }
848
+ if (message.from !== 0) {
849
+ obj.from = Math.round(message.from);
850
+ }
851
+ if (message.to !== 0) {
852
+ obj.to = Math.round(message.to);
853
+ }
854
+ if (message.lastPage !== 0) {
855
+ obj.last_page = Math.round(message.lastPage);
856
+ }
857
+ if (message.perPage !== 0) {
858
+ obj.per_page = Math.round(message.perPage);
859
+ }
860
+ if (!message.cost.equals(long_1.default.ZERO)) {
861
+ obj.cost = (message.cost || long_1.default.ZERO).toString();
862
+ }
863
+ if (message.total !== 0) {
864
+ obj.total = Math.round(message.total);
865
+ }
866
+ if ((_a = message.data) === null || _a === void 0 ? void 0 : _a.length) {
867
+ obj.data = message.data.map((e) => workflow_1.WorkflowTask.toJSON(e));
868
+ }
869
+ return obj;
870
+ },
871
+ create(base) {
872
+ return exports.WorkflowResponse.fromPartial(base !== null && base !== void 0 ? base : {});
873
+ },
874
+ fromPartial(object) {
875
+ var _a, _b, _c, _d, _e, _f, _g;
876
+ const message = createBaseWorkflowResponse();
877
+ message.currentPage = (_a = object.currentPage) !== null && _a !== void 0 ? _a : 0;
878
+ message.from = (_b = object.from) !== null && _b !== void 0 ? _b : 0;
879
+ message.to = (_c = object.to) !== null && _c !== void 0 ? _c : 0;
880
+ message.lastPage = (_d = object.lastPage) !== null && _d !== void 0 ? _d : 0;
881
+ message.perPage = (_e = object.perPage) !== null && _e !== void 0 ? _e : 0;
882
+ message.cost = (object.cost !== undefined && object.cost !== null) ? long_1.default.fromValue(object.cost) : long_1.default.ZERO;
883
+ message.total = (_f = object.total) !== null && _f !== void 0 ? _f : 0;
884
+ message.data = ((_g = object.data) === null || _g === void 0 ? void 0 : _g.map((e) => workflow_1.WorkflowTask.fromPartial(e))) || [];
885
+ return message;
886
+ },
887
+ };
537
888
  function createBaseSystemIoRequest() {
538
889
  return {};
539
890
  }
package/dist/report.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AreaSummaryReviewRequest, AreaSummaryReviewResponse, ChartRequest, ChartResponse, CommandHistoryRequest, CommandHistoryResponse, DashboardIndividualRequest, DashboardIndividualResponse, DeviceDataRequest, DeviceDataResponse, LogRequest, LogResponse, RouteReviewRequest, RouteReviewResponse, RouteStopRequest, RouteStopResponse, SystemIoRequest, SystemIoResponse, TripPerformanceRequest, TripPerformanceResponse, TripReportRequest, TripReportResponse, WorkCycleRequest, WorkCycleResponse } from "./fatehan/reports/report";
1
+ import { AreaSummaryReviewRequest, AreaSummaryReviewResponse, ChartRequest, ChartResponse, CommandHistoryRequest, CommandHistoryResponse, DashboardIndividualRequest, DashboardIndividualResponse, DeviceDataRequest, DeviceDataResponse, LogRequest, LogResponse, RouteReviewRequest, RouteReviewResponse, RouteStopRequest, RouteStopResponse, SystemIoRequest, SystemIoResponse, TripPerformanceRequest, TripPerformanceResponse, TripReportRequest, TripReportResponse, WorkCycleRequest, WorkCycleResponse, WorkflowRequest, WorkflowResponse } from "./fatehan/reports/report";
2
2
  import { ShownIo, SystemIo } from "./fatehan/devices/devices";
3
3
  import { Data } from "./fatehan/packets/dataModel";
4
4
  export declare class ReportService {
@@ -18,7 +18,7 @@ export declare class ReportService {
18
18
  CommandHistoryReport(request: CommandHistoryRequest): Promise<CommandHistoryResponse>;
19
19
  ChartReport(request: ChartRequest, responses: (chunk: ChartResponse) => void): Promise<void>;
20
20
  SystemIoReport(request: SystemIoRequest): Promise<SystemIoResponse>;
21
+ WorkflowReport(request: WorkflowRequest): Promise<WorkflowResponse>;
21
22
  SystemIoCast(systemIo: SystemIo[] | null, deviceIo: SystemIo[], data: Data): Promise<ShownIo[]>;
22
- Matin(): Promise<void>;
23
23
  }
24
24
  //# sourceMappingURL=report.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAGnD,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA+C;IACzE,OAAO,CAAC,QAAQ,CAAC,O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AO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAyBnE,uBAAuB,CAC5B,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,yBAAyB,CAAC;IA0B9B,eAAe,CACpB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC;IAwBtB,oBAAoB,CACzB,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,sBAAsB,CAAC;IA0BrB,WAAW,CACtB,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI;IAkCpC,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAmCnE,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAsB7D,YAAY,CACvB,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAC3B,QAAQ,EAAE,QAAQ,EAAE,EACpB,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,OAAO,EAAE,CAAC;CAetB"}
package/dist/report.js CHANGED
@@ -227,6 +227,21 @@ class ReportService {
227
227
  }
228
228
  });
229
229
  }
230
+ WorkflowReport(request) {
231
+ return new Promise(async (resolve, reject) => {
232
+ const response = await fetch(`${this.url}/${this.namespace}/WorkflowReport`, {
233
+ method: "POST",
234
+ headers: this.headers,
235
+ body: new Uint8Array(report_1.WorkflowRequest.encode(request).finish()),
236
+ });
237
+ if (response.ok) {
238
+ resolve(report_1.WorkflowResponse.decode(new Uint8Array(await response.arrayBuffer())));
239
+ }
240
+ else {
241
+ reject(await response.text());
242
+ }
243
+ });
244
+ }
230
245
  async SystemIoCast(systemIo, deviceIo, data) {
231
246
  return new Promise(async (resolve) => {
232
247
  if (systemIo == null) {
@@ -241,8 +256,5 @@ class ReportService {
241
256
  return;
242
257
  });
243
258
  }
244
- async Matin() {
245
- return;
246
- }
247
259
  }
248
260
  exports.ReportService = ReportService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fatehan/tsrp",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "fatehan main models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/readme.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Without GRPC
4
4
 
5
- ```cmd
5
+ ```bash
6
6
  protoc \
7
7
  --plugin=protoc-gen-ts_proto=$(which protoc-gen-ts_proto) \
8
8
  -I ./src/fatehan \
@@ -12,27 +12,15 @@ protoc \
12
12
  ../protocols/**/*.proto
13
13
  ```
14
14
 
15
- ## GRPC Including
16
-
17
- <!-- ```cmd
18
- protoc \
19
- --plugin=protoc-gen-ts_proto=/usr/bin/protoc-gen-ts_proto \
20
- -I ./src/fatehan \
21
- -I ../protocols \
22
- --ts_proto_out=./src/fatehan \
23
- --ts_proto_opt=outputServices=none,outputClientImpl=false,esModuleInterop=true,outputEncodeMethods=true,outputJsonMethods=true,useOptionals=messages,forceLong=long \
24
- ../protocols/**/*.proto
25
- ``` -->
26
-
27
15
  ### Build
28
16
 
29
- ```cmd
17
+ ```bash
30
18
  npm run build
31
19
  ```
32
20
 
33
21
  ### Deploy
34
22
 
35
- ```cmd
36
- npm version patch
23
+ ```bash
24
+ npm version patch
37
25
  npm publish
38
26
  ```