@fatehan/tsrp 1.6.23 → 1.6.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fatehan/activities/workshift.d.ts +0 -53
- package/dist/fatehan/activities/workshift.d.ts.map +1 -1
- package/dist/fatehan/activities/workshift.js +0 -574
- package/dist/fatehan/services/api.d.ts +70 -0
- package/dist/fatehan/services/api.d.ts.map +1 -1
- package/dist/fatehan/services/api.js +732 -0
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
8
|
import Long from "long";
|
|
9
9
|
import { WorkflowTask } from "../activities/workflow";
|
|
10
|
+
import { WorkShift, WorkShiftTemplate } from "../activities/workshift";
|
|
10
11
|
import { Area, Point, WorkCycle } from "../areas/area";
|
|
11
12
|
import { CommandAction, SystemIo } from "../devices/devices";
|
|
12
13
|
import { Maintenance } from "../devices/maintenance";
|
|
@@ -12674,6 +12675,737 @@ export const PrepareSendUserNotificationResposne = {
|
|
|
12674
12675
|
return message;
|
|
12675
12676
|
},
|
|
12676
12677
|
};
|
|
12678
|
+
function createBaseWorkShiftTemplateShowRequest() {
|
|
12679
|
+
return { id: Long.UZERO };
|
|
12680
|
+
}
|
|
12681
|
+
export const WorkShiftTemplateShowRequest = {
|
|
12682
|
+
encode(message, writer = new BinaryWriter()) {
|
|
12683
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
12684
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
12685
|
+
}
|
|
12686
|
+
return writer;
|
|
12687
|
+
},
|
|
12688
|
+
decode(input, length) {
|
|
12689
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
12690
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
12691
|
+
const message = createBaseWorkShiftTemplateShowRequest();
|
|
12692
|
+
while (reader.pos < end) {
|
|
12693
|
+
const tag = reader.uint32();
|
|
12694
|
+
switch (tag >>> 3) {
|
|
12695
|
+
case 1: {
|
|
12696
|
+
if (tag !== 8) {
|
|
12697
|
+
break;
|
|
12698
|
+
}
|
|
12699
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
12700
|
+
continue;
|
|
12701
|
+
}
|
|
12702
|
+
}
|
|
12703
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
12704
|
+
break;
|
|
12705
|
+
}
|
|
12706
|
+
reader.skip(tag & 7);
|
|
12707
|
+
}
|
|
12708
|
+
return message;
|
|
12709
|
+
},
|
|
12710
|
+
create(base) {
|
|
12711
|
+
return WorkShiftTemplateShowRequest.fromPartial(base ?? {});
|
|
12712
|
+
},
|
|
12713
|
+
fromPartial(object) {
|
|
12714
|
+
const message = createBaseWorkShiftTemplateShowRequest();
|
|
12715
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
12716
|
+
return message;
|
|
12717
|
+
},
|
|
12718
|
+
};
|
|
12719
|
+
function createBaseWorkShiftTemplateIndexRequest() {
|
|
12720
|
+
return {
|
|
12721
|
+
disablePagination: false,
|
|
12722
|
+
page: undefined,
|
|
12723
|
+
pageSize: undefined,
|
|
12724
|
+
organizationId: undefined,
|
|
12725
|
+
queryFilter: {},
|
|
12726
|
+
sort: undefined,
|
|
12727
|
+
order: undefined,
|
|
12728
|
+
};
|
|
12729
|
+
}
|
|
12730
|
+
export const WorkShiftTemplateIndexRequest = {
|
|
12731
|
+
encode(message, writer = new BinaryWriter()) {
|
|
12732
|
+
if (message.disablePagination !== false) {
|
|
12733
|
+
writer.uint32(8).bool(message.disablePagination);
|
|
12734
|
+
}
|
|
12735
|
+
if (message.page !== undefined) {
|
|
12736
|
+
writer.uint32(16).uint32(message.page);
|
|
12737
|
+
}
|
|
12738
|
+
if (message.pageSize !== undefined) {
|
|
12739
|
+
writer.uint32(24).uint32(message.pageSize);
|
|
12740
|
+
}
|
|
12741
|
+
if (message.organizationId !== undefined) {
|
|
12742
|
+
writer.uint32(32).uint64(message.organizationId.toString());
|
|
12743
|
+
}
|
|
12744
|
+
globalThis.Object.entries(message.queryFilter).forEach(([key, value]) => {
|
|
12745
|
+
WorkShiftTemplateIndexRequest_QueryFilterEntry.encode({ key: key, value }, writer.uint32(66).fork())
|
|
12746
|
+
.join();
|
|
12747
|
+
});
|
|
12748
|
+
if (message.sort !== undefined) {
|
|
12749
|
+
writer.uint32(74).string(message.sort);
|
|
12750
|
+
}
|
|
12751
|
+
if (message.order !== undefined) {
|
|
12752
|
+
writer.uint32(82).string(message.order);
|
|
12753
|
+
}
|
|
12754
|
+
return writer;
|
|
12755
|
+
},
|
|
12756
|
+
decode(input, length) {
|
|
12757
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
12758
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
12759
|
+
const message = createBaseWorkShiftTemplateIndexRequest();
|
|
12760
|
+
while (reader.pos < end) {
|
|
12761
|
+
const tag = reader.uint32();
|
|
12762
|
+
switch (tag >>> 3) {
|
|
12763
|
+
case 1: {
|
|
12764
|
+
if (tag !== 8) {
|
|
12765
|
+
break;
|
|
12766
|
+
}
|
|
12767
|
+
message.disablePagination = reader.bool();
|
|
12768
|
+
continue;
|
|
12769
|
+
}
|
|
12770
|
+
case 2: {
|
|
12771
|
+
if (tag !== 16) {
|
|
12772
|
+
break;
|
|
12773
|
+
}
|
|
12774
|
+
message.page = reader.uint32();
|
|
12775
|
+
continue;
|
|
12776
|
+
}
|
|
12777
|
+
case 3: {
|
|
12778
|
+
if (tag !== 24) {
|
|
12779
|
+
break;
|
|
12780
|
+
}
|
|
12781
|
+
message.pageSize = reader.uint32();
|
|
12782
|
+
continue;
|
|
12783
|
+
}
|
|
12784
|
+
case 4: {
|
|
12785
|
+
if (tag !== 32) {
|
|
12786
|
+
break;
|
|
12787
|
+
}
|
|
12788
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
12789
|
+
continue;
|
|
12790
|
+
}
|
|
12791
|
+
case 8: {
|
|
12792
|
+
if (tag !== 66) {
|
|
12793
|
+
break;
|
|
12794
|
+
}
|
|
12795
|
+
const entry8 = WorkShiftTemplateIndexRequest_QueryFilterEntry.decode(reader, reader.uint32());
|
|
12796
|
+
if (entry8.value !== undefined) {
|
|
12797
|
+
message.queryFilter[entry8.key] = entry8.value;
|
|
12798
|
+
}
|
|
12799
|
+
continue;
|
|
12800
|
+
}
|
|
12801
|
+
case 9: {
|
|
12802
|
+
if (tag !== 74) {
|
|
12803
|
+
break;
|
|
12804
|
+
}
|
|
12805
|
+
message.sort = reader.string();
|
|
12806
|
+
continue;
|
|
12807
|
+
}
|
|
12808
|
+
case 10: {
|
|
12809
|
+
if (tag !== 82) {
|
|
12810
|
+
break;
|
|
12811
|
+
}
|
|
12812
|
+
message.order = reader.string();
|
|
12813
|
+
continue;
|
|
12814
|
+
}
|
|
12815
|
+
}
|
|
12816
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
12817
|
+
break;
|
|
12818
|
+
}
|
|
12819
|
+
reader.skip(tag & 7);
|
|
12820
|
+
}
|
|
12821
|
+
return message;
|
|
12822
|
+
},
|
|
12823
|
+
create(base) {
|
|
12824
|
+
return WorkShiftTemplateIndexRequest.fromPartial(base ?? {});
|
|
12825
|
+
},
|
|
12826
|
+
fromPartial(object) {
|
|
12827
|
+
const message = createBaseWorkShiftTemplateIndexRequest();
|
|
12828
|
+
message.disablePagination = object.disablePagination ?? false;
|
|
12829
|
+
message.page = object.page ?? undefined;
|
|
12830
|
+
message.pageSize = object.pageSize ?? undefined;
|
|
12831
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
12832
|
+
? Long.fromValue(object.organizationId)
|
|
12833
|
+
: undefined;
|
|
12834
|
+
message.queryFilter = globalThis.Object.entries(object.queryFilter ?? {}).reduce((acc, [key, value]) => {
|
|
12835
|
+
if (value !== undefined) {
|
|
12836
|
+
acc[key] = FilterScope.fromPartial(value);
|
|
12837
|
+
}
|
|
12838
|
+
return acc;
|
|
12839
|
+
}, {});
|
|
12840
|
+
message.sort = object.sort ?? undefined;
|
|
12841
|
+
message.order = object.order ?? undefined;
|
|
12842
|
+
return message;
|
|
12843
|
+
},
|
|
12844
|
+
};
|
|
12845
|
+
function createBaseWorkShiftTemplateIndexRequest_QueryFilterEntry() {
|
|
12846
|
+
return { key: "", value: undefined };
|
|
12847
|
+
}
|
|
12848
|
+
export const WorkShiftTemplateIndexRequest_QueryFilterEntry = {
|
|
12849
|
+
encode(message, writer = new BinaryWriter()) {
|
|
12850
|
+
if (message.key !== "") {
|
|
12851
|
+
writer.uint32(10).string(message.key);
|
|
12852
|
+
}
|
|
12853
|
+
if (message.value !== undefined) {
|
|
12854
|
+
FilterScope.encode(message.value, writer.uint32(18).fork()).join();
|
|
12855
|
+
}
|
|
12856
|
+
return writer;
|
|
12857
|
+
},
|
|
12858
|
+
decode(input, length) {
|
|
12859
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
12860
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
12861
|
+
const message = createBaseWorkShiftTemplateIndexRequest_QueryFilterEntry();
|
|
12862
|
+
while (reader.pos < end) {
|
|
12863
|
+
const tag = reader.uint32();
|
|
12864
|
+
switch (tag >>> 3) {
|
|
12865
|
+
case 1: {
|
|
12866
|
+
if (tag !== 10) {
|
|
12867
|
+
break;
|
|
12868
|
+
}
|
|
12869
|
+
message.key = reader.string();
|
|
12870
|
+
continue;
|
|
12871
|
+
}
|
|
12872
|
+
case 2: {
|
|
12873
|
+
if (tag !== 18) {
|
|
12874
|
+
break;
|
|
12875
|
+
}
|
|
12876
|
+
message.value = FilterScope.decode(reader, reader.uint32());
|
|
12877
|
+
continue;
|
|
12878
|
+
}
|
|
12879
|
+
}
|
|
12880
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
12881
|
+
break;
|
|
12882
|
+
}
|
|
12883
|
+
reader.skip(tag & 7);
|
|
12884
|
+
}
|
|
12885
|
+
return message;
|
|
12886
|
+
},
|
|
12887
|
+
create(base) {
|
|
12888
|
+
return WorkShiftTemplateIndexRequest_QueryFilterEntry.fromPartial(base ?? {});
|
|
12889
|
+
},
|
|
12890
|
+
fromPartial(object) {
|
|
12891
|
+
const message = createBaseWorkShiftTemplateIndexRequest_QueryFilterEntry();
|
|
12892
|
+
message.key = object.key ?? "";
|
|
12893
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
12894
|
+
? FilterScope.fromPartial(object.value)
|
|
12895
|
+
: undefined;
|
|
12896
|
+
return message;
|
|
12897
|
+
},
|
|
12898
|
+
};
|
|
12899
|
+
function createBaseWorkShiftTemplateIndexResponse() {
|
|
12900
|
+
return { currentPage: 0, from: 0, to: 0, lastPage: 0, perPage: 0, cost: Long.ZERO, total: 0, data: [] };
|
|
12901
|
+
}
|
|
12902
|
+
export const WorkShiftTemplateIndexResponse = {
|
|
12903
|
+
encode(message, writer = new BinaryWriter()) {
|
|
12904
|
+
if (message.currentPage !== 0) {
|
|
12905
|
+
writer.uint32(8).uint32(message.currentPage);
|
|
12906
|
+
}
|
|
12907
|
+
if (message.from !== 0) {
|
|
12908
|
+
writer.uint32(16).uint32(message.from);
|
|
12909
|
+
}
|
|
12910
|
+
if (message.to !== 0) {
|
|
12911
|
+
writer.uint32(24).uint32(message.to);
|
|
12912
|
+
}
|
|
12913
|
+
if (message.lastPage !== 0) {
|
|
12914
|
+
writer.uint32(32).uint32(message.lastPage);
|
|
12915
|
+
}
|
|
12916
|
+
if (message.perPage !== 0) {
|
|
12917
|
+
writer.uint32(40).uint32(message.perPage);
|
|
12918
|
+
}
|
|
12919
|
+
if (!message.cost.equals(Long.ZERO)) {
|
|
12920
|
+
writer.uint32(48).sint64(message.cost.toString());
|
|
12921
|
+
}
|
|
12922
|
+
if (message.total !== 0) {
|
|
12923
|
+
writer.uint32(56).uint32(message.total);
|
|
12924
|
+
}
|
|
12925
|
+
for (const v of message.data) {
|
|
12926
|
+
WorkShiftTemplate.encode(v, writer.uint32(66).fork()).join();
|
|
12927
|
+
}
|
|
12928
|
+
return writer;
|
|
12929
|
+
},
|
|
12930
|
+
decode(input, length) {
|
|
12931
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
12932
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
12933
|
+
const message = createBaseWorkShiftTemplateIndexResponse();
|
|
12934
|
+
while (reader.pos < end) {
|
|
12935
|
+
const tag = reader.uint32();
|
|
12936
|
+
switch (tag >>> 3) {
|
|
12937
|
+
case 1: {
|
|
12938
|
+
if (tag !== 8) {
|
|
12939
|
+
break;
|
|
12940
|
+
}
|
|
12941
|
+
message.currentPage = reader.uint32();
|
|
12942
|
+
continue;
|
|
12943
|
+
}
|
|
12944
|
+
case 2: {
|
|
12945
|
+
if (tag !== 16) {
|
|
12946
|
+
break;
|
|
12947
|
+
}
|
|
12948
|
+
message.from = reader.uint32();
|
|
12949
|
+
continue;
|
|
12950
|
+
}
|
|
12951
|
+
case 3: {
|
|
12952
|
+
if (tag !== 24) {
|
|
12953
|
+
break;
|
|
12954
|
+
}
|
|
12955
|
+
message.to = reader.uint32();
|
|
12956
|
+
continue;
|
|
12957
|
+
}
|
|
12958
|
+
case 4: {
|
|
12959
|
+
if (tag !== 32) {
|
|
12960
|
+
break;
|
|
12961
|
+
}
|
|
12962
|
+
message.lastPage = reader.uint32();
|
|
12963
|
+
continue;
|
|
12964
|
+
}
|
|
12965
|
+
case 5: {
|
|
12966
|
+
if (tag !== 40) {
|
|
12967
|
+
break;
|
|
12968
|
+
}
|
|
12969
|
+
message.perPage = reader.uint32();
|
|
12970
|
+
continue;
|
|
12971
|
+
}
|
|
12972
|
+
case 6: {
|
|
12973
|
+
if (tag !== 48) {
|
|
12974
|
+
break;
|
|
12975
|
+
}
|
|
12976
|
+
message.cost = Long.fromString(reader.sint64().toString());
|
|
12977
|
+
continue;
|
|
12978
|
+
}
|
|
12979
|
+
case 7: {
|
|
12980
|
+
if (tag !== 56) {
|
|
12981
|
+
break;
|
|
12982
|
+
}
|
|
12983
|
+
message.total = reader.uint32();
|
|
12984
|
+
continue;
|
|
12985
|
+
}
|
|
12986
|
+
case 8: {
|
|
12987
|
+
if (tag !== 66) {
|
|
12988
|
+
break;
|
|
12989
|
+
}
|
|
12990
|
+
message.data.push(WorkShiftTemplate.decode(reader, reader.uint32()));
|
|
12991
|
+
continue;
|
|
12992
|
+
}
|
|
12993
|
+
}
|
|
12994
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
12995
|
+
break;
|
|
12996
|
+
}
|
|
12997
|
+
reader.skip(tag & 7);
|
|
12998
|
+
}
|
|
12999
|
+
return message;
|
|
13000
|
+
},
|
|
13001
|
+
create(base) {
|
|
13002
|
+
return WorkShiftTemplateIndexResponse.fromPartial(base ?? {});
|
|
13003
|
+
},
|
|
13004
|
+
fromPartial(object) {
|
|
13005
|
+
const message = createBaseWorkShiftTemplateIndexResponse();
|
|
13006
|
+
message.currentPage = object.currentPage ?? 0;
|
|
13007
|
+
message.from = object.from ?? 0;
|
|
13008
|
+
message.to = object.to ?? 0;
|
|
13009
|
+
message.lastPage = object.lastPage ?? 0;
|
|
13010
|
+
message.perPage = object.perPage ?? 0;
|
|
13011
|
+
message.cost = (object.cost !== undefined && object.cost !== null) ? Long.fromValue(object.cost) : Long.ZERO;
|
|
13012
|
+
message.total = object.total ?? 0;
|
|
13013
|
+
message.data = object.data?.map((e) => WorkShiftTemplate.fromPartial(e)) || [];
|
|
13014
|
+
return message;
|
|
13015
|
+
},
|
|
13016
|
+
};
|
|
13017
|
+
function createBaseWorkShiftTemplateDestroyRequest() {
|
|
13018
|
+
return { id: Long.UZERO };
|
|
13019
|
+
}
|
|
13020
|
+
export const WorkShiftTemplateDestroyRequest = {
|
|
13021
|
+
encode(message, writer = new BinaryWriter()) {
|
|
13022
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
13023
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
13024
|
+
}
|
|
13025
|
+
return writer;
|
|
13026
|
+
},
|
|
13027
|
+
decode(input, length) {
|
|
13028
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
13029
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
13030
|
+
const message = createBaseWorkShiftTemplateDestroyRequest();
|
|
13031
|
+
while (reader.pos < end) {
|
|
13032
|
+
const tag = reader.uint32();
|
|
13033
|
+
switch (tag >>> 3) {
|
|
13034
|
+
case 1: {
|
|
13035
|
+
if (tag !== 8) {
|
|
13036
|
+
break;
|
|
13037
|
+
}
|
|
13038
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
13039
|
+
continue;
|
|
13040
|
+
}
|
|
13041
|
+
}
|
|
13042
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
13043
|
+
break;
|
|
13044
|
+
}
|
|
13045
|
+
reader.skip(tag & 7);
|
|
13046
|
+
}
|
|
13047
|
+
return message;
|
|
13048
|
+
},
|
|
13049
|
+
create(base) {
|
|
13050
|
+
return WorkShiftTemplateDestroyRequest.fromPartial(base ?? {});
|
|
13051
|
+
},
|
|
13052
|
+
fromPartial(object) {
|
|
13053
|
+
const message = createBaseWorkShiftTemplateDestroyRequest();
|
|
13054
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
13055
|
+
return message;
|
|
13056
|
+
},
|
|
13057
|
+
};
|
|
13058
|
+
function createBaseWorkShiftTemplateDestroyResponse() {
|
|
13059
|
+
return { deleted: false };
|
|
13060
|
+
}
|
|
13061
|
+
export const WorkShiftTemplateDestroyResponse = {
|
|
13062
|
+
encode(message, writer = new BinaryWriter()) {
|
|
13063
|
+
if (message.deleted !== false) {
|
|
13064
|
+
writer.uint32(8).bool(message.deleted);
|
|
13065
|
+
}
|
|
13066
|
+
return writer;
|
|
13067
|
+
},
|
|
13068
|
+
decode(input, length) {
|
|
13069
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
13070
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
13071
|
+
const message = createBaseWorkShiftTemplateDestroyResponse();
|
|
13072
|
+
while (reader.pos < end) {
|
|
13073
|
+
const tag = reader.uint32();
|
|
13074
|
+
switch (tag >>> 3) {
|
|
13075
|
+
case 1: {
|
|
13076
|
+
if (tag !== 8) {
|
|
13077
|
+
break;
|
|
13078
|
+
}
|
|
13079
|
+
message.deleted = reader.bool();
|
|
13080
|
+
continue;
|
|
13081
|
+
}
|
|
13082
|
+
}
|
|
13083
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
13084
|
+
break;
|
|
13085
|
+
}
|
|
13086
|
+
reader.skip(tag & 7);
|
|
13087
|
+
}
|
|
13088
|
+
return message;
|
|
13089
|
+
},
|
|
13090
|
+
create(base) {
|
|
13091
|
+
return WorkShiftTemplateDestroyResponse.fromPartial(base ?? {});
|
|
13092
|
+
},
|
|
13093
|
+
fromPartial(object) {
|
|
13094
|
+
const message = createBaseWorkShiftTemplateDestroyResponse();
|
|
13095
|
+
message.deleted = object.deleted ?? false;
|
|
13096
|
+
return message;
|
|
13097
|
+
},
|
|
13098
|
+
};
|
|
13099
|
+
function createBaseWorkShiftIndexRequest() {
|
|
13100
|
+
return { organizationId: undefined, templateId: undefined, createdBy: undefined };
|
|
13101
|
+
}
|
|
13102
|
+
export const WorkShiftIndexRequest = {
|
|
13103
|
+
encode(message, writer = new BinaryWriter()) {
|
|
13104
|
+
if (message.organizationId !== undefined) {
|
|
13105
|
+
writer.uint32(32).uint64(message.organizationId.toString());
|
|
13106
|
+
}
|
|
13107
|
+
if (message.templateId !== undefined) {
|
|
13108
|
+
writer.uint32(40).uint64(message.templateId.toString());
|
|
13109
|
+
}
|
|
13110
|
+
if (message.createdBy !== undefined) {
|
|
13111
|
+
writer.uint32(48).uint64(message.createdBy.toString());
|
|
13112
|
+
}
|
|
13113
|
+
return writer;
|
|
13114
|
+
},
|
|
13115
|
+
decode(input, length) {
|
|
13116
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
13117
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
13118
|
+
const message = createBaseWorkShiftIndexRequest();
|
|
13119
|
+
while (reader.pos < end) {
|
|
13120
|
+
const tag = reader.uint32();
|
|
13121
|
+
switch (tag >>> 3) {
|
|
13122
|
+
case 4: {
|
|
13123
|
+
if (tag !== 32) {
|
|
13124
|
+
break;
|
|
13125
|
+
}
|
|
13126
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
13127
|
+
continue;
|
|
13128
|
+
}
|
|
13129
|
+
case 5: {
|
|
13130
|
+
if (tag !== 40) {
|
|
13131
|
+
break;
|
|
13132
|
+
}
|
|
13133
|
+
message.templateId = Long.fromString(reader.uint64().toString(), true);
|
|
13134
|
+
continue;
|
|
13135
|
+
}
|
|
13136
|
+
case 6: {
|
|
13137
|
+
if (tag !== 48) {
|
|
13138
|
+
break;
|
|
13139
|
+
}
|
|
13140
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
13141
|
+
continue;
|
|
13142
|
+
}
|
|
13143
|
+
}
|
|
13144
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
13145
|
+
break;
|
|
13146
|
+
}
|
|
13147
|
+
reader.skip(tag & 7);
|
|
13148
|
+
}
|
|
13149
|
+
return message;
|
|
13150
|
+
},
|
|
13151
|
+
create(base) {
|
|
13152
|
+
return WorkShiftIndexRequest.fromPartial(base ?? {});
|
|
13153
|
+
},
|
|
13154
|
+
fromPartial(object) {
|
|
13155
|
+
const message = createBaseWorkShiftIndexRequest();
|
|
13156
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
13157
|
+
? Long.fromValue(object.organizationId)
|
|
13158
|
+
: undefined;
|
|
13159
|
+
message.templateId = (object.templateId !== undefined && object.templateId !== null)
|
|
13160
|
+
? Long.fromValue(object.templateId)
|
|
13161
|
+
: undefined;
|
|
13162
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
13163
|
+
? Long.fromValue(object.createdBy)
|
|
13164
|
+
: undefined;
|
|
13165
|
+
return message;
|
|
13166
|
+
},
|
|
13167
|
+
};
|
|
13168
|
+
function createBaseWorkShiftIndexResponse() {
|
|
13169
|
+
return { currentPage: 0, from: 0, to: 0, lastPage: 0, perPage: 0, cost: Long.ZERO, total: 0, data: [] };
|
|
13170
|
+
}
|
|
13171
|
+
export const WorkShiftIndexResponse = {
|
|
13172
|
+
encode(message, writer = new BinaryWriter()) {
|
|
13173
|
+
if (message.currentPage !== 0) {
|
|
13174
|
+
writer.uint32(8).uint32(message.currentPage);
|
|
13175
|
+
}
|
|
13176
|
+
if (message.from !== 0) {
|
|
13177
|
+
writer.uint32(16).uint32(message.from);
|
|
13178
|
+
}
|
|
13179
|
+
if (message.to !== 0) {
|
|
13180
|
+
writer.uint32(24).uint32(message.to);
|
|
13181
|
+
}
|
|
13182
|
+
if (message.lastPage !== 0) {
|
|
13183
|
+
writer.uint32(32).uint32(message.lastPage);
|
|
13184
|
+
}
|
|
13185
|
+
if (message.perPage !== 0) {
|
|
13186
|
+
writer.uint32(40).uint32(message.perPage);
|
|
13187
|
+
}
|
|
13188
|
+
if (!message.cost.equals(Long.ZERO)) {
|
|
13189
|
+
writer.uint32(48).sint64(message.cost.toString());
|
|
13190
|
+
}
|
|
13191
|
+
if (message.total !== 0) {
|
|
13192
|
+
writer.uint32(56).uint32(message.total);
|
|
13193
|
+
}
|
|
13194
|
+
for (const v of message.data) {
|
|
13195
|
+
WorkShift.encode(v, writer.uint32(66).fork()).join();
|
|
13196
|
+
}
|
|
13197
|
+
return writer;
|
|
13198
|
+
},
|
|
13199
|
+
decode(input, length) {
|
|
13200
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
13201
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
13202
|
+
const message = createBaseWorkShiftIndexResponse();
|
|
13203
|
+
while (reader.pos < end) {
|
|
13204
|
+
const tag = reader.uint32();
|
|
13205
|
+
switch (tag >>> 3) {
|
|
13206
|
+
case 1: {
|
|
13207
|
+
if (tag !== 8) {
|
|
13208
|
+
break;
|
|
13209
|
+
}
|
|
13210
|
+
message.currentPage = reader.uint32();
|
|
13211
|
+
continue;
|
|
13212
|
+
}
|
|
13213
|
+
case 2: {
|
|
13214
|
+
if (tag !== 16) {
|
|
13215
|
+
break;
|
|
13216
|
+
}
|
|
13217
|
+
message.from = reader.uint32();
|
|
13218
|
+
continue;
|
|
13219
|
+
}
|
|
13220
|
+
case 3: {
|
|
13221
|
+
if (tag !== 24) {
|
|
13222
|
+
break;
|
|
13223
|
+
}
|
|
13224
|
+
message.to = reader.uint32();
|
|
13225
|
+
continue;
|
|
13226
|
+
}
|
|
13227
|
+
case 4: {
|
|
13228
|
+
if (tag !== 32) {
|
|
13229
|
+
break;
|
|
13230
|
+
}
|
|
13231
|
+
message.lastPage = reader.uint32();
|
|
13232
|
+
continue;
|
|
13233
|
+
}
|
|
13234
|
+
case 5: {
|
|
13235
|
+
if (tag !== 40) {
|
|
13236
|
+
break;
|
|
13237
|
+
}
|
|
13238
|
+
message.perPage = reader.uint32();
|
|
13239
|
+
continue;
|
|
13240
|
+
}
|
|
13241
|
+
case 6: {
|
|
13242
|
+
if (tag !== 48) {
|
|
13243
|
+
break;
|
|
13244
|
+
}
|
|
13245
|
+
message.cost = Long.fromString(reader.sint64().toString());
|
|
13246
|
+
continue;
|
|
13247
|
+
}
|
|
13248
|
+
case 7: {
|
|
13249
|
+
if (tag !== 56) {
|
|
13250
|
+
break;
|
|
13251
|
+
}
|
|
13252
|
+
message.total = reader.uint32();
|
|
13253
|
+
continue;
|
|
13254
|
+
}
|
|
13255
|
+
case 8: {
|
|
13256
|
+
if (tag !== 66) {
|
|
13257
|
+
break;
|
|
13258
|
+
}
|
|
13259
|
+
message.data.push(WorkShift.decode(reader, reader.uint32()));
|
|
13260
|
+
continue;
|
|
13261
|
+
}
|
|
13262
|
+
}
|
|
13263
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
13264
|
+
break;
|
|
13265
|
+
}
|
|
13266
|
+
reader.skip(tag & 7);
|
|
13267
|
+
}
|
|
13268
|
+
return message;
|
|
13269
|
+
},
|
|
13270
|
+
create(base) {
|
|
13271
|
+
return WorkShiftIndexResponse.fromPartial(base ?? {});
|
|
13272
|
+
},
|
|
13273
|
+
fromPartial(object) {
|
|
13274
|
+
const message = createBaseWorkShiftIndexResponse();
|
|
13275
|
+
message.currentPage = object.currentPage ?? 0;
|
|
13276
|
+
message.from = object.from ?? 0;
|
|
13277
|
+
message.to = object.to ?? 0;
|
|
13278
|
+
message.lastPage = object.lastPage ?? 0;
|
|
13279
|
+
message.perPage = object.perPage ?? 0;
|
|
13280
|
+
message.cost = (object.cost !== undefined && object.cost !== null) ? Long.fromValue(object.cost) : Long.ZERO;
|
|
13281
|
+
message.total = object.total ?? 0;
|
|
13282
|
+
message.data = object.data?.map((e) => WorkShift.fromPartial(e)) || [];
|
|
13283
|
+
return message;
|
|
13284
|
+
},
|
|
13285
|
+
};
|
|
13286
|
+
function createBaseWorkShiftShowRequest() {
|
|
13287
|
+
return { id: Long.UZERO };
|
|
13288
|
+
}
|
|
13289
|
+
export const WorkShiftShowRequest = {
|
|
13290
|
+
encode(message, writer = new BinaryWriter()) {
|
|
13291
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
13292
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
13293
|
+
}
|
|
13294
|
+
return writer;
|
|
13295
|
+
},
|
|
13296
|
+
decode(input, length) {
|
|
13297
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
13298
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
13299
|
+
const message = createBaseWorkShiftShowRequest();
|
|
13300
|
+
while (reader.pos < end) {
|
|
13301
|
+
const tag = reader.uint32();
|
|
13302
|
+
switch (tag >>> 3) {
|
|
13303
|
+
case 1: {
|
|
13304
|
+
if (tag !== 8) {
|
|
13305
|
+
break;
|
|
13306
|
+
}
|
|
13307
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
13308
|
+
continue;
|
|
13309
|
+
}
|
|
13310
|
+
}
|
|
13311
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
13312
|
+
break;
|
|
13313
|
+
}
|
|
13314
|
+
reader.skip(tag & 7);
|
|
13315
|
+
}
|
|
13316
|
+
return message;
|
|
13317
|
+
},
|
|
13318
|
+
create(base) {
|
|
13319
|
+
return WorkShiftShowRequest.fromPartial(base ?? {});
|
|
13320
|
+
},
|
|
13321
|
+
fromPartial(object) {
|
|
13322
|
+
const message = createBaseWorkShiftShowRequest();
|
|
13323
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
13324
|
+
return message;
|
|
13325
|
+
},
|
|
13326
|
+
};
|
|
13327
|
+
function createBaseWorkShiftDestroyRequest() {
|
|
13328
|
+
return { id: Long.UZERO };
|
|
13329
|
+
}
|
|
13330
|
+
export const WorkShiftDestroyRequest = {
|
|
13331
|
+
encode(message, writer = new BinaryWriter()) {
|
|
13332
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
13333
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
13334
|
+
}
|
|
13335
|
+
return writer;
|
|
13336
|
+
},
|
|
13337
|
+
decode(input, length) {
|
|
13338
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
13339
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
13340
|
+
const message = createBaseWorkShiftDestroyRequest();
|
|
13341
|
+
while (reader.pos < end) {
|
|
13342
|
+
const tag = reader.uint32();
|
|
13343
|
+
switch (tag >>> 3) {
|
|
13344
|
+
case 1: {
|
|
13345
|
+
if (tag !== 8) {
|
|
13346
|
+
break;
|
|
13347
|
+
}
|
|
13348
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
13349
|
+
continue;
|
|
13350
|
+
}
|
|
13351
|
+
}
|
|
13352
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
13353
|
+
break;
|
|
13354
|
+
}
|
|
13355
|
+
reader.skip(tag & 7);
|
|
13356
|
+
}
|
|
13357
|
+
return message;
|
|
13358
|
+
},
|
|
13359
|
+
create(base) {
|
|
13360
|
+
return WorkShiftDestroyRequest.fromPartial(base ?? {});
|
|
13361
|
+
},
|
|
13362
|
+
fromPartial(object) {
|
|
13363
|
+
const message = createBaseWorkShiftDestroyRequest();
|
|
13364
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
13365
|
+
return message;
|
|
13366
|
+
},
|
|
13367
|
+
};
|
|
13368
|
+
function createBaseWorkShiftDestroyResponse() {
|
|
13369
|
+
return { deleted: false };
|
|
13370
|
+
}
|
|
13371
|
+
export const WorkShiftDestroyResponse = {
|
|
13372
|
+
encode(message, writer = new BinaryWriter()) {
|
|
13373
|
+
if (message.deleted !== false) {
|
|
13374
|
+
writer.uint32(8).bool(message.deleted);
|
|
13375
|
+
}
|
|
13376
|
+
return writer;
|
|
13377
|
+
},
|
|
13378
|
+
decode(input, length) {
|
|
13379
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
13380
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
13381
|
+
const message = createBaseWorkShiftDestroyResponse();
|
|
13382
|
+
while (reader.pos < end) {
|
|
13383
|
+
const tag = reader.uint32();
|
|
13384
|
+
switch (tag >>> 3) {
|
|
13385
|
+
case 1: {
|
|
13386
|
+
if (tag !== 8) {
|
|
13387
|
+
break;
|
|
13388
|
+
}
|
|
13389
|
+
message.deleted = reader.bool();
|
|
13390
|
+
continue;
|
|
13391
|
+
}
|
|
13392
|
+
}
|
|
13393
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
13394
|
+
break;
|
|
13395
|
+
}
|
|
13396
|
+
reader.skip(tag & 7);
|
|
13397
|
+
}
|
|
13398
|
+
return message;
|
|
13399
|
+
},
|
|
13400
|
+
create(base) {
|
|
13401
|
+
return WorkShiftDestroyResponse.fromPartial(base ?? {});
|
|
13402
|
+
},
|
|
13403
|
+
fromPartial(object) {
|
|
13404
|
+
const message = createBaseWorkShiftDestroyResponse();
|
|
13405
|
+
message.deleted = object.deleted ?? false;
|
|
13406
|
+
return message;
|
|
13407
|
+
},
|
|
13408
|
+
};
|
|
12677
13409
|
function toTimestamp(date) {
|
|
12678
13410
|
const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
|
|
12679
13411
|
const nanos = (date.getTime() % 1_000) * 1_000_000;
|