@fatehan/tsrp 1.6.75 → 1.6.78
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/apis/client.d.ts +111 -0
- package/dist/fatehan/apis/client.d.ts.map +1 -1
- package/dist/fatehan/apis/client.js +1168 -0
- package/dist/fatehan/devices/fleet.d.ts +516 -0
- package/dist/fatehan/devices/fleet.d.ts.map +1 -0
- package/dist/fatehan/devices/fleet.js +4193 -0
- package/dist/fatehan/devices/maintenance.d.ts +63 -0
- package/dist/fatehan/devices/maintenance.d.ts.map +1 -1
- package/dist/fatehan/devices/maintenance.js +648 -0
- package/dist/fatehan/identities/identities.d.ts +79 -0
- package/dist/fatehan/identities/identities.d.ts.map +1 -1
- package/dist/fatehan/identities/identities.js +79 -0
- package/dist/fatehan/services/api.d.ts +156 -1
- package/dist/fatehan/services/api.d.ts.map +1 -1
- package/dist/fatehan/services/api.js +2214 -445
- package/dist/fatehan/services/repositories.d.ts +18 -0
- package/dist/fatehan/services/repositories.d.ts.map +1 -1
- package/dist/fatehan/services/repositories.js +211 -0
- package/dist/services.d.ts +6 -1
- package/dist/services.d.ts.map +1 -1
- package/dist/services.js +16 -1
- package/package.json +1 -1
|
@@ -0,0 +1,4193 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.8
|
|
4
|
+
// protoc v7.34.1
|
|
5
|
+
// source: devices/fleet.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
import Long from "long";
|
|
9
|
+
import { Timestamp } from "../google/protobuf/timestamp";
|
|
10
|
+
export const protobufPackage = "com.fatehan.devices";
|
|
11
|
+
export var FleetDocumentType;
|
|
12
|
+
(function (FleetDocumentType) {
|
|
13
|
+
FleetDocumentType[FleetDocumentType["DOCUMENT_OTHER"] = 0] = "DOCUMENT_OTHER";
|
|
14
|
+
FleetDocumentType[FleetDocumentType["RECEIPT"] = 1] = "RECEIPT";
|
|
15
|
+
FleetDocumentType[FleetDocumentType["PHOTO"] = 2] = "PHOTO";
|
|
16
|
+
FleetDocumentType[FleetDocumentType["INSPECTION_REPORT"] = 3] = "INSPECTION_REPORT";
|
|
17
|
+
FleetDocumentType[FleetDocumentType["SIGNATURE"] = 4] = "SIGNATURE";
|
|
18
|
+
FleetDocumentType[FleetDocumentType["INSURANCE_THIRD_PARTY"] = 5] = "INSURANCE_THIRD_PARTY";
|
|
19
|
+
FleetDocumentType[FleetDocumentType["INSURANCE_BODY"] = 6] = "INSURANCE_BODY";
|
|
20
|
+
FleetDocumentType[FleetDocumentType["VEHICLE_CARD"] = 7] = "VEHICLE_CARD";
|
|
21
|
+
FleetDocumentType[FleetDocumentType["TECHNICAL_INSPECTION"] = 8] = "TECHNICAL_INSPECTION";
|
|
22
|
+
FleetDocumentType[FleetDocumentType["DRIVING_LICENCE"] = 9] = "DRIVING_LICENCE";
|
|
23
|
+
FleetDocumentType[FleetDocumentType["SERVICE_INVOICE"] = 10] = "SERVICE_INVOICE";
|
|
24
|
+
FleetDocumentType[FleetDocumentType["FINE_NOTICE"] = 11] = "FINE_NOTICE";
|
|
25
|
+
FleetDocumentType[FleetDocumentType["OWNERSHIP_DOCUMENT"] = 12] = "OWNERSHIP_DOCUMENT";
|
|
26
|
+
FleetDocumentType[FleetDocumentType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
27
|
+
})(FleetDocumentType || (FleetDocumentType = {}));
|
|
28
|
+
export var FleetSubjectType;
|
|
29
|
+
(function (FleetSubjectType) {
|
|
30
|
+
FleetSubjectType[FleetSubjectType["SUBJECT_NONE"] = 0] = "SUBJECT_NONE";
|
|
31
|
+
FleetSubjectType[FleetSubjectType["SUBJECT_DEVICE"] = 1] = "SUBJECT_DEVICE";
|
|
32
|
+
FleetSubjectType[FleetSubjectType["SUBJECT_CAR"] = 2] = "SUBJECT_CAR";
|
|
33
|
+
FleetSubjectType[FleetSubjectType["SUBJECT_DRIVER"] = 3] = "SUBJECT_DRIVER";
|
|
34
|
+
FleetSubjectType[FleetSubjectType["SUBJECT_VENDOR"] = 4] = "SUBJECT_VENDOR";
|
|
35
|
+
FleetSubjectType[FleetSubjectType["SUBJECT_EXPENSE"] = 5] = "SUBJECT_EXPENSE";
|
|
36
|
+
FleetSubjectType[FleetSubjectType["SUBJECT_ISSUE"] = 6] = "SUBJECT_ISSUE";
|
|
37
|
+
FleetSubjectType[FleetSubjectType["SUBJECT_MAINTENANCE"] = 7] = "SUBJECT_MAINTENANCE";
|
|
38
|
+
FleetSubjectType[FleetSubjectType["SUBJECT_INSPECTION"] = 8] = "SUBJECT_INSPECTION";
|
|
39
|
+
FleetSubjectType[FleetSubjectType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
40
|
+
})(FleetSubjectType || (FleetSubjectType = {}));
|
|
41
|
+
export var Expense_Type;
|
|
42
|
+
(function (Expense_Type) {
|
|
43
|
+
Expense_Type[Expense_Type["OTHER"] = 0] = "OTHER";
|
|
44
|
+
Expense_Type[Expense_Type["FUEL"] = 1] = "FUEL";
|
|
45
|
+
Expense_Type[Expense_Type["SERVICE"] = 2] = "SERVICE";
|
|
46
|
+
Expense_Type[Expense_Type["PARTS"] = 3] = "PARTS";
|
|
47
|
+
Expense_Type[Expense_Type["TOLL"] = 4] = "TOLL";
|
|
48
|
+
Expense_Type[Expense_Type["PARKING"] = 5] = "PARKING";
|
|
49
|
+
Expense_Type[Expense_Type["FINE"] = 6] = "FINE";
|
|
50
|
+
Expense_Type[Expense_Type["WASH"] = 7] = "WASH";
|
|
51
|
+
Expense_Type[Expense_Type["INSURANCE"] = 8] = "INSURANCE";
|
|
52
|
+
Expense_Type[Expense_Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
53
|
+
})(Expense_Type || (Expense_Type = {}));
|
|
54
|
+
export var Expense_Status;
|
|
55
|
+
(function (Expense_Status) {
|
|
56
|
+
Expense_Status[Expense_Status["DRAFT"] = 0] = "DRAFT";
|
|
57
|
+
Expense_Status[Expense_Status["SUBMITTED"] = 1] = "SUBMITTED";
|
|
58
|
+
Expense_Status[Expense_Status["RETURNED"] = 2] = "RETURNED";
|
|
59
|
+
Expense_Status[Expense_Status["APPROVED"] = 3] = "APPROVED";
|
|
60
|
+
Expense_Status[Expense_Status["REJECTED"] = 4] = "REJECTED";
|
|
61
|
+
Expense_Status[Expense_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
62
|
+
})(Expense_Status || (Expense_Status = {}));
|
|
63
|
+
export var Expense_Flag;
|
|
64
|
+
(function (Expense_Flag) {
|
|
65
|
+
Expense_Flag[Expense_Flag["FLAG_NONE"] = 0] = "FLAG_NONE";
|
|
66
|
+
Expense_Flag[Expense_Flag["LITRES_OVER_TANK"] = 1] = "LITRES_OVER_TANK";
|
|
67
|
+
Expense_Flag[Expense_Flag["FUEL_SENSOR_MISMATCH"] = 2] = "FUEL_SENSOR_MISMATCH";
|
|
68
|
+
Expense_Flag[Expense_Flag["UNIT_PRICE_HIGH"] = 3] = "UNIT_PRICE_HIGH";
|
|
69
|
+
Expense_Flag[Expense_Flag["OUTSIDE_VENDOR_RADIUS"] = 4] = "OUTSIDE_VENDOR_RADIUS";
|
|
70
|
+
Expense_Flag[Expense_Flag["POSSIBLE_DUPLICATE"] = 5] = "POSSIBLE_DUPLICATE";
|
|
71
|
+
Expense_Flag[Expense_Flag["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
72
|
+
})(Expense_Flag || (Expense_Flag = {}));
|
|
73
|
+
export var ExpenseExport_Format;
|
|
74
|
+
(function (ExpenseExport_Format) {
|
|
75
|
+
ExpenseExport_Format[ExpenseExport_Format["EXCEL"] = 0] = "EXCEL";
|
|
76
|
+
ExpenseExport_Format[ExpenseExport_Format["PDF"] = 1] = "PDF";
|
|
77
|
+
ExpenseExport_Format[ExpenseExport_Format["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
78
|
+
})(ExpenseExport_Format || (ExpenseExport_Format = {}));
|
|
79
|
+
export var ExpenseExport_Status;
|
|
80
|
+
(function (ExpenseExport_Status) {
|
|
81
|
+
ExpenseExport_Status[ExpenseExport_Status["QUEUED"] = 0] = "QUEUED";
|
|
82
|
+
ExpenseExport_Status[ExpenseExport_Status["RUNNING"] = 1] = "RUNNING";
|
|
83
|
+
ExpenseExport_Status[ExpenseExport_Status["READY"] = 2] = "READY";
|
|
84
|
+
ExpenseExport_Status[ExpenseExport_Status["FAILED"] = 3] = "FAILED";
|
|
85
|
+
ExpenseExport_Status[ExpenseExport_Status["EXPIRED"] = 4] = "EXPIRED";
|
|
86
|
+
ExpenseExport_Status[ExpenseExport_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
87
|
+
})(ExpenseExport_Status || (ExpenseExport_Status = {}));
|
|
88
|
+
export var Issue_Status;
|
|
89
|
+
(function (Issue_Status) {
|
|
90
|
+
Issue_Status[Issue_Status["PENDING"] = 0] = "PENDING";
|
|
91
|
+
Issue_Status[Issue_Status["ACCEPTED"] = 1] = "ACCEPTED";
|
|
92
|
+
Issue_Status[Issue_Status["REJECTED"] = 2] = "REJECTED";
|
|
93
|
+
Issue_Status[Issue_Status["RESOLVED"] = 3] = "RESOLVED";
|
|
94
|
+
Issue_Status[Issue_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
95
|
+
})(Issue_Status || (Issue_Status = {}));
|
|
96
|
+
export var Issue_Priority;
|
|
97
|
+
(function (Issue_Priority) {
|
|
98
|
+
Issue_Priority[Issue_Priority["LOW"] = 0] = "LOW";
|
|
99
|
+
Issue_Priority[Issue_Priority["MEDIUM"] = 1] = "MEDIUM";
|
|
100
|
+
Issue_Priority[Issue_Priority["HIGH"] = 2] = "HIGH";
|
|
101
|
+
Issue_Priority[Issue_Priority["CRITICAL"] = 3] = "CRITICAL";
|
|
102
|
+
Issue_Priority[Issue_Priority["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
103
|
+
})(Issue_Priority || (Issue_Priority = {}));
|
|
104
|
+
export var Issue_Source;
|
|
105
|
+
(function (Issue_Source) {
|
|
106
|
+
Issue_Source[Issue_Source["DRIVER"] = 0] = "DRIVER";
|
|
107
|
+
Issue_Source[Issue_Source["ADMIN"] = 1] = "ADMIN";
|
|
108
|
+
Issue_Source[Issue_Source["INSPECTION"] = 2] = "INSPECTION";
|
|
109
|
+
Issue_Source[Issue_Source["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
110
|
+
})(Issue_Source || (Issue_Source = {}));
|
|
111
|
+
export var InspectionTemplate_Schedule;
|
|
112
|
+
(function (InspectionTemplate_Schedule) {
|
|
113
|
+
InspectionTemplate_Schedule[InspectionTemplate_Schedule["MANUAL"] = 0] = "MANUAL";
|
|
114
|
+
InspectionTemplate_Schedule[InspectionTemplate_Schedule["FIRST_IGNITION_OF_DAY"] = 1] = "FIRST_IGNITION_OF_DAY";
|
|
115
|
+
InspectionTemplate_Schedule[InspectionTemplate_Schedule["EVERY_TRIP"] = 2] = "EVERY_TRIP";
|
|
116
|
+
InspectionTemplate_Schedule[InspectionTemplate_Schedule["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
117
|
+
})(InspectionTemplate_Schedule || (InspectionTemplate_Schedule = {}));
|
|
118
|
+
export var InspectionTemplate_Item_AnswerType;
|
|
119
|
+
(function (InspectionTemplate_Item_AnswerType) {
|
|
120
|
+
InspectionTemplate_Item_AnswerType[InspectionTemplate_Item_AnswerType["PASS_FAIL"] = 0] = "PASS_FAIL";
|
|
121
|
+
InspectionTemplate_Item_AnswerType[InspectionTemplate_Item_AnswerType["LEVEL"] = 1] = "LEVEL";
|
|
122
|
+
InspectionTemplate_Item_AnswerType[InspectionTemplate_Item_AnswerType["NUMBER"] = 2] = "NUMBER";
|
|
123
|
+
InspectionTemplate_Item_AnswerType[InspectionTemplate_Item_AnswerType["SIGNATURE"] = 3] = "SIGNATURE";
|
|
124
|
+
InspectionTemplate_Item_AnswerType[InspectionTemplate_Item_AnswerType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
125
|
+
})(InspectionTemplate_Item_AnswerType || (InspectionTemplate_Item_AnswerType = {}));
|
|
126
|
+
export var Inspection_Status;
|
|
127
|
+
(function (Inspection_Status) {
|
|
128
|
+
Inspection_Status[Inspection_Status["SUBMITTED"] = 0] = "SUBMITTED";
|
|
129
|
+
Inspection_Status[Inspection_Status["REVIEWED"] = 1] = "REVIEWED";
|
|
130
|
+
Inspection_Status[Inspection_Status["MISSED"] = 2] = "MISSED";
|
|
131
|
+
Inspection_Status[Inspection_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
132
|
+
})(Inspection_Status || (Inspection_Status = {}));
|
|
133
|
+
export var Inspection_Answer_Result;
|
|
134
|
+
(function (Inspection_Answer_Result) {
|
|
135
|
+
Inspection_Answer_Result[Inspection_Answer_Result["PASS"] = 0] = "PASS";
|
|
136
|
+
Inspection_Answer_Result[Inspection_Answer_Result["FAIL"] = 1] = "FAIL";
|
|
137
|
+
Inspection_Answer_Result[Inspection_Answer_Result["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
138
|
+
})(Inspection_Answer_Result || (Inspection_Answer_Result = {}));
|
|
139
|
+
export var OutOfService_Reason;
|
|
140
|
+
(function (OutOfService_Reason) {
|
|
141
|
+
OutOfService_Reason[OutOfService_Reason["MANUAL"] = 0] = "MANUAL";
|
|
142
|
+
OutOfService_Reason[OutOfService_Reason["ISSUE"] = 1] = "ISSUE";
|
|
143
|
+
OutOfService_Reason[OutOfService_Reason["INSPECTION"] = 2] = "INSPECTION";
|
|
144
|
+
OutOfService_Reason[OutOfService_Reason["SERVICE"] = 3] = "SERVICE";
|
|
145
|
+
OutOfService_Reason[OutOfService_Reason["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
146
|
+
})(OutOfService_Reason || (OutOfService_Reason = {}));
|
|
147
|
+
export var OutOfService_Status;
|
|
148
|
+
(function (OutOfService_Status) {
|
|
149
|
+
OutOfService_Status[OutOfService_Status["ACTIVE"] = 0] = "ACTIVE";
|
|
150
|
+
OutOfService_Status[OutOfService_Status["ENDED"] = 1] = "ENDED";
|
|
151
|
+
OutOfService_Status[OutOfService_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
152
|
+
})(OutOfService_Status || (OutOfService_Status = {}));
|
|
153
|
+
export var FleetDocument_Status;
|
|
154
|
+
(function (FleetDocument_Status) {
|
|
155
|
+
FleetDocument_Status[FleetDocument_Status["VALID"] = 0] = "VALID";
|
|
156
|
+
FleetDocument_Status[FleetDocument_Status["EXPIRING"] = 1] = "EXPIRING";
|
|
157
|
+
FleetDocument_Status[FleetDocument_Status["EXPIRED"] = 2] = "EXPIRED";
|
|
158
|
+
FleetDocument_Status[FleetDocument_Status["ARCHIVED"] = 3] = "ARCHIVED";
|
|
159
|
+
FleetDocument_Status[FleetDocument_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
160
|
+
})(FleetDocument_Status || (FleetDocument_Status = {}));
|
|
161
|
+
export var FleetDocument_Review;
|
|
162
|
+
(function (FleetDocument_Review) {
|
|
163
|
+
FleetDocument_Review[FleetDocument_Review["REVIEW_APPROVED"] = 0] = "REVIEW_APPROVED";
|
|
164
|
+
FleetDocument_Review[FleetDocument_Review["REVIEW_PENDING"] = 1] = "REVIEW_PENDING";
|
|
165
|
+
FleetDocument_Review[FleetDocument_Review["REVIEW_REJECTED"] = 2] = "REVIEW_REJECTED";
|
|
166
|
+
FleetDocument_Review[FleetDocument_Review["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
167
|
+
})(FleetDocument_Review || (FleetDocument_Review = {}));
|
|
168
|
+
export var DocumentRequirement_AppliesTo;
|
|
169
|
+
(function (DocumentRequirement_AppliesTo) {
|
|
170
|
+
DocumentRequirement_AppliesTo[DocumentRequirement_AppliesTo["VEHICLE"] = 0] = "VEHICLE";
|
|
171
|
+
DocumentRequirement_AppliesTo[DocumentRequirement_AppliesTo["DRIVER"] = 1] = "DRIVER";
|
|
172
|
+
DocumentRequirement_AppliesTo[DocumentRequirement_AppliesTo["DEVICE"] = 2] = "DEVICE";
|
|
173
|
+
DocumentRequirement_AppliesTo[DocumentRequirement_AppliesTo["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
174
|
+
})(DocumentRequirement_AppliesTo || (DocumentRequirement_AppliesTo = {}));
|
|
175
|
+
export var DocumentRequirement_Condition;
|
|
176
|
+
(function (DocumentRequirement_Condition) {
|
|
177
|
+
DocumentRequirement_Condition[DocumentRequirement_Condition["ALL"] = 0] = "ALL";
|
|
178
|
+
DocumentRequirement_Condition[DocumentRequirement_Condition["GROUP"] = 1] = "GROUP";
|
|
179
|
+
DocumentRequirement_Condition[DocumentRequirement_Condition["CAR_TYPE"] = 2] = "CAR_TYPE";
|
|
180
|
+
DocumentRequirement_Condition[DocumentRequirement_Condition["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
181
|
+
})(DocumentRequirement_Condition || (DocumentRequirement_Condition = {}));
|
|
182
|
+
export var DocumentRequirement_State;
|
|
183
|
+
(function (DocumentRequirement_State) {
|
|
184
|
+
DocumentRequirement_State[DocumentRequirement_State["MET"] = 0] = "MET";
|
|
185
|
+
DocumentRequirement_State[DocumentRequirement_State["MISSING"] = 1] = "MISSING";
|
|
186
|
+
DocumentRequirement_State[DocumentRequirement_State["DUE_SOON"] = 2] = "DUE_SOON";
|
|
187
|
+
DocumentRequirement_State[DocumentRequirement_State["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
188
|
+
})(DocumentRequirement_State || (DocumentRequirement_State = {}));
|
|
189
|
+
export var FleetInboxItem_Kind;
|
|
190
|
+
(function (FleetInboxItem_Kind) {
|
|
191
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["KIND_NONE"] = 0] = "KIND_NONE";
|
|
192
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["REVIEW_EXPENSE"] = 1] = "REVIEW_EXPENSE";
|
|
193
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["FIX_EXPENSE"] = 2] = "FIX_EXPENSE";
|
|
194
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["REVIEW_SERVICE"] = 3] = "REVIEW_SERVICE";
|
|
195
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["REVIEW_ISSUE"] = 4] = "REVIEW_ISSUE";
|
|
196
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["SERVICE_DUE"] = 5] = "SERVICE_DUE";
|
|
197
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["INSPECTION_DUE"] = 6] = "INSPECTION_DUE";
|
|
198
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["RENEW_DOCUMENT"] = 7] = "RENEW_DOCUMENT";
|
|
199
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["MISSING_DOCUMENT"] = 8] = "MISSING_DOCUMENT";
|
|
200
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["VEHICLE_OUT"] = 9] = "VEHICLE_OUT";
|
|
201
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["REVIEW_DOCUMENT"] = 10] = "REVIEW_DOCUMENT";
|
|
202
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["MISSED_INSPECTION"] = 11] = "MISSED_INSPECTION";
|
|
203
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["REVIEW_INSPECTION"] = 12] = "REVIEW_INSPECTION";
|
|
204
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["RECALIBRATE_ODOMETER"] = 13] = "RECALIBRATE_ODOMETER";
|
|
205
|
+
FleetInboxItem_Kind[FleetInboxItem_Kind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
206
|
+
})(FleetInboxItem_Kind || (FleetInboxItem_Kind = {}));
|
|
207
|
+
function createBaseFleetSettings() {
|
|
208
|
+
return {
|
|
209
|
+
fuelSensorGapPercent: 0,
|
|
210
|
+
unitPriceGapPercent: 0,
|
|
211
|
+
unitPriceWindowDays: 0,
|
|
212
|
+
duplicateWindowMinutes: 0,
|
|
213
|
+
odometerRecalibrationDays: 0,
|
|
214
|
+
visitMinStayMinutes: 0,
|
|
215
|
+
documentRemindDays: 0,
|
|
216
|
+
exportTtlDays: 0,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
export const FleetSettings = {
|
|
220
|
+
encode(message, writer = new BinaryWriter()) {
|
|
221
|
+
if (message.fuelSensorGapPercent !== 0) {
|
|
222
|
+
writer.uint32(8).uint32(message.fuelSensorGapPercent);
|
|
223
|
+
}
|
|
224
|
+
if (message.unitPriceGapPercent !== 0) {
|
|
225
|
+
writer.uint32(16).uint32(message.unitPriceGapPercent);
|
|
226
|
+
}
|
|
227
|
+
if (message.unitPriceWindowDays !== 0) {
|
|
228
|
+
writer.uint32(24).uint32(message.unitPriceWindowDays);
|
|
229
|
+
}
|
|
230
|
+
if (message.duplicateWindowMinutes !== 0) {
|
|
231
|
+
writer.uint32(32).uint32(message.duplicateWindowMinutes);
|
|
232
|
+
}
|
|
233
|
+
if (message.odometerRecalibrationDays !== 0) {
|
|
234
|
+
writer.uint32(40).uint32(message.odometerRecalibrationDays);
|
|
235
|
+
}
|
|
236
|
+
if (message.visitMinStayMinutes !== 0) {
|
|
237
|
+
writer.uint32(48).uint32(message.visitMinStayMinutes);
|
|
238
|
+
}
|
|
239
|
+
if (message.documentRemindDays !== 0) {
|
|
240
|
+
writer.uint32(56).uint32(message.documentRemindDays);
|
|
241
|
+
}
|
|
242
|
+
if (message.exportTtlDays !== 0) {
|
|
243
|
+
writer.uint32(64).uint32(message.exportTtlDays);
|
|
244
|
+
}
|
|
245
|
+
return writer;
|
|
246
|
+
},
|
|
247
|
+
decode(input, length) {
|
|
248
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
249
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
250
|
+
const message = createBaseFleetSettings();
|
|
251
|
+
while (reader.pos < end) {
|
|
252
|
+
const tag = reader.uint32();
|
|
253
|
+
switch (tag >>> 3) {
|
|
254
|
+
case 1: {
|
|
255
|
+
if (tag !== 8) {
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
message.fuelSensorGapPercent = reader.uint32();
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
case 2: {
|
|
262
|
+
if (tag !== 16) {
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
message.unitPriceGapPercent = reader.uint32();
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
case 3: {
|
|
269
|
+
if (tag !== 24) {
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
message.unitPriceWindowDays = reader.uint32();
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
case 4: {
|
|
276
|
+
if (tag !== 32) {
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
message.duplicateWindowMinutes = reader.uint32();
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
case 5: {
|
|
283
|
+
if (tag !== 40) {
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
message.odometerRecalibrationDays = reader.uint32();
|
|
287
|
+
continue;
|
|
288
|
+
}
|
|
289
|
+
case 6: {
|
|
290
|
+
if (tag !== 48) {
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
message.visitMinStayMinutes = reader.uint32();
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
case 7: {
|
|
297
|
+
if (tag !== 56) {
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
message.documentRemindDays = reader.uint32();
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
case 8: {
|
|
304
|
+
if (tag !== 64) {
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
message.exportTtlDays = reader.uint32();
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
reader.skip(tag & 7);
|
|
315
|
+
}
|
|
316
|
+
return message;
|
|
317
|
+
},
|
|
318
|
+
create(base) {
|
|
319
|
+
return FleetSettings.fromPartial(base ?? {});
|
|
320
|
+
},
|
|
321
|
+
fromPartial(object) {
|
|
322
|
+
const message = createBaseFleetSettings();
|
|
323
|
+
message.fuelSensorGapPercent = object.fuelSensorGapPercent ?? 0;
|
|
324
|
+
message.unitPriceGapPercent = object.unitPriceGapPercent ?? 0;
|
|
325
|
+
message.unitPriceWindowDays = object.unitPriceWindowDays ?? 0;
|
|
326
|
+
message.duplicateWindowMinutes = object.duplicateWindowMinutes ?? 0;
|
|
327
|
+
message.odometerRecalibrationDays = object.odometerRecalibrationDays ?? 0;
|
|
328
|
+
message.visitMinStayMinutes = object.visitMinStayMinutes ?? 0;
|
|
329
|
+
message.documentRemindDays = object.documentRemindDays ?? 0;
|
|
330
|
+
message.exportTtlDays = object.exportTtlDays ?? 0;
|
|
331
|
+
return message;
|
|
332
|
+
},
|
|
333
|
+
};
|
|
334
|
+
function createBaseOdometerOffset() {
|
|
335
|
+
return {
|
|
336
|
+
id: Long.UZERO,
|
|
337
|
+
deviceId: Long.UZERO,
|
|
338
|
+
organizationId: Long.UZERO,
|
|
339
|
+
offset: Long.ZERO,
|
|
340
|
+
effectiveFrom: undefined,
|
|
341
|
+
deviceOdometer: undefined,
|
|
342
|
+
realOdometer: undefined,
|
|
343
|
+
note: undefined,
|
|
344
|
+
createdBy: undefined,
|
|
345
|
+
createdAt: undefined,
|
|
346
|
+
updatedAt: undefined,
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
export const OdometerOffset = {
|
|
350
|
+
encode(message, writer = new BinaryWriter()) {
|
|
351
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
352
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
353
|
+
}
|
|
354
|
+
if (!message.deviceId.equals(Long.UZERO)) {
|
|
355
|
+
writer.uint32(16).uint64(message.deviceId.toString());
|
|
356
|
+
}
|
|
357
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
358
|
+
writer.uint32(24).uint64(message.organizationId.toString());
|
|
359
|
+
}
|
|
360
|
+
if (!message.offset.equals(Long.ZERO)) {
|
|
361
|
+
writer.uint32(32).int64(message.offset.toString());
|
|
362
|
+
}
|
|
363
|
+
if (message.effectiveFrom !== undefined) {
|
|
364
|
+
Timestamp.encode(toTimestamp(message.effectiveFrom), writer.uint32(42).fork()).join();
|
|
365
|
+
}
|
|
366
|
+
if (message.deviceOdometer !== undefined) {
|
|
367
|
+
writer.uint32(48).uint64(message.deviceOdometer.toString());
|
|
368
|
+
}
|
|
369
|
+
if (message.realOdometer !== undefined) {
|
|
370
|
+
writer.uint32(56).uint64(message.realOdometer.toString());
|
|
371
|
+
}
|
|
372
|
+
if (message.note !== undefined) {
|
|
373
|
+
writer.uint32(66).string(message.note);
|
|
374
|
+
}
|
|
375
|
+
if (message.createdBy !== undefined) {
|
|
376
|
+
writer.uint32(72).uint64(message.createdBy.toString());
|
|
377
|
+
}
|
|
378
|
+
if (message.createdAt !== undefined) {
|
|
379
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
|
|
380
|
+
}
|
|
381
|
+
if (message.updatedAt !== undefined) {
|
|
382
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
|
|
383
|
+
}
|
|
384
|
+
return writer;
|
|
385
|
+
},
|
|
386
|
+
decode(input, length) {
|
|
387
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
388
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
389
|
+
const message = createBaseOdometerOffset();
|
|
390
|
+
while (reader.pos < end) {
|
|
391
|
+
const tag = reader.uint32();
|
|
392
|
+
switch (tag >>> 3) {
|
|
393
|
+
case 1: {
|
|
394
|
+
if (tag !== 8) {
|
|
395
|
+
break;
|
|
396
|
+
}
|
|
397
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
case 2: {
|
|
401
|
+
if (tag !== 16) {
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
case 3: {
|
|
408
|
+
if (tag !== 24) {
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
case 4: {
|
|
415
|
+
if (tag !== 32) {
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
message.offset = Long.fromString(reader.int64().toString());
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
case 5: {
|
|
422
|
+
if (tag !== 42) {
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
message.effectiveFrom = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
426
|
+
continue;
|
|
427
|
+
}
|
|
428
|
+
case 6: {
|
|
429
|
+
if (tag !== 48) {
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
message.deviceOdometer = Long.fromString(reader.uint64().toString(), true);
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
435
|
+
case 7: {
|
|
436
|
+
if (tag !== 56) {
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
message.realOdometer = Long.fromString(reader.uint64().toString(), true);
|
|
440
|
+
continue;
|
|
441
|
+
}
|
|
442
|
+
case 8: {
|
|
443
|
+
if (tag !== 66) {
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
message.note = reader.string();
|
|
447
|
+
continue;
|
|
448
|
+
}
|
|
449
|
+
case 9: {
|
|
450
|
+
if (tag !== 72) {
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
case 10: {
|
|
457
|
+
if (tag !== 82) {
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
case 11: {
|
|
464
|
+
if (tag !== 90) {
|
|
465
|
+
break;
|
|
466
|
+
}
|
|
467
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
468
|
+
continue;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
472
|
+
break;
|
|
473
|
+
}
|
|
474
|
+
reader.skip(tag & 7);
|
|
475
|
+
}
|
|
476
|
+
return message;
|
|
477
|
+
},
|
|
478
|
+
create(base) {
|
|
479
|
+
return OdometerOffset.fromPartial(base ?? {});
|
|
480
|
+
},
|
|
481
|
+
fromPartial(object) {
|
|
482
|
+
const message = createBaseOdometerOffset();
|
|
483
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
484
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
485
|
+
? Long.fromValue(object.deviceId)
|
|
486
|
+
: Long.UZERO;
|
|
487
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
488
|
+
? Long.fromValue(object.organizationId)
|
|
489
|
+
: Long.UZERO;
|
|
490
|
+
message.offset = (object.offset !== undefined && object.offset !== null)
|
|
491
|
+
? Long.fromValue(object.offset)
|
|
492
|
+
: Long.ZERO;
|
|
493
|
+
message.effectiveFrom = object.effectiveFrom ?? undefined;
|
|
494
|
+
message.deviceOdometer = (object.deviceOdometer !== undefined && object.deviceOdometer !== null)
|
|
495
|
+
? Long.fromValue(object.deviceOdometer)
|
|
496
|
+
: undefined;
|
|
497
|
+
message.realOdometer = (object.realOdometer !== undefined && object.realOdometer !== null)
|
|
498
|
+
? Long.fromValue(object.realOdometer)
|
|
499
|
+
: undefined;
|
|
500
|
+
message.note = object.note ?? undefined;
|
|
501
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
502
|
+
? Long.fromValue(object.createdBy)
|
|
503
|
+
: undefined;
|
|
504
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
505
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
506
|
+
return message;
|
|
507
|
+
},
|
|
508
|
+
};
|
|
509
|
+
function createBaseVendorCategory() {
|
|
510
|
+
return {
|
|
511
|
+
id: Long.UZERO,
|
|
512
|
+
organizationId: Long.UZERO,
|
|
513
|
+
name: "",
|
|
514
|
+
sort: 0,
|
|
515
|
+
vendorsCount: undefined,
|
|
516
|
+
createdAt: undefined,
|
|
517
|
+
updatedAt: undefined,
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
export const VendorCategory = {
|
|
521
|
+
encode(message, writer = new BinaryWriter()) {
|
|
522
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
523
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
524
|
+
}
|
|
525
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
526
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
527
|
+
}
|
|
528
|
+
if (message.name !== "") {
|
|
529
|
+
writer.uint32(26).string(message.name);
|
|
530
|
+
}
|
|
531
|
+
if (message.sort !== 0) {
|
|
532
|
+
writer.uint32(32).int32(message.sort);
|
|
533
|
+
}
|
|
534
|
+
if (message.vendorsCount !== undefined) {
|
|
535
|
+
writer.uint32(40).uint32(message.vendorsCount);
|
|
536
|
+
}
|
|
537
|
+
if (message.createdAt !== undefined) {
|
|
538
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(50).fork()).join();
|
|
539
|
+
}
|
|
540
|
+
if (message.updatedAt !== undefined) {
|
|
541
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(58).fork()).join();
|
|
542
|
+
}
|
|
543
|
+
return writer;
|
|
544
|
+
},
|
|
545
|
+
decode(input, length) {
|
|
546
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
547
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
548
|
+
const message = createBaseVendorCategory();
|
|
549
|
+
while (reader.pos < end) {
|
|
550
|
+
const tag = reader.uint32();
|
|
551
|
+
switch (tag >>> 3) {
|
|
552
|
+
case 1: {
|
|
553
|
+
if (tag !== 8) {
|
|
554
|
+
break;
|
|
555
|
+
}
|
|
556
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
557
|
+
continue;
|
|
558
|
+
}
|
|
559
|
+
case 2: {
|
|
560
|
+
if (tag !== 16) {
|
|
561
|
+
break;
|
|
562
|
+
}
|
|
563
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
564
|
+
continue;
|
|
565
|
+
}
|
|
566
|
+
case 3: {
|
|
567
|
+
if (tag !== 26) {
|
|
568
|
+
break;
|
|
569
|
+
}
|
|
570
|
+
message.name = reader.string();
|
|
571
|
+
continue;
|
|
572
|
+
}
|
|
573
|
+
case 4: {
|
|
574
|
+
if (tag !== 32) {
|
|
575
|
+
break;
|
|
576
|
+
}
|
|
577
|
+
message.sort = reader.int32();
|
|
578
|
+
continue;
|
|
579
|
+
}
|
|
580
|
+
case 5: {
|
|
581
|
+
if (tag !== 40) {
|
|
582
|
+
break;
|
|
583
|
+
}
|
|
584
|
+
message.vendorsCount = reader.uint32();
|
|
585
|
+
continue;
|
|
586
|
+
}
|
|
587
|
+
case 6: {
|
|
588
|
+
if (tag !== 50) {
|
|
589
|
+
break;
|
|
590
|
+
}
|
|
591
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
592
|
+
continue;
|
|
593
|
+
}
|
|
594
|
+
case 7: {
|
|
595
|
+
if (tag !== 58) {
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
599
|
+
continue;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
603
|
+
break;
|
|
604
|
+
}
|
|
605
|
+
reader.skip(tag & 7);
|
|
606
|
+
}
|
|
607
|
+
return message;
|
|
608
|
+
},
|
|
609
|
+
create(base) {
|
|
610
|
+
return VendorCategory.fromPartial(base ?? {});
|
|
611
|
+
},
|
|
612
|
+
fromPartial(object) {
|
|
613
|
+
const message = createBaseVendorCategory();
|
|
614
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
615
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
616
|
+
? Long.fromValue(object.organizationId)
|
|
617
|
+
: Long.UZERO;
|
|
618
|
+
message.name = object.name ?? "";
|
|
619
|
+
message.sort = object.sort ?? 0;
|
|
620
|
+
message.vendorsCount = object.vendorsCount ?? undefined;
|
|
621
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
622
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
623
|
+
return message;
|
|
624
|
+
},
|
|
625
|
+
};
|
|
626
|
+
function createBaseVendor() {
|
|
627
|
+
return {
|
|
628
|
+
id: Long.UZERO,
|
|
629
|
+
organizationId: Long.UZERO,
|
|
630
|
+
name: "",
|
|
631
|
+
categoryIds: [],
|
|
632
|
+
contactPerson: undefined,
|
|
633
|
+
phones: [],
|
|
634
|
+
email: undefined,
|
|
635
|
+
website: undefined,
|
|
636
|
+
provinceId: undefined,
|
|
637
|
+
cityId: undefined,
|
|
638
|
+
postalCode: undefined,
|
|
639
|
+
address: undefined,
|
|
640
|
+
latitude: undefined,
|
|
641
|
+
longitude: undefined,
|
|
642
|
+
radiusM: 0,
|
|
643
|
+
notes: undefined,
|
|
644
|
+
isActive: false,
|
|
645
|
+
categories: [],
|
|
646
|
+
createdBy: undefined,
|
|
647
|
+
createdAt: undefined,
|
|
648
|
+
updatedAt: undefined,
|
|
649
|
+
visits: [],
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
export const Vendor = {
|
|
653
|
+
encode(message, writer = new BinaryWriter()) {
|
|
654
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
655
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
656
|
+
}
|
|
657
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
658
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
659
|
+
}
|
|
660
|
+
if (message.name !== "") {
|
|
661
|
+
writer.uint32(26).string(message.name);
|
|
662
|
+
}
|
|
663
|
+
writer.uint32(34).fork();
|
|
664
|
+
for (const v of message.categoryIds) {
|
|
665
|
+
writer.uint64(v.toString());
|
|
666
|
+
}
|
|
667
|
+
writer.join();
|
|
668
|
+
if (message.contactPerson !== undefined) {
|
|
669
|
+
writer.uint32(42).string(message.contactPerson);
|
|
670
|
+
}
|
|
671
|
+
for (const v of message.phones) {
|
|
672
|
+
writer.uint32(50).string(v);
|
|
673
|
+
}
|
|
674
|
+
if (message.email !== undefined) {
|
|
675
|
+
writer.uint32(58).string(message.email);
|
|
676
|
+
}
|
|
677
|
+
if (message.website !== undefined) {
|
|
678
|
+
writer.uint32(66).string(message.website);
|
|
679
|
+
}
|
|
680
|
+
if (message.provinceId !== undefined) {
|
|
681
|
+
writer.uint32(72).uint64(message.provinceId.toString());
|
|
682
|
+
}
|
|
683
|
+
if (message.cityId !== undefined) {
|
|
684
|
+
writer.uint32(80).uint64(message.cityId.toString());
|
|
685
|
+
}
|
|
686
|
+
if (message.postalCode !== undefined) {
|
|
687
|
+
writer.uint32(90).string(message.postalCode);
|
|
688
|
+
}
|
|
689
|
+
if (message.address !== undefined) {
|
|
690
|
+
writer.uint32(98).string(message.address);
|
|
691
|
+
}
|
|
692
|
+
if (message.latitude !== undefined) {
|
|
693
|
+
writer.uint32(105).double(message.latitude);
|
|
694
|
+
}
|
|
695
|
+
if (message.longitude !== undefined) {
|
|
696
|
+
writer.uint32(113).double(message.longitude);
|
|
697
|
+
}
|
|
698
|
+
if (message.radiusM !== 0) {
|
|
699
|
+
writer.uint32(120).uint32(message.radiusM);
|
|
700
|
+
}
|
|
701
|
+
if (message.notes !== undefined) {
|
|
702
|
+
writer.uint32(130).string(message.notes);
|
|
703
|
+
}
|
|
704
|
+
if (message.isActive !== false) {
|
|
705
|
+
writer.uint32(136).bool(message.isActive);
|
|
706
|
+
}
|
|
707
|
+
for (const v of message.categories) {
|
|
708
|
+
VendorCategory.encode(v, writer.uint32(146).fork()).join();
|
|
709
|
+
}
|
|
710
|
+
if (message.createdBy !== undefined) {
|
|
711
|
+
writer.uint32(152).uint64(message.createdBy.toString());
|
|
712
|
+
}
|
|
713
|
+
if (message.createdAt !== undefined) {
|
|
714
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(162).fork()).join();
|
|
715
|
+
}
|
|
716
|
+
if (message.updatedAt !== undefined) {
|
|
717
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(170).fork()).join();
|
|
718
|
+
}
|
|
719
|
+
for (const v of message.visits) {
|
|
720
|
+
VendorVisit.encode(v, writer.uint32(178).fork()).join();
|
|
721
|
+
}
|
|
722
|
+
return writer;
|
|
723
|
+
},
|
|
724
|
+
decode(input, length) {
|
|
725
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
726
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
727
|
+
const message = createBaseVendor();
|
|
728
|
+
while (reader.pos < end) {
|
|
729
|
+
const tag = reader.uint32();
|
|
730
|
+
switch (tag >>> 3) {
|
|
731
|
+
case 1: {
|
|
732
|
+
if (tag !== 8) {
|
|
733
|
+
break;
|
|
734
|
+
}
|
|
735
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
736
|
+
continue;
|
|
737
|
+
}
|
|
738
|
+
case 2: {
|
|
739
|
+
if (tag !== 16) {
|
|
740
|
+
break;
|
|
741
|
+
}
|
|
742
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
743
|
+
continue;
|
|
744
|
+
}
|
|
745
|
+
case 3: {
|
|
746
|
+
if (tag !== 26) {
|
|
747
|
+
break;
|
|
748
|
+
}
|
|
749
|
+
message.name = reader.string();
|
|
750
|
+
continue;
|
|
751
|
+
}
|
|
752
|
+
case 4: {
|
|
753
|
+
if (tag === 32) {
|
|
754
|
+
message.categoryIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
755
|
+
continue;
|
|
756
|
+
}
|
|
757
|
+
if (tag === 34) {
|
|
758
|
+
const end2 = reader.uint32() + reader.pos;
|
|
759
|
+
while (reader.pos < end2) {
|
|
760
|
+
message.categoryIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
761
|
+
}
|
|
762
|
+
continue;
|
|
763
|
+
}
|
|
764
|
+
break;
|
|
765
|
+
}
|
|
766
|
+
case 5: {
|
|
767
|
+
if (tag !== 42) {
|
|
768
|
+
break;
|
|
769
|
+
}
|
|
770
|
+
message.contactPerson = reader.string();
|
|
771
|
+
continue;
|
|
772
|
+
}
|
|
773
|
+
case 6: {
|
|
774
|
+
if (tag !== 50) {
|
|
775
|
+
break;
|
|
776
|
+
}
|
|
777
|
+
message.phones.push(reader.string());
|
|
778
|
+
continue;
|
|
779
|
+
}
|
|
780
|
+
case 7: {
|
|
781
|
+
if (tag !== 58) {
|
|
782
|
+
break;
|
|
783
|
+
}
|
|
784
|
+
message.email = reader.string();
|
|
785
|
+
continue;
|
|
786
|
+
}
|
|
787
|
+
case 8: {
|
|
788
|
+
if (tag !== 66) {
|
|
789
|
+
break;
|
|
790
|
+
}
|
|
791
|
+
message.website = reader.string();
|
|
792
|
+
continue;
|
|
793
|
+
}
|
|
794
|
+
case 9: {
|
|
795
|
+
if (tag !== 72) {
|
|
796
|
+
break;
|
|
797
|
+
}
|
|
798
|
+
message.provinceId = Long.fromString(reader.uint64().toString(), true);
|
|
799
|
+
continue;
|
|
800
|
+
}
|
|
801
|
+
case 10: {
|
|
802
|
+
if (tag !== 80) {
|
|
803
|
+
break;
|
|
804
|
+
}
|
|
805
|
+
message.cityId = Long.fromString(reader.uint64().toString(), true);
|
|
806
|
+
continue;
|
|
807
|
+
}
|
|
808
|
+
case 11: {
|
|
809
|
+
if (tag !== 90) {
|
|
810
|
+
break;
|
|
811
|
+
}
|
|
812
|
+
message.postalCode = reader.string();
|
|
813
|
+
continue;
|
|
814
|
+
}
|
|
815
|
+
case 12: {
|
|
816
|
+
if (tag !== 98) {
|
|
817
|
+
break;
|
|
818
|
+
}
|
|
819
|
+
message.address = reader.string();
|
|
820
|
+
continue;
|
|
821
|
+
}
|
|
822
|
+
case 13: {
|
|
823
|
+
if (tag !== 105) {
|
|
824
|
+
break;
|
|
825
|
+
}
|
|
826
|
+
message.latitude = reader.double();
|
|
827
|
+
continue;
|
|
828
|
+
}
|
|
829
|
+
case 14: {
|
|
830
|
+
if (tag !== 113) {
|
|
831
|
+
break;
|
|
832
|
+
}
|
|
833
|
+
message.longitude = reader.double();
|
|
834
|
+
continue;
|
|
835
|
+
}
|
|
836
|
+
case 15: {
|
|
837
|
+
if (tag !== 120) {
|
|
838
|
+
break;
|
|
839
|
+
}
|
|
840
|
+
message.radiusM = reader.uint32();
|
|
841
|
+
continue;
|
|
842
|
+
}
|
|
843
|
+
case 16: {
|
|
844
|
+
if (tag !== 130) {
|
|
845
|
+
break;
|
|
846
|
+
}
|
|
847
|
+
message.notes = reader.string();
|
|
848
|
+
continue;
|
|
849
|
+
}
|
|
850
|
+
case 17: {
|
|
851
|
+
if (tag !== 136) {
|
|
852
|
+
break;
|
|
853
|
+
}
|
|
854
|
+
message.isActive = reader.bool();
|
|
855
|
+
continue;
|
|
856
|
+
}
|
|
857
|
+
case 18: {
|
|
858
|
+
if (tag !== 146) {
|
|
859
|
+
break;
|
|
860
|
+
}
|
|
861
|
+
message.categories.push(VendorCategory.decode(reader, reader.uint32()));
|
|
862
|
+
continue;
|
|
863
|
+
}
|
|
864
|
+
case 19: {
|
|
865
|
+
if (tag !== 152) {
|
|
866
|
+
break;
|
|
867
|
+
}
|
|
868
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
869
|
+
continue;
|
|
870
|
+
}
|
|
871
|
+
case 20: {
|
|
872
|
+
if (tag !== 162) {
|
|
873
|
+
break;
|
|
874
|
+
}
|
|
875
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
876
|
+
continue;
|
|
877
|
+
}
|
|
878
|
+
case 21: {
|
|
879
|
+
if (tag !== 170) {
|
|
880
|
+
break;
|
|
881
|
+
}
|
|
882
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
883
|
+
continue;
|
|
884
|
+
}
|
|
885
|
+
case 22: {
|
|
886
|
+
if (tag !== 178) {
|
|
887
|
+
break;
|
|
888
|
+
}
|
|
889
|
+
message.visits.push(VendorVisit.decode(reader, reader.uint32()));
|
|
890
|
+
continue;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
894
|
+
break;
|
|
895
|
+
}
|
|
896
|
+
reader.skip(tag & 7);
|
|
897
|
+
}
|
|
898
|
+
return message;
|
|
899
|
+
},
|
|
900
|
+
create(base) {
|
|
901
|
+
return Vendor.fromPartial(base ?? {});
|
|
902
|
+
},
|
|
903
|
+
fromPartial(object) {
|
|
904
|
+
const message = createBaseVendor();
|
|
905
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
906
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
907
|
+
? Long.fromValue(object.organizationId)
|
|
908
|
+
: Long.UZERO;
|
|
909
|
+
message.name = object.name ?? "";
|
|
910
|
+
message.categoryIds = object.categoryIds?.map((e) => Long.fromValue(e)) || [];
|
|
911
|
+
message.contactPerson = object.contactPerson ?? undefined;
|
|
912
|
+
message.phones = object.phones?.map((e) => e) || [];
|
|
913
|
+
message.email = object.email ?? undefined;
|
|
914
|
+
message.website = object.website ?? undefined;
|
|
915
|
+
message.provinceId = (object.provinceId !== undefined && object.provinceId !== null)
|
|
916
|
+
? Long.fromValue(object.provinceId)
|
|
917
|
+
: undefined;
|
|
918
|
+
message.cityId = (object.cityId !== undefined && object.cityId !== null)
|
|
919
|
+
? Long.fromValue(object.cityId)
|
|
920
|
+
: undefined;
|
|
921
|
+
message.postalCode = object.postalCode ?? undefined;
|
|
922
|
+
message.address = object.address ?? undefined;
|
|
923
|
+
message.latitude = object.latitude ?? undefined;
|
|
924
|
+
message.longitude = object.longitude ?? undefined;
|
|
925
|
+
message.radiusM = object.radiusM ?? 0;
|
|
926
|
+
message.notes = object.notes ?? undefined;
|
|
927
|
+
message.isActive = object.isActive ?? false;
|
|
928
|
+
message.categories = object.categories?.map((e) => VendorCategory.fromPartial(e)) || [];
|
|
929
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
930
|
+
? Long.fromValue(object.createdBy)
|
|
931
|
+
: undefined;
|
|
932
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
933
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
934
|
+
message.visits = object.visits?.map((e) => VendorVisit.fromPartial(e)) || [];
|
|
935
|
+
return message;
|
|
936
|
+
},
|
|
937
|
+
};
|
|
938
|
+
function createBaseVendorVisit() {
|
|
939
|
+
return {
|
|
940
|
+
id: Long.UZERO,
|
|
941
|
+
vendorId: Long.UZERO,
|
|
942
|
+
deviceId: Long.UZERO,
|
|
943
|
+
organizationId: Long.UZERO,
|
|
944
|
+
enteredAt: undefined,
|
|
945
|
+
leftAt: undefined,
|
|
946
|
+
distanceM: 0,
|
|
947
|
+
maintenanceId: undefined,
|
|
948
|
+
};
|
|
949
|
+
}
|
|
950
|
+
export const VendorVisit = {
|
|
951
|
+
encode(message, writer = new BinaryWriter()) {
|
|
952
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
953
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
954
|
+
}
|
|
955
|
+
if (!message.vendorId.equals(Long.UZERO)) {
|
|
956
|
+
writer.uint32(16).uint64(message.vendorId.toString());
|
|
957
|
+
}
|
|
958
|
+
if (!message.deviceId.equals(Long.UZERO)) {
|
|
959
|
+
writer.uint32(24).uint64(message.deviceId.toString());
|
|
960
|
+
}
|
|
961
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
962
|
+
writer.uint32(32).uint64(message.organizationId.toString());
|
|
963
|
+
}
|
|
964
|
+
if (message.enteredAt !== undefined) {
|
|
965
|
+
Timestamp.encode(toTimestamp(message.enteredAt), writer.uint32(42).fork()).join();
|
|
966
|
+
}
|
|
967
|
+
if (message.leftAt !== undefined) {
|
|
968
|
+
Timestamp.encode(toTimestamp(message.leftAt), writer.uint32(50).fork()).join();
|
|
969
|
+
}
|
|
970
|
+
if (message.distanceM !== 0) {
|
|
971
|
+
writer.uint32(56).uint32(message.distanceM);
|
|
972
|
+
}
|
|
973
|
+
if (message.maintenanceId !== undefined) {
|
|
974
|
+
writer.uint32(64).uint64(message.maintenanceId.toString());
|
|
975
|
+
}
|
|
976
|
+
return writer;
|
|
977
|
+
},
|
|
978
|
+
decode(input, length) {
|
|
979
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
980
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
981
|
+
const message = createBaseVendorVisit();
|
|
982
|
+
while (reader.pos < end) {
|
|
983
|
+
const tag = reader.uint32();
|
|
984
|
+
switch (tag >>> 3) {
|
|
985
|
+
case 1: {
|
|
986
|
+
if (tag !== 8) {
|
|
987
|
+
break;
|
|
988
|
+
}
|
|
989
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
990
|
+
continue;
|
|
991
|
+
}
|
|
992
|
+
case 2: {
|
|
993
|
+
if (tag !== 16) {
|
|
994
|
+
break;
|
|
995
|
+
}
|
|
996
|
+
message.vendorId = Long.fromString(reader.uint64().toString(), true);
|
|
997
|
+
continue;
|
|
998
|
+
}
|
|
999
|
+
case 3: {
|
|
1000
|
+
if (tag !== 24) {
|
|
1001
|
+
break;
|
|
1002
|
+
}
|
|
1003
|
+
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
1004
|
+
continue;
|
|
1005
|
+
}
|
|
1006
|
+
case 4: {
|
|
1007
|
+
if (tag !== 32) {
|
|
1008
|
+
break;
|
|
1009
|
+
}
|
|
1010
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
1011
|
+
continue;
|
|
1012
|
+
}
|
|
1013
|
+
case 5: {
|
|
1014
|
+
if (tag !== 42) {
|
|
1015
|
+
break;
|
|
1016
|
+
}
|
|
1017
|
+
message.enteredAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1018
|
+
continue;
|
|
1019
|
+
}
|
|
1020
|
+
case 6: {
|
|
1021
|
+
if (tag !== 50) {
|
|
1022
|
+
break;
|
|
1023
|
+
}
|
|
1024
|
+
message.leftAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1025
|
+
continue;
|
|
1026
|
+
}
|
|
1027
|
+
case 7: {
|
|
1028
|
+
if (tag !== 56) {
|
|
1029
|
+
break;
|
|
1030
|
+
}
|
|
1031
|
+
message.distanceM = reader.uint32();
|
|
1032
|
+
continue;
|
|
1033
|
+
}
|
|
1034
|
+
case 8: {
|
|
1035
|
+
if (tag !== 64) {
|
|
1036
|
+
break;
|
|
1037
|
+
}
|
|
1038
|
+
message.maintenanceId = Long.fromString(reader.uint64().toString(), true);
|
|
1039
|
+
continue;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1043
|
+
break;
|
|
1044
|
+
}
|
|
1045
|
+
reader.skip(tag & 7);
|
|
1046
|
+
}
|
|
1047
|
+
return message;
|
|
1048
|
+
},
|
|
1049
|
+
create(base) {
|
|
1050
|
+
return VendorVisit.fromPartial(base ?? {});
|
|
1051
|
+
},
|
|
1052
|
+
fromPartial(object) {
|
|
1053
|
+
const message = createBaseVendorVisit();
|
|
1054
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
1055
|
+
message.vendorId = (object.vendorId !== undefined && object.vendorId !== null)
|
|
1056
|
+
? Long.fromValue(object.vendorId)
|
|
1057
|
+
: Long.UZERO;
|
|
1058
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
1059
|
+
? Long.fromValue(object.deviceId)
|
|
1060
|
+
: Long.UZERO;
|
|
1061
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
1062
|
+
? Long.fromValue(object.organizationId)
|
|
1063
|
+
: Long.UZERO;
|
|
1064
|
+
message.enteredAt = object.enteredAt ?? undefined;
|
|
1065
|
+
message.leftAt = object.leftAt ?? undefined;
|
|
1066
|
+
message.distanceM = object.distanceM ?? 0;
|
|
1067
|
+
message.maintenanceId = (object.maintenanceId !== undefined && object.maintenanceId !== null)
|
|
1068
|
+
? Long.fromValue(object.maintenanceId)
|
|
1069
|
+
: undefined;
|
|
1070
|
+
return message;
|
|
1071
|
+
},
|
|
1072
|
+
};
|
|
1073
|
+
function createBaseExpense() {
|
|
1074
|
+
return {
|
|
1075
|
+
id: Long.UZERO,
|
|
1076
|
+
organizationId: Long.UZERO,
|
|
1077
|
+
deviceId: Long.UZERO,
|
|
1078
|
+
type: 0,
|
|
1079
|
+
status: 0,
|
|
1080
|
+
vendorId: undefined,
|
|
1081
|
+
amount: 0,
|
|
1082
|
+
currencyId: undefined,
|
|
1083
|
+
occurredAt: undefined,
|
|
1084
|
+
odometer: undefined,
|
|
1085
|
+
litres: undefined,
|
|
1086
|
+
quantity: undefined,
|
|
1087
|
+
unitPrice: undefined,
|
|
1088
|
+
receiptFileId: undefined,
|
|
1089
|
+
latitude: undefined,
|
|
1090
|
+
longitude: undefined,
|
|
1091
|
+
flags: [],
|
|
1092
|
+
maintenanceId: undefined,
|
|
1093
|
+
driverId: undefined,
|
|
1094
|
+
title: undefined,
|
|
1095
|
+
description: undefined,
|
|
1096
|
+
coverageFrom: undefined,
|
|
1097
|
+
coverageTo: undefined,
|
|
1098
|
+
offenceAt: undefined,
|
|
1099
|
+
isPaid: undefined,
|
|
1100
|
+
paymentDeadline: undefined,
|
|
1101
|
+
nextChangeKm: undefined,
|
|
1102
|
+
reviewNote: undefined,
|
|
1103
|
+
reviewedBy: undefined,
|
|
1104
|
+
reviewedAt: undefined,
|
|
1105
|
+
clientUuid: undefined,
|
|
1106
|
+
createdBy: undefined,
|
|
1107
|
+
createdAt: undefined,
|
|
1108
|
+
updatedAt: undefined,
|
|
1109
|
+
vendor: undefined,
|
|
1110
|
+
receipt: undefined,
|
|
1111
|
+
fuelSensorLitres: undefined,
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
export const Expense = {
|
|
1115
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1116
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
1117
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
1118
|
+
}
|
|
1119
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
1120
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
1121
|
+
}
|
|
1122
|
+
if (!message.deviceId.equals(Long.UZERO)) {
|
|
1123
|
+
writer.uint32(24).uint64(message.deviceId.toString());
|
|
1124
|
+
}
|
|
1125
|
+
if (message.type !== 0) {
|
|
1126
|
+
writer.uint32(32).int32(message.type);
|
|
1127
|
+
}
|
|
1128
|
+
if (message.status !== 0) {
|
|
1129
|
+
writer.uint32(40).int32(message.status);
|
|
1130
|
+
}
|
|
1131
|
+
if (message.vendorId !== undefined) {
|
|
1132
|
+
writer.uint32(48).uint64(message.vendorId.toString());
|
|
1133
|
+
}
|
|
1134
|
+
if (message.amount !== 0) {
|
|
1135
|
+
writer.uint32(57).double(message.amount);
|
|
1136
|
+
}
|
|
1137
|
+
if (message.currencyId !== undefined) {
|
|
1138
|
+
writer.uint32(64).uint64(message.currencyId.toString());
|
|
1139
|
+
}
|
|
1140
|
+
if (message.occurredAt !== undefined) {
|
|
1141
|
+
Timestamp.encode(toTimestamp(message.occurredAt), writer.uint32(74).fork()).join();
|
|
1142
|
+
}
|
|
1143
|
+
if (message.odometer !== undefined) {
|
|
1144
|
+
writer.uint32(80).uint64(message.odometer.toString());
|
|
1145
|
+
}
|
|
1146
|
+
if (message.litres !== undefined) {
|
|
1147
|
+
writer.uint32(89).double(message.litres);
|
|
1148
|
+
}
|
|
1149
|
+
if (message.quantity !== undefined) {
|
|
1150
|
+
writer.uint32(97).double(message.quantity);
|
|
1151
|
+
}
|
|
1152
|
+
if (message.unitPrice !== undefined) {
|
|
1153
|
+
writer.uint32(105).double(message.unitPrice);
|
|
1154
|
+
}
|
|
1155
|
+
if (message.receiptFileId !== undefined) {
|
|
1156
|
+
writer.uint32(112).uint64(message.receiptFileId.toString());
|
|
1157
|
+
}
|
|
1158
|
+
if (message.latitude !== undefined) {
|
|
1159
|
+
writer.uint32(121).double(message.latitude);
|
|
1160
|
+
}
|
|
1161
|
+
if (message.longitude !== undefined) {
|
|
1162
|
+
writer.uint32(129).double(message.longitude);
|
|
1163
|
+
}
|
|
1164
|
+
writer.uint32(138).fork();
|
|
1165
|
+
for (const v of message.flags) {
|
|
1166
|
+
writer.int32(v);
|
|
1167
|
+
}
|
|
1168
|
+
writer.join();
|
|
1169
|
+
if (message.maintenanceId !== undefined) {
|
|
1170
|
+
writer.uint32(144).uint64(message.maintenanceId.toString());
|
|
1171
|
+
}
|
|
1172
|
+
if (message.driverId !== undefined) {
|
|
1173
|
+
writer.uint32(152).uint64(message.driverId.toString());
|
|
1174
|
+
}
|
|
1175
|
+
if (message.title !== undefined) {
|
|
1176
|
+
writer.uint32(162).string(message.title);
|
|
1177
|
+
}
|
|
1178
|
+
if (message.description !== undefined) {
|
|
1179
|
+
writer.uint32(170).string(message.description);
|
|
1180
|
+
}
|
|
1181
|
+
if (message.coverageFrom !== undefined) {
|
|
1182
|
+
Timestamp.encode(toTimestamp(message.coverageFrom), writer.uint32(178).fork()).join();
|
|
1183
|
+
}
|
|
1184
|
+
if (message.coverageTo !== undefined) {
|
|
1185
|
+
Timestamp.encode(toTimestamp(message.coverageTo), writer.uint32(186).fork()).join();
|
|
1186
|
+
}
|
|
1187
|
+
if (message.offenceAt !== undefined) {
|
|
1188
|
+
Timestamp.encode(toTimestamp(message.offenceAt), writer.uint32(194).fork()).join();
|
|
1189
|
+
}
|
|
1190
|
+
if (message.isPaid !== undefined) {
|
|
1191
|
+
writer.uint32(200).bool(message.isPaid);
|
|
1192
|
+
}
|
|
1193
|
+
if (message.paymentDeadline !== undefined) {
|
|
1194
|
+
Timestamp.encode(toTimestamp(message.paymentDeadline), writer.uint32(210).fork()).join();
|
|
1195
|
+
}
|
|
1196
|
+
if (message.nextChangeKm !== undefined) {
|
|
1197
|
+
writer.uint32(216).uint64(message.nextChangeKm.toString());
|
|
1198
|
+
}
|
|
1199
|
+
if (message.reviewNote !== undefined) {
|
|
1200
|
+
writer.uint32(226).string(message.reviewNote);
|
|
1201
|
+
}
|
|
1202
|
+
if (message.reviewedBy !== undefined) {
|
|
1203
|
+
writer.uint32(232).uint64(message.reviewedBy.toString());
|
|
1204
|
+
}
|
|
1205
|
+
if (message.reviewedAt !== undefined) {
|
|
1206
|
+
Timestamp.encode(toTimestamp(message.reviewedAt), writer.uint32(242).fork()).join();
|
|
1207
|
+
}
|
|
1208
|
+
if (message.clientUuid !== undefined) {
|
|
1209
|
+
writer.uint32(250).string(message.clientUuid);
|
|
1210
|
+
}
|
|
1211
|
+
if (message.createdBy !== undefined) {
|
|
1212
|
+
writer.uint32(256).uint64(message.createdBy.toString());
|
|
1213
|
+
}
|
|
1214
|
+
if (message.createdAt !== undefined) {
|
|
1215
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(266).fork()).join();
|
|
1216
|
+
}
|
|
1217
|
+
if (message.updatedAt !== undefined) {
|
|
1218
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(274).fork()).join();
|
|
1219
|
+
}
|
|
1220
|
+
if (message.vendor !== undefined) {
|
|
1221
|
+
Vendor.encode(message.vendor, writer.uint32(282).fork()).join();
|
|
1222
|
+
}
|
|
1223
|
+
if (message.receipt !== undefined) {
|
|
1224
|
+
FleetDocument.encode(message.receipt, writer.uint32(290).fork()).join();
|
|
1225
|
+
}
|
|
1226
|
+
if (message.fuelSensorLitres !== undefined) {
|
|
1227
|
+
writer.uint32(296).uint64(message.fuelSensorLitres.toString());
|
|
1228
|
+
}
|
|
1229
|
+
return writer;
|
|
1230
|
+
},
|
|
1231
|
+
decode(input, length) {
|
|
1232
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1233
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1234
|
+
const message = createBaseExpense();
|
|
1235
|
+
while (reader.pos < end) {
|
|
1236
|
+
const tag = reader.uint32();
|
|
1237
|
+
switch (tag >>> 3) {
|
|
1238
|
+
case 1: {
|
|
1239
|
+
if (tag !== 8) {
|
|
1240
|
+
break;
|
|
1241
|
+
}
|
|
1242
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
1243
|
+
continue;
|
|
1244
|
+
}
|
|
1245
|
+
case 2: {
|
|
1246
|
+
if (tag !== 16) {
|
|
1247
|
+
break;
|
|
1248
|
+
}
|
|
1249
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
1250
|
+
continue;
|
|
1251
|
+
}
|
|
1252
|
+
case 3: {
|
|
1253
|
+
if (tag !== 24) {
|
|
1254
|
+
break;
|
|
1255
|
+
}
|
|
1256
|
+
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
1257
|
+
continue;
|
|
1258
|
+
}
|
|
1259
|
+
case 4: {
|
|
1260
|
+
if (tag !== 32) {
|
|
1261
|
+
break;
|
|
1262
|
+
}
|
|
1263
|
+
message.type = reader.int32();
|
|
1264
|
+
continue;
|
|
1265
|
+
}
|
|
1266
|
+
case 5: {
|
|
1267
|
+
if (tag !== 40) {
|
|
1268
|
+
break;
|
|
1269
|
+
}
|
|
1270
|
+
message.status = reader.int32();
|
|
1271
|
+
continue;
|
|
1272
|
+
}
|
|
1273
|
+
case 6: {
|
|
1274
|
+
if (tag !== 48) {
|
|
1275
|
+
break;
|
|
1276
|
+
}
|
|
1277
|
+
message.vendorId = Long.fromString(reader.uint64().toString(), true);
|
|
1278
|
+
continue;
|
|
1279
|
+
}
|
|
1280
|
+
case 7: {
|
|
1281
|
+
if (tag !== 57) {
|
|
1282
|
+
break;
|
|
1283
|
+
}
|
|
1284
|
+
message.amount = reader.double();
|
|
1285
|
+
continue;
|
|
1286
|
+
}
|
|
1287
|
+
case 8: {
|
|
1288
|
+
if (tag !== 64) {
|
|
1289
|
+
break;
|
|
1290
|
+
}
|
|
1291
|
+
message.currencyId = Long.fromString(reader.uint64().toString(), true);
|
|
1292
|
+
continue;
|
|
1293
|
+
}
|
|
1294
|
+
case 9: {
|
|
1295
|
+
if (tag !== 74) {
|
|
1296
|
+
break;
|
|
1297
|
+
}
|
|
1298
|
+
message.occurredAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1299
|
+
continue;
|
|
1300
|
+
}
|
|
1301
|
+
case 10: {
|
|
1302
|
+
if (tag !== 80) {
|
|
1303
|
+
break;
|
|
1304
|
+
}
|
|
1305
|
+
message.odometer = Long.fromString(reader.uint64().toString(), true);
|
|
1306
|
+
continue;
|
|
1307
|
+
}
|
|
1308
|
+
case 11: {
|
|
1309
|
+
if (tag !== 89) {
|
|
1310
|
+
break;
|
|
1311
|
+
}
|
|
1312
|
+
message.litres = reader.double();
|
|
1313
|
+
continue;
|
|
1314
|
+
}
|
|
1315
|
+
case 12: {
|
|
1316
|
+
if (tag !== 97) {
|
|
1317
|
+
break;
|
|
1318
|
+
}
|
|
1319
|
+
message.quantity = reader.double();
|
|
1320
|
+
continue;
|
|
1321
|
+
}
|
|
1322
|
+
case 13: {
|
|
1323
|
+
if (tag !== 105) {
|
|
1324
|
+
break;
|
|
1325
|
+
}
|
|
1326
|
+
message.unitPrice = reader.double();
|
|
1327
|
+
continue;
|
|
1328
|
+
}
|
|
1329
|
+
case 14: {
|
|
1330
|
+
if (tag !== 112) {
|
|
1331
|
+
break;
|
|
1332
|
+
}
|
|
1333
|
+
message.receiptFileId = Long.fromString(reader.uint64().toString(), true);
|
|
1334
|
+
continue;
|
|
1335
|
+
}
|
|
1336
|
+
case 15: {
|
|
1337
|
+
if (tag !== 121) {
|
|
1338
|
+
break;
|
|
1339
|
+
}
|
|
1340
|
+
message.latitude = reader.double();
|
|
1341
|
+
continue;
|
|
1342
|
+
}
|
|
1343
|
+
case 16: {
|
|
1344
|
+
if (tag !== 129) {
|
|
1345
|
+
break;
|
|
1346
|
+
}
|
|
1347
|
+
message.longitude = reader.double();
|
|
1348
|
+
continue;
|
|
1349
|
+
}
|
|
1350
|
+
case 17: {
|
|
1351
|
+
if (tag === 136) {
|
|
1352
|
+
message.flags.push(reader.int32());
|
|
1353
|
+
continue;
|
|
1354
|
+
}
|
|
1355
|
+
if (tag === 138) {
|
|
1356
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1357
|
+
while (reader.pos < end2) {
|
|
1358
|
+
message.flags.push(reader.int32());
|
|
1359
|
+
}
|
|
1360
|
+
continue;
|
|
1361
|
+
}
|
|
1362
|
+
break;
|
|
1363
|
+
}
|
|
1364
|
+
case 18: {
|
|
1365
|
+
if (tag !== 144) {
|
|
1366
|
+
break;
|
|
1367
|
+
}
|
|
1368
|
+
message.maintenanceId = Long.fromString(reader.uint64().toString(), true);
|
|
1369
|
+
continue;
|
|
1370
|
+
}
|
|
1371
|
+
case 19: {
|
|
1372
|
+
if (tag !== 152) {
|
|
1373
|
+
break;
|
|
1374
|
+
}
|
|
1375
|
+
message.driverId = Long.fromString(reader.uint64().toString(), true);
|
|
1376
|
+
continue;
|
|
1377
|
+
}
|
|
1378
|
+
case 20: {
|
|
1379
|
+
if (tag !== 162) {
|
|
1380
|
+
break;
|
|
1381
|
+
}
|
|
1382
|
+
message.title = reader.string();
|
|
1383
|
+
continue;
|
|
1384
|
+
}
|
|
1385
|
+
case 21: {
|
|
1386
|
+
if (tag !== 170) {
|
|
1387
|
+
break;
|
|
1388
|
+
}
|
|
1389
|
+
message.description = reader.string();
|
|
1390
|
+
continue;
|
|
1391
|
+
}
|
|
1392
|
+
case 22: {
|
|
1393
|
+
if (tag !== 178) {
|
|
1394
|
+
break;
|
|
1395
|
+
}
|
|
1396
|
+
message.coverageFrom = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1397
|
+
continue;
|
|
1398
|
+
}
|
|
1399
|
+
case 23: {
|
|
1400
|
+
if (tag !== 186) {
|
|
1401
|
+
break;
|
|
1402
|
+
}
|
|
1403
|
+
message.coverageTo = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1404
|
+
continue;
|
|
1405
|
+
}
|
|
1406
|
+
case 24: {
|
|
1407
|
+
if (tag !== 194) {
|
|
1408
|
+
break;
|
|
1409
|
+
}
|
|
1410
|
+
message.offenceAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1411
|
+
continue;
|
|
1412
|
+
}
|
|
1413
|
+
case 25: {
|
|
1414
|
+
if (tag !== 200) {
|
|
1415
|
+
break;
|
|
1416
|
+
}
|
|
1417
|
+
message.isPaid = reader.bool();
|
|
1418
|
+
continue;
|
|
1419
|
+
}
|
|
1420
|
+
case 26: {
|
|
1421
|
+
if (tag !== 210) {
|
|
1422
|
+
break;
|
|
1423
|
+
}
|
|
1424
|
+
message.paymentDeadline = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1425
|
+
continue;
|
|
1426
|
+
}
|
|
1427
|
+
case 27: {
|
|
1428
|
+
if (tag !== 216) {
|
|
1429
|
+
break;
|
|
1430
|
+
}
|
|
1431
|
+
message.nextChangeKm = Long.fromString(reader.uint64().toString(), true);
|
|
1432
|
+
continue;
|
|
1433
|
+
}
|
|
1434
|
+
case 28: {
|
|
1435
|
+
if (tag !== 226) {
|
|
1436
|
+
break;
|
|
1437
|
+
}
|
|
1438
|
+
message.reviewNote = reader.string();
|
|
1439
|
+
continue;
|
|
1440
|
+
}
|
|
1441
|
+
case 29: {
|
|
1442
|
+
if (tag !== 232) {
|
|
1443
|
+
break;
|
|
1444
|
+
}
|
|
1445
|
+
message.reviewedBy = Long.fromString(reader.uint64().toString(), true);
|
|
1446
|
+
continue;
|
|
1447
|
+
}
|
|
1448
|
+
case 30: {
|
|
1449
|
+
if (tag !== 242) {
|
|
1450
|
+
break;
|
|
1451
|
+
}
|
|
1452
|
+
message.reviewedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1453
|
+
continue;
|
|
1454
|
+
}
|
|
1455
|
+
case 31: {
|
|
1456
|
+
if (tag !== 250) {
|
|
1457
|
+
break;
|
|
1458
|
+
}
|
|
1459
|
+
message.clientUuid = reader.string();
|
|
1460
|
+
continue;
|
|
1461
|
+
}
|
|
1462
|
+
case 32: {
|
|
1463
|
+
if (tag !== 256) {
|
|
1464
|
+
break;
|
|
1465
|
+
}
|
|
1466
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
1467
|
+
continue;
|
|
1468
|
+
}
|
|
1469
|
+
case 33: {
|
|
1470
|
+
if (tag !== 266) {
|
|
1471
|
+
break;
|
|
1472
|
+
}
|
|
1473
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1474
|
+
continue;
|
|
1475
|
+
}
|
|
1476
|
+
case 34: {
|
|
1477
|
+
if (tag !== 274) {
|
|
1478
|
+
break;
|
|
1479
|
+
}
|
|
1480
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1481
|
+
continue;
|
|
1482
|
+
}
|
|
1483
|
+
case 35: {
|
|
1484
|
+
if (tag !== 282) {
|
|
1485
|
+
break;
|
|
1486
|
+
}
|
|
1487
|
+
message.vendor = Vendor.decode(reader, reader.uint32());
|
|
1488
|
+
continue;
|
|
1489
|
+
}
|
|
1490
|
+
case 36: {
|
|
1491
|
+
if (tag !== 290) {
|
|
1492
|
+
break;
|
|
1493
|
+
}
|
|
1494
|
+
message.receipt = FleetDocument.decode(reader, reader.uint32());
|
|
1495
|
+
continue;
|
|
1496
|
+
}
|
|
1497
|
+
case 37: {
|
|
1498
|
+
if (tag !== 296) {
|
|
1499
|
+
break;
|
|
1500
|
+
}
|
|
1501
|
+
message.fuelSensorLitres = Long.fromString(reader.uint64().toString(), true);
|
|
1502
|
+
continue;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1506
|
+
break;
|
|
1507
|
+
}
|
|
1508
|
+
reader.skip(tag & 7);
|
|
1509
|
+
}
|
|
1510
|
+
return message;
|
|
1511
|
+
},
|
|
1512
|
+
create(base) {
|
|
1513
|
+
return Expense.fromPartial(base ?? {});
|
|
1514
|
+
},
|
|
1515
|
+
fromPartial(object) {
|
|
1516
|
+
const message = createBaseExpense();
|
|
1517
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
1518
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
1519
|
+
? Long.fromValue(object.organizationId)
|
|
1520
|
+
: Long.UZERO;
|
|
1521
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
1522
|
+
? Long.fromValue(object.deviceId)
|
|
1523
|
+
: Long.UZERO;
|
|
1524
|
+
message.type = object.type ?? 0;
|
|
1525
|
+
message.status = object.status ?? 0;
|
|
1526
|
+
message.vendorId = (object.vendorId !== undefined && object.vendorId !== null)
|
|
1527
|
+
? Long.fromValue(object.vendorId)
|
|
1528
|
+
: undefined;
|
|
1529
|
+
message.amount = object.amount ?? 0;
|
|
1530
|
+
message.currencyId = (object.currencyId !== undefined && object.currencyId !== null)
|
|
1531
|
+
? Long.fromValue(object.currencyId)
|
|
1532
|
+
: undefined;
|
|
1533
|
+
message.occurredAt = object.occurredAt ?? undefined;
|
|
1534
|
+
message.odometer = (object.odometer !== undefined && object.odometer !== null)
|
|
1535
|
+
? Long.fromValue(object.odometer)
|
|
1536
|
+
: undefined;
|
|
1537
|
+
message.litres = object.litres ?? undefined;
|
|
1538
|
+
message.quantity = object.quantity ?? undefined;
|
|
1539
|
+
message.unitPrice = object.unitPrice ?? undefined;
|
|
1540
|
+
message.receiptFileId = (object.receiptFileId !== undefined && object.receiptFileId !== null)
|
|
1541
|
+
? Long.fromValue(object.receiptFileId)
|
|
1542
|
+
: undefined;
|
|
1543
|
+
message.latitude = object.latitude ?? undefined;
|
|
1544
|
+
message.longitude = object.longitude ?? undefined;
|
|
1545
|
+
message.flags = object.flags?.map((e) => e) || [];
|
|
1546
|
+
message.maintenanceId = (object.maintenanceId !== undefined && object.maintenanceId !== null)
|
|
1547
|
+
? Long.fromValue(object.maintenanceId)
|
|
1548
|
+
: undefined;
|
|
1549
|
+
message.driverId = (object.driverId !== undefined && object.driverId !== null)
|
|
1550
|
+
? Long.fromValue(object.driverId)
|
|
1551
|
+
: undefined;
|
|
1552
|
+
message.title = object.title ?? undefined;
|
|
1553
|
+
message.description = object.description ?? undefined;
|
|
1554
|
+
message.coverageFrom = object.coverageFrom ?? undefined;
|
|
1555
|
+
message.coverageTo = object.coverageTo ?? undefined;
|
|
1556
|
+
message.offenceAt = object.offenceAt ?? undefined;
|
|
1557
|
+
message.isPaid = object.isPaid ?? undefined;
|
|
1558
|
+
message.paymentDeadline = object.paymentDeadline ?? undefined;
|
|
1559
|
+
message.nextChangeKm = (object.nextChangeKm !== undefined && object.nextChangeKm !== null)
|
|
1560
|
+
? Long.fromValue(object.nextChangeKm)
|
|
1561
|
+
: undefined;
|
|
1562
|
+
message.reviewNote = object.reviewNote ?? undefined;
|
|
1563
|
+
message.reviewedBy = (object.reviewedBy !== undefined && object.reviewedBy !== null)
|
|
1564
|
+
? Long.fromValue(object.reviewedBy)
|
|
1565
|
+
: undefined;
|
|
1566
|
+
message.reviewedAt = object.reviewedAt ?? undefined;
|
|
1567
|
+
message.clientUuid = object.clientUuid ?? undefined;
|
|
1568
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
1569
|
+
? Long.fromValue(object.createdBy)
|
|
1570
|
+
: undefined;
|
|
1571
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
1572
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
1573
|
+
message.vendor = (object.vendor !== undefined && object.vendor !== null)
|
|
1574
|
+
? Vendor.fromPartial(object.vendor)
|
|
1575
|
+
: undefined;
|
|
1576
|
+
message.receipt = (object.receipt !== undefined && object.receipt !== null)
|
|
1577
|
+
? FleetDocument.fromPartial(object.receipt)
|
|
1578
|
+
: undefined;
|
|
1579
|
+
message.fuelSensorLitres = (object.fuelSensorLitres !== undefined && object.fuelSensorLitres !== null)
|
|
1580
|
+
? Long.fromValue(object.fuelSensorLitres)
|
|
1581
|
+
: undefined;
|
|
1582
|
+
return message;
|
|
1583
|
+
},
|
|
1584
|
+
};
|
|
1585
|
+
function createBaseExpenseExport() {
|
|
1586
|
+
return {
|
|
1587
|
+
id: Long.UZERO,
|
|
1588
|
+
organizationId: Long.UZERO,
|
|
1589
|
+
format: 0,
|
|
1590
|
+
status: 0,
|
|
1591
|
+
filters: "",
|
|
1592
|
+
error: undefined,
|
|
1593
|
+
expiresAt: undefined,
|
|
1594
|
+
createdBy: undefined,
|
|
1595
|
+
createdAt: undefined,
|
|
1596
|
+
updatedAt: undefined,
|
|
1597
|
+
};
|
|
1598
|
+
}
|
|
1599
|
+
export const ExpenseExport = {
|
|
1600
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1601
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
1602
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
1603
|
+
}
|
|
1604
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
1605
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
1606
|
+
}
|
|
1607
|
+
if (message.format !== 0) {
|
|
1608
|
+
writer.uint32(24).int32(message.format);
|
|
1609
|
+
}
|
|
1610
|
+
if (message.status !== 0) {
|
|
1611
|
+
writer.uint32(32).int32(message.status);
|
|
1612
|
+
}
|
|
1613
|
+
if (message.filters !== "") {
|
|
1614
|
+
writer.uint32(42).string(message.filters);
|
|
1615
|
+
}
|
|
1616
|
+
if (message.error !== undefined) {
|
|
1617
|
+
writer.uint32(50).string(message.error);
|
|
1618
|
+
}
|
|
1619
|
+
if (message.expiresAt !== undefined) {
|
|
1620
|
+
Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(58).fork()).join();
|
|
1621
|
+
}
|
|
1622
|
+
if (message.createdBy !== undefined) {
|
|
1623
|
+
writer.uint32(64).uint64(message.createdBy.toString());
|
|
1624
|
+
}
|
|
1625
|
+
if (message.createdAt !== undefined) {
|
|
1626
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(74).fork()).join();
|
|
1627
|
+
}
|
|
1628
|
+
if (message.updatedAt !== undefined) {
|
|
1629
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(82).fork()).join();
|
|
1630
|
+
}
|
|
1631
|
+
return writer;
|
|
1632
|
+
},
|
|
1633
|
+
decode(input, length) {
|
|
1634
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1635
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1636
|
+
const message = createBaseExpenseExport();
|
|
1637
|
+
while (reader.pos < end) {
|
|
1638
|
+
const tag = reader.uint32();
|
|
1639
|
+
switch (tag >>> 3) {
|
|
1640
|
+
case 1: {
|
|
1641
|
+
if (tag !== 8) {
|
|
1642
|
+
break;
|
|
1643
|
+
}
|
|
1644
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
1645
|
+
continue;
|
|
1646
|
+
}
|
|
1647
|
+
case 2: {
|
|
1648
|
+
if (tag !== 16) {
|
|
1649
|
+
break;
|
|
1650
|
+
}
|
|
1651
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
1652
|
+
continue;
|
|
1653
|
+
}
|
|
1654
|
+
case 3: {
|
|
1655
|
+
if (tag !== 24) {
|
|
1656
|
+
break;
|
|
1657
|
+
}
|
|
1658
|
+
message.format = reader.int32();
|
|
1659
|
+
continue;
|
|
1660
|
+
}
|
|
1661
|
+
case 4: {
|
|
1662
|
+
if (tag !== 32) {
|
|
1663
|
+
break;
|
|
1664
|
+
}
|
|
1665
|
+
message.status = reader.int32();
|
|
1666
|
+
continue;
|
|
1667
|
+
}
|
|
1668
|
+
case 5: {
|
|
1669
|
+
if (tag !== 42) {
|
|
1670
|
+
break;
|
|
1671
|
+
}
|
|
1672
|
+
message.filters = reader.string();
|
|
1673
|
+
continue;
|
|
1674
|
+
}
|
|
1675
|
+
case 6: {
|
|
1676
|
+
if (tag !== 50) {
|
|
1677
|
+
break;
|
|
1678
|
+
}
|
|
1679
|
+
message.error = reader.string();
|
|
1680
|
+
continue;
|
|
1681
|
+
}
|
|
1682
|
+
case 7: {
|
|
1683
|
+
if (tag !== 58) {
|
|
1684
|
+
break;
|
|
1685
|
+
}
|
|
1686
|
+
message.expiresAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1687
|
+
continue;
|
|
1688
|
+
}
|
|
1689
|
+
case 8: {
|
|
1690
|
+
if (tag !== 64) {
|
|
1691
|
+
break;
|
|
1692
|
+
}
|
|
1693
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
1694
|
+
continue;
|
|
1695
|
+
}
|
|
1696
|
+
case 9: {
|
|
1697
|
+
if (tag !== 74) {
|
|
1698
|
+
break;
|
|
1699
|
+
}
|
|
1700
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1701
|
+
continue;
|
|
1702
|
+
}
|
|
1703
|
+
case 10: {
|
|
1704
|
+
if (tag !== 82) {
|
|
1705
|
+
break;
|
|
1706
|
+
}
|
|
1707
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1708
|
+
continue;
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1712
|
+
break;
|
|
1713
|
+
}
|
|
1714
|
+
reader.skip(tag & 7);
|
|
1715
|
+
}
|
|
1716
|
+
return message;
|
|
1717
|
+
},
|
|
1718
|
+
create(base) {
|
|
1719
|
+
return ExpenseExport.fromPartial(base ?? {});
|
|
1720
|
+
},
|
|
1721
|
+
fromPartial(object) {
|
|
1722
|
+
const message = createBaseExpenseExport();
|
|
1723
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
1724
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
1725
|
+
? Long.fromValue(object.organizationId)
|
|
1726
|
+
: Long.UZERO;
|
|
1727
|
+
message.format = object.format ?? 0;
|
|
1728
|
+
message.status = object.status ?? 0;
|
|
1729
|
+
message.filters = object.filters ?? "";
|
|
1730
|
+
message.error = object.error ?? undefined;
|
|
1731
|
+
message.expiresAt = object.expiresAt ?? undefined;
|
|
1732
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
1733
|
+
? Long.fromValue(object.createdBy)
|
|
1734
|
+
: undefined;
|
|
1735
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
1736
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
1737
|
+
return message;
|
|
1738
|
+
},
|
|
1739
|
+
};
|
|
1740
|
+
function createBaseServiceProgram() {
|
|
1741
|
+
return {
|
|
1742
|
+
id: Long.UZERO,
|
|
1743
|
+
organizationId: Long.UZERO,
|
|
1744
|
+
name: "",
|
|
1745
|
+
serviceIds: [],
|
|
1746
|
+
deviceIds: [],
|
|
1747
|
+
isActive: false,
|
|
1748
|
+
description: undefined,
|
|
1749
|
+
createdBy: undefined,
|
|
1750
|
+
createdAt: undefined,
|
|
1751
|
+
updatedAt: undefined,
|
|
1752
|
+
};
|
|
1753
|
+
}
|
|
1754
|
+
export const ServiceProgram = {
|
|
1755
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1756
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
1757
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
1758
|
+
}
|
|
1759
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
1760
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
1761
|
+
}
|
|
1762
|
+
if (message.name !== "") {
|
|
1763
|
+
writer.uint32(26).string(message.name);
|
|
1764
|
+
}
|
|
1765
|
+
writer.uint32(34).fork();
|
|
1766
|
+
for (const v of message.serviceIds) {
|
|
1767
|
+
writer.uint64(v.toString());
|
|
1768
|
+
}
|
|
1769
|
+
writer.join();
|
|
1770
|
+
writer.uint32(42).fork();
|
|
1771
|
+
for (const v of message.deviceIds) {
|
|
1772
|
+
writer.uint64(v.toString());
|
|
1773
|
+
}
|
|
1774
|
+
writer.join();
|
|
1775
|
+
if (message.isActive !== false) {
|
|
1776
|
+
writer.uint32(48).bool(message.isActive);
|
|
1777
|
+
}
|
|
1778
|
+
if (message.description !== undefined) {
|
|
1779
|
+
writer.uint32(58).string(message.description);
|
|
1780
|
+
}
|
|
1781
|
+
if (message.createdBy !== undefined) {
|
|
1782
|
+
writer.uint32(64).uint64(message.createdBy.toString());
|
|
1783
|
+
}
|
|
1784
|
+
if (message.createdAt !== undefined) {
|
|
1785
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(74).fork()).join();
|
|
1786
|
+
}
|
|
1787
|
+
if (message.updatedAt !== undefined) {
|
|
1788
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(82).fork()).join();
|
|
1789
|
+
}
|
|
1790
|
+
return writer;
|
|
1791
|
+
},
|
|
1792
|
+
decode(input, length) {
|
|
1793
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1794
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1795
|
+
const message = createBaseServiceProgram();
|
|
1796
|
+
while (reader.pos < end) {
|
|
1797
|
+
const tag = reader.uint32();
|
|
1798
|
+
switch (tag >>> 3) {
|
|
1799
|
+
case 1: {
|
|
1800
|
+
if (tag !== 8) {
|
|
1801
|
+
break;
|
|
1802
|
+
}
|
|
1803
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
1804
|
+
continue;
|
|
1805
|
+
}
|
|
1806
|
+
case 2: {
|
|
1807
|
+
if (tag !== 16) {
|
|
1808
|
+
break;
|
|
1809
|
+
}
|
|
1810
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
1811
|
+
continue;
|
|
1812
|
+
}
|
|
1813
|
+
case 3: {
|
|
1814
|
+
if (tag !== 26) {
|
|
1815
|
+
break;
|
|
1816
|
+
}
|
|
1817
|
+
message.name = reader.string();
|
|
1818
|
+
continue;
|
|
1819
|
+
}
|
|
1820
|
+
case 4: {
|
|
1821
|
+
if (tag === 32) {
|
|
1822
|
+
message.serviceIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
1823
|
+
continue;
|
|
1824
|
+
}
|
|
1825
|
+
if (tag === 34) {
|
|
1826
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1827
|
+
while (reader.pos < end2) {
|
|
1828
|
+
message.serviceIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
1829
|
+
}
|
|
1830
|
+
continue;
|
|
1831
|
+
}
|
|
1832
|
+
break;
|
|
1833
|
+
}
|
|
1834
|
+
case 5: {
|
|
1835
|
+
if (tag === 40) {
|
|
1836
|
+
message.deviceIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
1837
|
+
continue;
|
|
1838
|
+
}
|
|
1839
|
+
if (tag === 42) {
|
|
1840
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1841
|
+
while (reader.pos < end2) {
|
|
1842
|
+
message.deviceIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
1843
|
+
}
|
|
1844
|
+
continue;
|
|
1845
|
+
}
|
|
1846
|
+
break;
|
|
1847
|
+
}
|
|
1848
|
+
case 6: {
|
|
1849
|
+
if (tag !== 48) {
|
|
1850
|
+
break;
|
|
1851
|
+
}
|
|
1852
|
+
message.isActive = reader.bool();
|
|
1853
|
+
continue;
|
|
1854
|
+
}
|
|
1855
|
+
case 7: {
|
|
1856
|
+
if (tag !== 58) {
|
|
1857
|
+
break;
|
|
1858
|
+
}
|
|
1859
|
+
message.description = reader.string();
|
|
1860
|
+
continue;
|
|
1861
|
+
}
|
|
1862
|
+
case 8: {
|
|
1863
|
+
if (tag !== 64) {
|
|
1864
|
+
break;
|
|
1865
|
+
}
|
|
1866
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
1867
|
+
continue;
|
|
1868
|
+
}
|
|
1869
|
+
case 9: {
|
|
1870
|
+
if (tag !== 74) {
|
|
1871
|
+
break;
|
|
1872
|
+
}
|
|
1873
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1874
|
+
continue;
|
|
1875
|
+
}
|
|
1876
|
+
case 10: {
|
|
1877
|
+
if (tag !== 82) {
|
|
1878
|
+
break;
|
|
1879
|
+
}
|
|
1880
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1881
|
+
continue;
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1885
|
+
break;
|
|
1886
|
+
}
|
|
1887
|
+
reader.skip(tag & 7);
|
|
1888
|
+
}
|
|
1889
|
+
return message;
|
|
1890
|
+
},
|
|
1891
|
+
create(base) {
|
|
1892
|
+
return ServiceProgram.fromPartial(base ?? {});
|
|
1893
|
+
},
|
|
1894
|
+
fromPartial(object) {
|
|
1895
|
+
const message = createBaseServiceProgram();
|
|
1896
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
1897
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
1898
|
+
? Long.fromValue(object.organizationId)
|
|
1899
|
+
: Long.UZERO;
|
|
1900
|
+
message.name = object.name ?? "";
|
|
1901
|
+
message.serviceIds = object.serviceIds?.map((e) => Long.fromValue(e)) || [];
|
|
1902
|
+
message.deviceIds = object.deviceIds?.map((e) => Long.fromValue(e)) || [];
|
|
1903
|
+
message.isActive = object.isActive ?? false;
|
|
1904
|
+
message.description = object.description ?? undefined;
|
|
1905
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
1906
|
+
? Long.fromValue(object.createdBy)
|
|
1907
|
+
: undefined;
|
|
1908
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
1909
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
1910
|
+
return message;
|
|
1911
|
+
},
|
|
1912
|
+
};
|
|
1913
|
+
function createBaseIssue() {
|
|
1914
|
+
return {
|
|
1915
|
+
id: Long.UZERO,
|
|
1916
|
+
organizationId: Long.UZERO,
|
|
1917
|
+
deviceId: Long.UZERO,
|
|
1918
|
+
title: "",
|
|
1919
|
+
description: undefined,
|
|
1920
|
+
category: undefined,
|
|
1921
|
+
priority: 0,
|
|
1922
|
+
status: 0,
|
|
1923
|
+
source: 0,
|
|
1924
|
+
cantDrive: false,
|
|
1925
|
+
serviceId: undefined,
|
|
1926
|
+
maintenanceId: undefined,
|
|
1927
|
+
inspectionId: undefined,
|
|
1928
|
+
parentId: undefined,
|
|
1929
|
+
rejectionReason: undefined,
|
|
1930
|
+
reviewedBy: undefined,
|
|
1931
|
+
reviewedAt: undefined,
|
|
1932
|
+
resolvedAt: undefined,
|
|
1933
|
+
files: [],
|
|
1934
|
+
clientUuid: undefined,
|
|
1935
|
+
createdBy: undefined,
|
|
1936
|
+
createdAt: undefined,
|
|
1937
|
+
updatedAt: undefined,
|
|
1938
|
+
related: [],
|
|
1939
|
+
};
|
|
1940
|
+
}
|
|
1941
|
+
export const Issue = {
|
|
1942
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1943
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
1944
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
1945
|
+
}
|
|
1946
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
1947
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
1948
|
+
}
|
|
1949
|
+
if (!message.deviceId.equals(Long.UZERO)) {
|
|
1950
|
+
writer.uint32(24).uint64(message.deviceId.toString());
|
|
1951
|
+
}
|
|
1952
|
+
if (message.title !== "") {
|
|
1953
|
+
writer.uint32(34).string(message.title);
|
|
1954
|
+
}
|
|
1955
|
+
if (message.description !== undefined) {
|
|
1956
|
+
writer.uint32(42).string(message.description);
|
|
1957
|
+
}
|
|
1958
|
+
if (message.category !== undefined) {
|
|
1959
|
+
writer.uint32(50).string(message.category);
|
|
1960
|
+
}
|
|
1961
|
+
if (message.priority !== 0) {
|
|
1962
|
+
writer.uint32(56).int32(message.priority);
|
|
1963
|
+
}
|
|
1964
|
+
if (message.status !== 0) {
|
|
1965
|
+
writer.uint32(64).int32(message.status);
|
|
1966
|
+
}
|
|
1967
|
+
if (message.source !== 0) {
|
|
1968
|
+
writer.uint32(72).int32(message.source);
|
|
1969
|
+
}
|
|
1970
|
+
if (message.cantDrive !== false) {
|
|
1971
|
+
writer.uint32(80).bool(message.cantDrive);
|
|
1972
|
+
}
|
|
1973
|
+
if (message.serviceId !== undefined) {
|
|
1974
|
+
writer.uint32(88).uint64(message.serviceId.toString());
|
|
1975
|
+
}
|
|
1976
|
+
if (message.maintenanceId !== undefined) {
|
|
1977
|
+
writer.uint32(96).uint64(message.maintenanceId.toString());
|
|
1978
|
+
}
|
|
1979
|
+
if (message.inspectionId !== undefined) {
|
|
1980
|
+
writer.uint32(104).uint64(message.inspectionId.toString());
|
|
1981
|
+
}
|
|
1982
|
+
if (message.parentId !== undefined) {
|
|
1983
|
+
writer.uint32(112).uint64(message.parentId.toString());
|
|
1984
|
+
}
|
|
1985
|
+
if (message.rejectionReason !== undefined) {
|
|
1986
|
+
writer.uint32(122).string(message.rejectionReason);
|
|
1987
|
+
}
|
|
1988
|
+
if (message.reviewedBy !== undefined) {
|
|
1989
|
+
writer.uint32(128).uint64(message.reviewedBy.toString());
|
|
1990
|
+
}
|
|
1991
|
+
if (message.reviewedAt !== undefined) {
|
|
1992
|
+
Timestamp.encode(toTimestamp(message.reviewedAt), writer.uint32(138).fork()).join();
|
|
1993
|
+
}
|
|
1994
|
+
if (message.resolvedAt !== undefined) {
|
|
1995
|
+
Timestamp.encode(toTimestamp(message.resolvedAt), writer.uint32(146).fork()).join();
|
|
1996
|
+
}
|
|
1997
|
+
for (const v of message.files) {
|
|
1998
|
+
FleetDocument.encode(v, writer.uint32(154).fork()).join();
|
|
1999
|
+
}
|
|
2000
|
+
if (message.clientUuid !== undefined) {
|
|
2001
|
+
writer.uint32(162).string(message.clientUuid);
|
|
2002
|
+
}
|
|
2003
|
+
if (message.createdBy !== undefined) {
|
|
2004
|
+
writer.uint32(168).uint64(message.createdBy.toString());
|
|
2005
|
+
}
|
|
2006
|
+
if (message.createdAt !== undefined) {
|
|
2007
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(178).fork()).join();
|
|
2008
|
+
}
|
|
2009
|
+
if (message.updatedAt !== undefined) {
|
|
2010
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(186).fork()).join();
|
|
2011
|
+
}
|
|
2012
|
+
for (const v of message.related) {
|
|
2013
|
+
Issue.encode(v, writer.uint32(194).fork()).join();
|
|
2014
|
+
}
|
|
2015
|
+
return writer;
|
|
2016
|
+
},
|
|
2017
|
+
decode(input, length) {
|
|
2018
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2019
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2020
|
+
const message = createBaseIssue();
|
|
2021
|
+
while (reader.pos < end) {
|
|
2022
|
+
const tag = reader.uint32();
|
|
2023
|
+
switch (tag >>> 3) {
|
|
2024
|
+
case 1: {
|
|
2025
|
+
if (tag !== 8) {
|
|
2026
|
+
break;
|
|
2027
|
+
}
|
|
2028
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
2029
|
+
continue;
|
|
2030
|
+
}
|
|
2031
|
+
case 2: {
|
|
2032
|
+
if (tag !== 16) {
|
|
2033
|
+
break;
|
|
2034
|
+
}
|
|
2035
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
2036
|
+
continue;
|
|
2037
|
+
}
|
|
2038
|
+
case 3: {
|
|
2039
|
+
if (tag !== 24) {
|
|
2040
|
+
break;
|
|
2041
|
+
}
|
|
2042
|
+
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
2043
|
+
continue;
|
|
2044
|
+
}
|
|
2045
|
+
case 4: {
|
|
2046
|
+
if (tag !== 34) {
|
|
2047
|
+
break;
|
|
2048
|
+
}
|
|
2049
|
+
message.title = reader.string();
|
|
2050
|
+
continue;
|
|
2051
|
+
}
|
|
2052
|
+
case 5: {
|
|
2053
|
+
if (tag !== 42) {
|
|
2054
|
+
break;
|
|
2055
|
+
}
|
|
2056
|
+
message.description = reader.string();
|
|
2057
|
+
continue;
|
|
2058
|
+
}
|
|
2059
|
+
case 6: {
|
|
2060
|
+
if (tag !== 50) {
|
|
2061
|
+
break;
|
|
2062
|
+
}
|
|
2063
|
+
message.category = reader.string();
|
|
2064
|
+
continue;
|
|
2065
|
+
}
|
|
2066
|
+
case 7: {
|
|
2067
|
+
if (tag !== 56) {
|
|
2068
|
+
break;
|
|
2069
|
+
}
|
|
2070
|
+
message.priority = reader.int32();
|
|
2071
|
+
continue;
|
|
2072
|
+
}
|
|
2073
|
+
case 8: {
|
|
2074
|
+
if (tag !== 64) {
|
|
2075
|
+
break;
|
|
2076
|
+
}
|
|
2077
|
+
message.status = reader.int32();
|
|
2078
|
+
continue;
|
|
2079
|
+
}
|
|
2080
|
+
case 9: {
|
|
2081
|
+
if (tag !== 72) {
|
|
2082
|
+
break;
|
|
2083
|
+
}
|
|
2084
|
+
message.source = reader.int32();
|
|
2085
|
+
continue;
|
|
2086
|
+
}
|
|
2087
|
+
case 10: {
|
|
2088
|
+
if (tag !== 80) {
|
|
2089
|
+
break;
|
|
2090
|
+
}
|
|
2091
|
+
message.cantDrive = reader.bool();
|
|
2092
|
+
continue;
|
|
2093
|
+
}
|
|
2094
|
+
case 11: {
|
|
2095
|
+
if (tag !== 88) {
|
|
2096
|
+
break;
|
|
2097
|
+
}
|
|
2098
|
+
message.serviceId = Long.fromString(reader.uint64().toString(), true);
|
|
2099
|
+
continue;
|
|
2100
|
+
}
|
|
2101
|
+
case 12: {
|
|
2102
|
+
if (tag !== 96) {
|
|
2103
|
+
break;
|
|
2104
|
+
}
|
|
2105
|
+
message.maintenanceId = Long.fromString(reader.uint64().toString(), true);
|
|
2106
|
+
continue;
|
|
2107
|
+
}
|
|
2108
|
+
case 13: {
|
|
2109
|
+
if (tag !== 104) {
|
|
2110
|
+
break;
|
|
2111
|
+
}
|
|
2112
|
+
message.inspectionId = Long.fromString(reader.uint64().toString(), true);
|
|
2113
|
+
continue;
|
|
2114
|
+
}
|
|
2115
|
+
case 14: {
|
|
2116
|
+
if (tag !== 112) {
|
|
2117
|
+
break;
|
|
2118
|
+
}
|
|
2119
|
+
message.parentId = Long.fromString(reader.uint64().toString(), true);
|
|
2120
|
+
continue;
|
|
2121
|
+
}
|
|
2122
|
+
case 15: {
|
|
2123
|
+
if (tag !== 122) {
|
|
2124
|
+
break;
|
|
2125
|
+
}
|
|
2126
|
+
message.rejectionReason = reader.string();
|
|
2127
|
+
continue;
|
|
2128
|
+
}
|
|
2129
|
+
case 16: {
|
|
2130
|
+
if (tag !== 128) {
|
|
2131
|
+
break;
|
|
2132
|
+
}
|
|
2133
|
+
message.reviewedBy = Long.fromString(reader.uint64().toString(), true);
|
|
2134
|
+
continue;
|
|
2135
|
+
}
|
|
2136
|
+
case 17: {
|
|
2137
|
+
if (tag !== 138) {
|
|
2138
|
+
break;
|
|
2139
|
+
}
|
|
2140
|
+
message.reviewedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2141
|
+
continue;
|
|
2142
|
+
}
|
|
2143
|
+
case 18: {
|
|
2144
|
+
if (tag !== 146) {
|
|
2145
|
+
break;
|
|
2146
|
+
}
|
|
2147
|
+
message.resolvedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2148
|
+
continue;
|
|
2149
|
+
}
|
|
2150
|
+
case 19: {
|
|
2151
|
+
if (tag !== 154) {
|
|
2152
|
+
break;
|
|
2153
|
+
}
|
|
2154
|
+
message.files.push(FleetDocument.decode(reader, reader.uint32()));
|
|
2155
|
+
continue;
|
|
2156
|
+
}
|
|
2157
|
+
case 20: {
|
|
2158
|
+
if (tag !== 162) {
|
|
2159
|
+
break;
|
|
2160
|
+
}
|
|
2161
|
+
message.clientUuid = reader.string();
|
|
2162
|
+
continue;
|
|
2163
|
+
}
|
|
2164
|
+
case 21: {
|
|
2165
|
+
if (tag !== 168) {
|
|
2166
|
+
break;
|
|
2167
|
+
}
|
|
2168
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
2169
|
+
continue;
|
|
2170
|
+
}
|
|
2171
|
+
case 22: {
|
|
2172
|
+
if (tag !== 178) {
|
|
2173
|
+
break;
|
|
2174
|
+
}
|
|
2175
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2176
|
+
continue;
|
|
2177
|
+
}
|
|
2178
|
+
case 23: {
|
|
2179
|
+
if (tag !== 186) {
|
|
2180
|
+
break;
|
|
2181
|
+
}
|
|
2182
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2183
|
+
continue;
|
|
2184
|
+
}
|
|
2185
|
+
case 24: {
|
|
2186
|
+
if (tag !== 194) {
|
|
2187
|
+
break;
|
|
2188
|
+
}
|
|
2189
|
+
message.related.push(Issue.decode(reader, reader.uint32()));
|
|
2190
|
+
continue;
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2194
|
+
break;
|
|
2195
|
+
}
|
|
2196
|
+
reader.skip(tag & 7);
|
|
2197
|
+
}
|
|
2198
|
+
return message;
|
|
2199
|
+
},
|
|
2200
|
+
create(base) {
|
|
2201
|
+
return Issue.fromPartial(base ?? {});
|
|
2202
|
+
},
|
|
2203
|
+
fromPartial(object) {
|
|
2204
|
+
const message = createBaseIssue();
|
|
2205
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
2206
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
2207
|
+
? Long.fromValue(object.organizationId)
|
|
2208
|
+
: Long.UZERO;
|
|
2209
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
2210
|
+
? Long.fromValue(object.deviceId)
|
|
2211
|
+
: Long.UZERO;
|
|
2212
|
+
message.title = object.title ?? "";
|
|
2213
|
+
message.description = object.description ?? undefined;
|
|
2214
|
+
message.category = object.category ?? undefined;
|
|
2215
|
+
message.priority = object.priority ?? 0;
|
|
2216
|
+
message.status = object.status ?? 0;
|
|
2217
|
+
message.source = object.source ?? 0;
|
|
2218
|
+
message.cantDrive = object.cantDrive ?? false;
|
|
2219
|
+
message.serviceId = (object.serviceId !== undefined && object.serviceId !== null)
|
|
2220
|
+
? Long.fromValue(object.serviceId)
|
|
2221
|
+
: undefined;
|
|
2222
|
+
message.maintenanceId = (object.maintenanceId !== undefined && object.maintenanceId !== null)
|
|
2223
|
+
? Long.fromValue(object.maintenanceId)
|
|
2224
|
+
: undefined;
|
|
2225
|
+
message.inspectionId = (object.inspectionId !== undefined && object.inspectionId !== null)
|
|
2226
|
+
? Long.fromValue(object.inspectionId)
|
|
2227
|
+
: undefined;
|
|
2228
|
+
message.parentId = (object.parentId !== undefined && object.parentId !== null)
|
|
2229
|
+
? Long.fromValue(object.parentId)
|
|
2230
|
+
: undefined;
|
|
2231
|
+
message.rejectionReason = object.rejectionReason ?? undefined;
|
|
2232
|
+
message.reviewedBy = (object.reviewedBy !== undefined && object.reviewedBy !== null)
|
|
2233
|
+
? Long.fromValue(object.reviewedBy)
|
|
2234
|
+
: undefined;
|
|
2235
|
+
message.reviewedAt = object.reviewedAt ?? undefined;
|
|
2236
|
+
message.resolvedAt = object.resolvedAt ?? undefined;
|
|
2237
|
+
message.files = object.files?.map((e) => FleetDocument.fromPartial(e)) || [];
|
|
2238
|
+
message.clientUuid = object.clientUuid ?? undefined;
|
|
2239
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
2240
|
+
? Long.fromValue(object.createdBy)
|
|
2241
|
+
: undefined;
|
|
2242
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
2243
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
2244
|
+
message.related = object.related?.map((e) => Issue.fromPartial(e)) || [];
|
|
2245
|
+
return message;
|
|
2246
|
+
},
|
|
2247
|
+
};
|
|
2248
|
+
function createBaseInspectionTemplate() {
|
|
2249
|
+
return {
|
|
2250
|
+
id: Long.UZERO,
|
|
2251
|
+
organizationId: Long.UZERO,
|
|
2252
|
+
name: "",
|
|
2253
|
+
items: [],
|
|
2254
|
+
schedule: 0,
|
|
2255
|
+
carGroupIds: [],
|
|
2256
|
+
version: 0,
|
|
2257
|
+
isActive: false,
|
|
2258
|
+
createdBy: undefined,
|
|
2259
|
+
createdAt: undefined,
|
|
2260
|
+
updatedAt: undefined,
|
|
2261
|
+
doneToday: undefined,
|
|
2262
|
+
};
|
|
2263
|
+
}
|
|
2264
|
+
export const InspectionTemplate = {
|
|
2265
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2266
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
2267
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
2268
|
+
}
|
|
2269
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
2270
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
2271
|
+
}
|
|
2272
|
+
if (message.name !== "") {
|
|
2273
|
+
writer.uint32(26).string(message.name);
|
|
2274
|
+
}
|
|
2275
|
+
for (const v of message.items) {
|
|
2276
|
+
InspectionTemplate_Item.encode(v, writer.uint32(34).fork()).join();
|
|
2277
|
+
}
|
|
2278
|
+
if (message.schedule !== 0) {
|
|
2279
|
+
writer.uint32(40).int32(message.schedule);
|
|
2280
|
+
}
|
|
2281
|
+
writer.uint32(50).fork();
|
|
2282
|
+
for (const v of message.carGroupIds) {
|
|
2283
|
+
writer.uint64(v.toString());
|
|
2284
|
+
}
|
|
2285
|
+
writer.join();
|
|
2286
|
+
if (message.version !== 0) {
|
|
2287
|
+
writer.uint32(56).uint32(message.version);
|
|
2288
|
+
}
|
|
2289
|
+
if (message.isActive !== false) {
|
|
2290
|
+
writer.uint32(64).bool(message.isActive);
|
|
2291
|
+
}
|
|
2292
|
+
if (message.createdBy !== undefined) {
|
|
2293
|
+
writer.uint32(72).uint64(message.createdBy.toString());
|
|
2294
|
+
}
|
|
2295
|
+
if (message.createdAt !== undefined) {
|
|
2296
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
|
|
2297
|
+
}
|
|
2298
|
+
if (message.updatedAt !== undefined) {
|
|
2299
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
|
|
2300
|
+
}
|
|
2301
|
+
if (message.doneToday !== undefined) {
|
|
2302
|
+
writer.uint32(96).bool(message.doneToday);
|
|
2303
|
+
}
|
|
2304
|
+
return writer;
|
|
2305
|
+
},
|
|
2306
|
+
decode(input, length) {
|
|
2307
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2308
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2309
|
+
const message = createBaseInspectionTemplate();
|
|
2310
|
+
while (reader.pos < end) {
|
|
2311
|
+
const tag = reader.uint32();
|
|
2312
|
+
switch (tag >>> 3) {
|
|
2313
|
+
case 1: {
|
|
2314
|
+
if (tag !== 8) {
|
|
2315
|
+
break;
|
|
2316
|
+
}
|
|
2317
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
2318
|
+
continue;
|
|
2319
|
+
}
|
|
2320
|
+
case 2: {
|
|
2321
|
+
if (tag !== 16) {
|
|
2322
|
+
break;
|
|
2323
|
+
}
|
|
2324
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
2325
|
+
continue;
|
|
2326
|
+
}
|
|
2327
|
+
case 3: {
|
|
2328
|
+
if (tag !== 26) {
|
|
2329
|
+
break;
|
|
2330
|
+
}
|
|
2331
|
+
message.name = reader.string();
|
|
2332
|
+
continue;
|
|
2333
|
+
}
|
|
2334
|
+
case 4: {
|
|
2335
|
+
if (tag !== 34) {
|
|
2336
|
+
break;
|
|
2337
|
+
}
|
|
2338
|
+
message.items.push(InspectionTemplate_Item.decode(reader, reader.uint32()));
|
|
2339
|
+
continue;
|
|
2340
|
+
}
|
|
2341
|
+
case 5: {
|
|
2342
|
+
if (tag !== 40) {
|
|
2343
|
+
break;
|
|
2344
|
+
}
|
|
2345
|
+
message.schedule = reader.int32();
|
|
2346
|
+
continue;
|
|
2347
|
+
}
|
|
2348
|
+
case 6: {
|
|
2349
|
+
if (tag === 48) {
|
|
2350
|
+
message.carGroupIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
2351
|
+
continue;
|
|
2352
|
+
}
|
|
2353
|
+
if (tag === 50) {
|
|
2354
|
+
const end2 = reader.uint32() + reader.pos;
|
|
2355
|
+
while (reader.pos < end2) {
|
|
2356
|
+
message.carGroupIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
2357
|
+
}
|
|
2358
|
+
continue;
|
|
2359
|
+
}
|
|
2360
|
+
break;
|
|
2361
|
+
}
|
|
2362
|
+
case 7: {
|
|
2363
|
+
if (tag !== 56) {
|
|
2364
|
+
break;
|
|
2365
|
+
}
|
|
2366
|
+
message.version = reader.uint32();
|
|
2367
|
+
continue;
|
|
2368
|
+
}
|
|
2369
|
+
case 8: {
|
|
2370
|
+
if (tag !== 64) {
|
|
2371
|
+
break;
|
|
2372
|
+
}
|
|
2373
|
+
message.isActive = reader.bool();
|
|
2374
|
+
continue;
|
|
2375
|
+
}
|
|
2376
|
+
case 9: {
|
|
2377
|
+
if (tag !== 72) {
|
|
2378
|
+
break;
|
|
2379
|
+
}
|
|
2380
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
2381
|
+
continue;
|
|
2382
|
+
}
|
|
2383
|
+
case 10: {
|
|
2384
|
+
if (tag !== 82) {
|
|
2385
|
+
break;
|
|
2386
|
+
}
|
|
2387
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2388
|
+
continue;
|
|
2389
|
+
}
|
|
2390
|
+
case 11: {
|
|
2391
|
+
if (tag !== 90) {
|
|
2392
|
+
break;
|
|
2393
|
+
}
|
|
2394
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2395
|
+
continue;
|
|
2396
|
+
}
|
|
2397
|
+
case 12: {
|
|
2398
|
+
if (tag !== 96) {
|
|
2399
|
+
break;
|
|
2400
|
+
}
|
|
2401
|
+
message.doneToday = reader.bool();
|
|
2402
|
+
continue;
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2406
|
+
break;
|
|
2407
|
+
}
|
|
2408
|
+
reader.skip(tag & 7);
|
|
2409
|
+
}
|
|
2410
|
+
return message;
|
|
2411
|
+
},
|
|
2412
|
+
create(base) {
|
|
2413
|
+
return InspectionTemplate.fromPartial(base ?? {});
|
|
2414
|
+
},
|
|
2415
|
+
fromPartial(object) {
|
|
2416
|
+
const message = createBaseInspectionTemplate();
|
|
2417
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
2418
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
2419
|
+
? Long.fromValue(object.organizationId)
|
|
2420
|
+
: Long.UZERO;
|
|
2421
|
+
message.name = object.name ?? "";
|
|
2422
|
+
message.items = object.items?.map((e) => InspectionTemplate_Item.fromPartial(e)) || [];
|
|
2423
|
+
message.schedule = object.schedule ?? 0;
|
|
2424
|
+
message.carGroupIds = object.carGroupIds?.map((e) => Long.fromValue(e)) || [];
|
|
2425
|
+
message.version = object.version ?? 0;
|
|
2426
|
+
message.isActive = object.isActive ?? false;
|
|
2427
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
2428
|
+
? Long.fromValue(object.createdBy)
|
|
2429
|
+
: undefined;
|
|
2430
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
2431
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
2432
|
+
message.doneToday = object.doneToday ?? undefined;
|
|
2433
|
+
return message;
|
|
2434
|
+
},
|
|
2435
|
+
};
|
|
2436
|
+
function createBaseInspectionTemplate_Item() {
|
|
2437
|
+
return {
|
|
2438
|
+
key: "",
|
|
2439
|
+
label: "",
|
|
2440
|
+
answerType: 0,
|
|
2441
|
+
critical: false,
|
|
2442
|
+
photoRequired: false,
|
|
2443
|
+
group: undefined,
|
|
2444
|
+
unit: undefined,
|
|
2445
|
+
};
|
|
2446
|
+
}
|
|
2447
|
+
export const InspectionTemplate_Item = {
|
|
2448
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2449
|
+
if (message.key !== "") {
|
|
2450
|
+
writer.uint32(10).string(message.key);
|
|
2451
|
+
}
|
|
2452
|
+
if (message.label !== "") {
|
|
2453
|
+
writer.uint32(18).string(message.label);
|
|
2454
|
+
}
|
|
2455
|
+
if (message.answerType !== 0) {
|
|
2456
|
+
writer.uint32(24).int32(message.answerType);
|
|
2457
|
+
}
|
|
2458
|
+
if (message.critical !== false) {
|
|
2459
|
+
writer.uint32(32).bool(message.critical);
|
|
2460
|
+
}
|
|
2461
|
+
if (message.photoRequired !== false) {
|
|
2462
|
+
writer.uint32(40).bool(message.photoRequired);
|
|
2463
|
+
}
|
|
2464
|
+
if (message.group !== undefined) {
|
|
2465
|
+
writer.uint32(50).string(message.group);
|
|
2466
|
+
}
|
|
2467
|
+
if (message.unit !== undefined) {
|
|
2468
|
+
writer.uint32(58).string(message.unit);
|
|
2469
|
+
}
|
|
2470
|
+
return writer;
|
|
2471
|
+
},
|
|
2472
|
+
decode(input, length) {
|
|
2473
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2474
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2475
|
+
const message = createBaseInspectionTemplate_Item();
|
|
2476
|
+
while (reader.pos < end) {
|
|
2477
|
+
const tag = reader.uint32();
|
|
2478
|
+
switch (tag >>> 3) {
|
|
2479
|
+
case 1: {
|
|
2480
|
+
if (tag !== 10) {
|
|
2481
|
+
break;
|
|
2482
|
+
}
|
|
2483
|
+
message.key = reader.string();
|
|
2484
|
+
continue;
|
|
2485
|
+
}
|
|
2486
|
+
case 2: {
|
|
2487
|
+
if (tag !== 18) {
|
|
2488
|
+
break;
|
|
2489
|
+
}
|
|
2490
|
+
message.label = reader.string();
|
|
2491
|
+
continue;
|
|
2492
|
+
}
|
|
2493
|
+
case 3: {
|
|
2494
|
+
if (tag !== 24) {
|
|
2495
|
+
break;
|
|
2496
|
+
}
|
|
2497
|
+
message.answerType = reader.int32();
|
|
2498
|
+
continue;
|
|
2499
|
+
}
|
|
2500
|
+
case 4: {
|
|
2501
|
+
if (tag !== 32) {
|
|
2502
|
+
break;
|
|
2503
|
+
}
|
|
2504
|
+
message.critical = reader.bool();
|
|
2505
|
+
continue;
|
|
2506
|
+
}
|
|
2507
|
+
case 5: {
|
|
2508
|
+
if (tag !== 40) {
|
|
2509
|
+
break;
|
|
2510
|
+
}
|
|
2511
|
+
message.photoRequired = reader.bool();
|
|
2512
|
+
continue;
|
|
2513
|
+
}
|
|
2514
|
+
case 6: {
|
|
2515
|
+
if (tag !== 50) {
|
|
2516
|
+
break;
|
|
2517
|
+
}
|
|
2518
|
+
message.group = reader.string();
|
|
2519
|
+
continue;
|
|
2520
|
+
}
|
|
2521
|
+
case 7: {
|
|
2522
|
+
if (tag !== 58) {
|
|
2523
|
+
break;
|
|
2524
|
+
}
|
|
2525
|
+
message.unit = reader.string();
|
|
2526
|
+
continue;
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2530
|
+
break;
|
|
2531
|
+
}
|
|
2532
|
+
reader.skip(tag & 7);
|
|
2533
|
+
}
|
|
2534
|
+
return message;
|
|
2535
|
+
},
|
|
2536
|
+
create(base) {
|
|
2537
|
+
return InspectionTemplate_Item.fromPartial(base ?? {});
|
|
2538
|
+
},
|
|
2539
|
+
fromPartial(object) {
|
|
2540
|
+
const message = createBaseInspectionTemplate_Item();
|
|
2541
|
+
message.key = object.key ?? "";
|
|
2542
|
+
message.label = object.label ?? "";
|
|
2543
|
+
message.answerType = object.answerType ?? 0;
|
|
2544
|
+
message.critical = object.critical ?? false;
|
|
2545
|
+
message.photoRequired = object.photoRequired ?? false;
|
|
2546
|
+
message.group = object.group ?? undefined;
|
|
2547
|
+
message.unit = object.unit ?? undefined;
|
|
2548
|
+
return message;
|
|
2549
|
+
},
|
|
2550
|
+
};
|
|
2551
|
+
function createBaseInspection() {
|
|
2552
|
+
return {
|
|
2553
|
+
id: Long.UZERO,
|
|
2554
|
+
organizationId: Long.UZERO,
|
|
2555
|
+
deviceId: Long.UZERO,
|
|
2556
|
+
templateId: undefined,
|
|
2557
|
+
templateVersion: 0,
|
|
2558
|
+
driverId: undefined,
|
|
2559
|
+
status: 0,
|
|
2560
|
+
answers: [],
|
|
2561
|
+
odometer: undefined,
|
|
2562
|
+
latitude: undefined,
|
|
2563
|
+
longitude: undefined,
|
|
2564
|
+
note: undefined,
|
|
2565
|
+
certified: false,
|
|
2566
|
+
signatureFileId: undefined,
|
|
2567
|
+
submittedAt: undefined,
|
|
2568
|
+
vehicleCanMove: undefined,
|
|
2569
|
+
documentId: undefined,
|
|
2570
|
+
verificationCode: undefined,
|
|
2571
|
+
reviewedBy: undefined,
|
|
2572
|
+
reviewedAt: undefined,
|
|
2573
|
+
reviewSignatureId: undefined,
|
|
2574
|
+
reviewNote: undefined,
|
|
2575
|
+
clientUuid: undefined,
|
|
2576
|
+
createdBy: undefined,
|
|
2577
|
+
createdAt: undefined,
|
|
2578
|
+
updatedAt: undefined,
|
|
2579
|
+
template: undefined,
|
|
2580
|
+
document: undefined,
|
|
2581
|
+
};
|
|
2582
|
+
}
|
|
2583
|
+
export const Inspection = {
|
|
2584
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2585
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
2586
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
2587
|
+
}
|
|
2588
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
2589
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
2590
|
+
}
|
|
2591
|
+
if (!message.deviceId.equals(Long.UZERO)) {
|
|
2592
|
+
writer.uint32(24).uint64(message.deviceId.toString());
|
|
2593
|
+
}
|
|
2594
|
+
if (message.templateId !== undefined) {
|
|
2595
|
+
writer.uint32(32).uint64(message.templateId.toString());
|
|
2596
|
+
}
|
|
2597
|
+
if (message.templateVersion !== 0) {
|
|
2598
|
+
writer.uint32(40).uint32(message.templateVersion);
|
|
2599
|
+
}
|
|
2600
|
+
if (message.driverId !== undefined) {
|
|
2601
|
+
writer.uint32(48).uint64(message.driverId.toString());
|
|
2602
|
+
}
|
|
2603
|
+
if (message.status !== 0) {
|
|
2604
|
+
writer.uint32(56).int32(message.status);
|
|
2605
|
+
}
|
|
2606
|
+
for (const v of message.answers) {
|
|
2607
|
+
Inspection_Answer.encode(v, writer.uint32(66).fork()).join();
|
|
2608
|
+
}
|
|
2609
|
+
if (message.odometer !== undefined) {
|
|
2610
|
+
writer.uint32(72).uint64(message.odometer.toString());
|
|
2611
|
+
}
|
|
2612
|
+
if (message.latitude !== undefined) {
|
|
2613
|
+
writer.uint32(81).double(message.latitude);
|
|
2614
|
+
}
|
|
2615
|
+
if (message.longitude !== undefined) {
|
|
2616
|
+
writer.uint32(89).double(message.longitude);
|
|
2617
|
+
}
|
|
2618
|
+
if (message.note !== undefined) {
|
|
2619
|
+
writer.uint32(98).string(message.note);
|
|
2620
|
+
}
|
|
2621
|
+
if (message.certified !== false) {
|
|
2622
|
+
writer.uint32(104).bool(message.certified);
|
|
2623
|
+
}
|
|
2624
|
+
if (message.signatureFileId !== undefined) {
|
|
2625
|
+
writer.uint32(112).uint64(message.signatureFileId.toString());
|
|
2626
|
+
}
|
|
2627
|
+
if (message.submittedAt !== undefined) {
|
|
2628
|
+
Timestamp.encode(toTimestamp(message.submittedAt), writer.uint32(122).fork()).join();
|
|
2629
|
+
}
|
|
2630
|
+
if (message.vehicleCanMove !== undefined) {
|
|
2631
|
+
writer.uint32(128).bool(message.vehicleCanMove);
|
|
2632
|
+
}
|
|
2633
|
+
if (message.documentId !== undefined) {
|
|
2634
|
+
writer.uint32(136).uint64(message.documentId.toString());
|
|
2635
|
+
}
|
|
2636
|
+
if (message.verificationCode !== undefined) {
|
|
2637
|
+
writer.uint32(146).string(message.verificationCode);
|
|
2638
|
+
}
|
|
2639
|
+
if (message.reviewedBy !== undefined) {
|
|
2640
|
+
writer.uint32(152).uint64(message.reviewedBy.toString());
|
|
2641
|
+
}
|
|
2642
|
+
if (message.reviewedAt !== undefined) {
|
|
2643
|
+
Timestamp.encode(toTimestamp(message.reviewedAt), writer.uint32(162).fork()).join();
|
|
2644
|
+
}
|
|
2645
|
+
if (message.reviewSignatureId !== undefined) {
|
|
2646
|
+
writer.uint32(168).uint64(message.reviewSignatureId.toString());
|
|
2647
|
+
}
|
|
2648
|
+
if (message.reviewNote !== undefined) {
|
|
2649
|
+
writer.uint32(178).string(message.reviewNote);
|
|
2650
|
+
}
|
|
2651
|
+
if (message.clientUuid !== undefined) {
|
|
2652
|
+
writer.uint32(186).string(message.clientUuid);
|
|
2653
|
+
}
|
|
2654
|
+
if (message.createdBy !== undefined) {
|
|
2655
|
+
writer.uint32(192).uint64(message.createdBy.toString());
|
|
2656
|
+
}
|
|
2657
|
+
if (message.createdAt !== undefined) {
|
|
2658
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(202).fork()).join();
|
|
2659
|
+
}
|
|
2660
|
+
if (message.updatedAt !== undefined) {
|
|
2661
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(210).fork()).join();
|
|
2662
|
+
}
|
|
2663
|
+
if (message.template !== undefined) {
|
|
2664
|
+
InspectionTemplate.encode(message.template, writer.uint32(218).fork()).join();
|
|
2665
|
+
}
|
|
2666
|
+
if (message.document !== undefined) {
|
|
2667
|
+
FleetDocument.encode(message.document, writer.uint32(226).fork()).join();
|
|
2668
|
+
}
|
|
2669
|
+
return writer;
|
|
2670
|
+
},
|
|
2671
|
+
decode(input, length) {
|
|
2672
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2673
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2674
|
+
const message = createBaseInspection();
|
|
2675
|
+
while (reader.pos < end) {
|
|
2676
|
+
const tag = reader.uint32();
|
|
2677
|
+
switch (tag >>> 3) {
|
|
2678
|
+
case 1: {
|
|
2679
|
+
if (tag !== 8) {
|
|
2680
|
+
break;
|
|
2681
|
+
}
|
|
2682
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
2683
|
+
continue;
|
|
2684
|
+
}
|
|
2685
|
+
case 2: {
|
|
2686
|
+
if (tag !== 16) {
|
|
2687
|
+
break;
|
|
2688
|
+
}
|
|
2689
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
2690
|
+
continue;
|
|
2691
|
+
}
|
|
2692
|
+
case 3: {
|
|
2693
|
+
if (tag !== 24) {
|
|
2694
|
+
break;
|
|
2695
|
+
}
|
|
2696
|
+
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
2697
|
+
continue;
|
|
2698
|
+
}
|
|
2699
|
+
case 4: {
|
|
2700
|
+
if (tag !== 32) {
|
|
2701
|
+
break;
|
|
2702
|
+
}
|
|
2703
|
+
message.templateId = Long.fromString(reader.uint64().toString(), true);
|
|
2704
|
+
continue;
|
|
2705
|
+
}
|
|
2706
|
+
case 5: {
|
|
2707
|
+
if (tag !== 40) {
|
|
2708
|
+
break;
|
|
2709
|
+
}
|
|
2710
|
+
message.templateVersion = reader.uint32();
|
|
2711
|
+
continue;
|
|
2712
|
+
}
|
|
2713
|
+
case 6: {
|
|
2714
|
+
if (tag !== 48) {
|
|
2715
|
+
break;
|
|
2716
|
+
}
|
|
2717
|
+
message.driverId = Long.fromString(reader.uint64().toString(), true);
|
|
2718
|
+
continue;
|
|
2719
|
+
}
|
|
2720
|
+
case 7: {
|
|
2721
|
+
if (tag !== 56) {
|
|
2722
|
+
break;
|
|
2723
|
+
}
|
|
2724
|
+
message.status = reader.int32();
|
|
2725
|
+
continue;
|
|
2726
|
+
}
|
|
2727
|
+
case 8: {
|
|
2728
|
+
if (tag !== 66) {
|
|
2729
|
+
break;
|
|
2730
|
+
}
|
|
2731
|
+
message.answers.push(Inspection_Answer.decode(reader, reader.uint32()));
|
|
2732
|
+
continue;
|
|
2733
|
+
}
|
|
2734
|
+
case 9: {
|
|
2735
|
+
if (tag !== 72) {
|
|
2736
|
+
break;
|
|
2737
|
+
}
|
|
2738
|
+
message.odometer = Long.fromString(reader.uint64().toString(), true);
|
|
2739
|
+
continue;
|
|
2740
|
+
}
|
|
2741
|
+
case 10: {
|
|
2742
|
+
if (tag !== 81) {
|
|
2743
|
+
break;
|
|
2744
|
+
}
|
|
2745
|
+
message.latitude = reader.double();
|
|
2746
|
+
continue;
|
|
2747
|
+
}
|
|
2748
|
+
case 11: {
|
|
2749
|
+
if (tag !== 89) {
|
|
2750
|
+
break;
|
|
2751
|
+
}
|
|
2752
|
+
message.longitude = reader.double();
|
|
2753
|
+
continue;
|
|
2754
|
+
}
|
|
2755
|
+
case 12: {
|
|
2756
|
+
if (tag !== 98) {
|
|
2757
|
+
break;
|
|
2758
|
+
}
|
|
2759
|
+
message.note = reader.string();
|
|
2760
|
+
continue;
|
|
2761
|
+
}
|
|
2762
|
+
case 13: {
|
|
2763
|
+
if (tag !== 104) {
|
|
2764
|
+
break;
|
|
2765
|
+
}
|
|
2766
|
+
message.certified = reader.bool();
|
|
2767
|
+
continue;
|
|
2768
|
+
}
|
|
2769
|
+
case 14: {
|
|
2770
|
+
if (tag !== 112) {
|
|
2771
|
+
break;
|
|
2772
|
+
}
|
|
2773
|
+
message.signatureFileId = Long.fromString(reader.uint64().toString(), true);
|
|
2774
|
+
continue;
|
|
2775
|
+
}
|
|
2776
|
+
case 15: {
|
|
2777
|
+
if (tag !== 122) {
|
|
2778
|
+
break;
|
|
2779
|
+
}
|
|
2780
|
+
message.submittedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2781
|
+
continue;
|
|
2782
|
+
}
|
|
2783
|
+
case 16: {
|
|
2784
|
+
if (tag !== 128) {
|
|
2785
|
+
break;
|
|
2786
|
+
}
|
|
2787
|
+
message.vehicleCanMove = reader.bool();
|
|
2788
|
+
continue;
|
|
2789
|
+
}
|
|
2790
|
+
case 17: {
|
|
2791
|
+
if (tag !== 136) {
|
|
2792
|
+
break;
|
|
2793
|
+
}
|
|
2794
|
+
message.documentId = Long.fromString(reader.uint64().toString(), true);
|
|
2795
|
+
continue;
|
|
2796
|
+
}
|
|
2797
|
+
case 18: {
|
|
2798
|
+
if (tag !== 146) {
|
|
2799
|
+
break;
|
|
2800
|
+
}
|
|
2801
|
+
message.verificationCode = reader.string();
|
|
2802
|
+
continue;
|
|
2803
|
+
}
|
|
2804
|
+
case 19: {
|
|
2805
|
+
if (tag !== 152) {
|
|
2806
|
+
break;
|
|
2807
|
+
}
|
|
2808
|
+
message.reviewedBy = Long.fromString(reader.uint64().toString(), true);
|
|
2809
|
+
continue;
|
|
2810
|
+
}
|
|
2811
|
+
case 20: {
|
|
2812
|
+
if (tag !== 162) {
|
|
2813
|
+
break;
|
|
2814
|
+
}
|
|
2815
|
+
message.reviewedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2816
|
+
continue;
|
|
2817
|
+
}
|
|
2818
|
+
case 21: {
|
|
2819
|
+
if (tag !== 168) {
|
|
2820
|
+
break;
|
|
2821
|
+
}
|
|
2822
|
+
message.reviewSignatureId = Long.fromString(reader.uint64().toString(), true);
|
|
2823
|
+
continue;
|
|
2824
|
+
}
|
|
2825
|
+
case 22: {
|
|
2826
|
+
if (tag !== 178) {
|
|
2827
|
+
break;
|
|
2828
|
+
}
|
|
2829
|
+
message.reviewNote = reader.string();
|
|
2830
|
+
continue;
|
|
2831
|
+
}
|
|
2832
|
+
case 23: {
|
|
2833
|
+
if (tag !== 186) {
|
|
2834
|
+
break;
|
|
2835
|
+
}
|
|
2836
|
+
message.clientUuid = reader.string();
|
|
2837
|
+
continue;
|
|
2838
|
+
}
|
|
2839
|
+
case 24: {
|
|
2840
|
+
if (tag !== 192) {
|
|
2841
|
+
break;
|
|
2842
|
+
}
|
|
2843
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
2844
|
+
continue;
|
|
2845
|
+
}
|
|
2846
|
+
case 25: {
|
|
2847
|
+
if (tag !== 202) {
|
|
2848
|
+
break;
|
|
2849
|
+
}
|
|
2850
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2851
|
+
continue;
|
|
2852
|
+
}
|
|
2853
|
+
case 26: {
|
|
2854
|
+
if (tag !== 210) {
|
|
2855
|
+
break;
|
|
2856
|
+
}
|
|
2857
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2858
|
+
continue;
|
|
2859
|
+
}
|
|
2860
|
+
case 27: {
|
|
2861
|
+
if (tag !== 218) {
|
|
2862
|
+
break;
|
|
2863
|
+
}
|
|
2864
|
+
message.template = InspectionTemplate.decode(reader, reader.uint32());
|
|
2865
|
+
continue;
|
|
2866
|
+
}
|
|
2867
|
+
case 28: {
|
|
2868
|
+
if (tag !== 226) {
|
|
2869
|
+
break;
|
|
2870
|
+
}
|
|
2871
|
+
message.document = FleetDocument.decode(reader, reader.uint32());
|
|
2872
|
+
continue;
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2876
|
+
break;
|
|
2877
|
+
}
|
|
2878
|
+
reader.skip(tag & 7);
|
|
2879
|
+
}
|
|
2880
|
+
return message;
|
|
2881
|
+
},
|
|
2882
|
+
create(base) {
|
|
2883
|
+
return Inspection.fromPartial(base ?? {});
|
|
2884
|
+
},
|
|
2885
|
+
fromPartial(object) {
|
|
2886
|
+
const message = createBaseInspection();
|
|
2887
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
2888
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
2889
|
+
? Long.fromValue(object.organizationId)
|
|
2890
|
+
: Long.UZERO;
|
|
2891
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
2892
|
+
? Long.fromValue(object.deviceId)
|
|
2893
|
+
: Long.UZERO;
|
|
2894
|
+
message.templateId = (object.templateId !== undefined && object.templateId !== null)
|
|
2895
|
+
? Long.fromValue(object.templateId)
|
|
2896
|
+
: undefined;
|
|
2897
|
+
message.templateVersion = object.templateVersion ?? 0;
|
|
2898
|
+
message.driverId = (object.driverId !== undefined && object.driverId !== null)
|
|
2899
|
+
? Long.fromValue(object.driverId)
|
|
2900
|
+
: undefined;
|
|
2901
|
+
message.status = object.status ?? 0;
|
|
2902
|
+
message.answers = object.answers?.map((e) => Inspection_Answer.fromPartial(e)) || [];
|
|
2903
|
+
message.odometer = (object.odometer !== undefined && object.odometer !== null)
|
|
2904
|
+
? Long.fromValue(object.odometer)
|
|
2905
|
+
: undefined;
|
|
2906
|
+
message.latitude = object.latitude ?? undefined;
|
|
2907
|
+
message.longitude = object.longitude ?? undefined;
|
|
2908
|
+
message.note = object.note ?? undefined;
|
|
2909
|
+
message.certified = object.certified ?? false;
|
|
2910
|
+
message.signatureFileId = (object.signatureFileId !== undefined && object.signatureFileId !== null)
|
|
2911
|
+
? Long.fromValue(object.signatureFileId)
|
|
2912
|
+
: undefined;
|
|
2913
|
+
message.submittedAt = object.submittedAt ?? undefined;
|
|
2914
|
+
message.vehicleCanMove = object.vehicleCanMove ?? undefined;
|
|
2915
|
+
message.documentId = (object.documentId !== undefined && object.documentId !== null)
|
|
2916
|
+
? Long.fromValue(object.documentId)
|
|
2917
|
+
: undefined;
|
|
2918
|
+
message.verificationCode = object.verificationCode ?? undefined;
|
|
2919
|
+
message.reviewedBy = (object.reviewedBy !== undefined && object.reviewedBy !== null)
|
|
2920
|
+
? Long.fromValue(object.reviewedBy)
|
|
2921
|
+
: undefined;
|
|
2922
|
+
message.reviewedAt = object.reviewedAt ?? undefined;
|
|
2923
|
+
message.reviewSignatureId = (object.reviewSignatureId !== undefined && object.reviewSignatureId !== null)
|
|
2924
|
+
? Long.fromValue(object.reviewSignatureId)
|
|
2925
|
+
: undefined;
|
|
2926
|
+
message.reviewNote = object.reviewNote ?? undefined;
|
|
2927
|
+
message.clientUuid = object.clientUuid ?? undefined;
|
|
2928
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
2929
|
+
? Long.fromValue(object.createdBy)
|
|
2930
|
+
: undefined;
|
|
2931
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
2932
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
2933
|
+
message.template = (object.template !== undefined && object.template !== null)
|
|
2934
|
+
? InspectionTemplate.fromPartial(object.template)
|
|
2935
|
+
: undefined;
|
|
2936
|
+
message.document = (object.document !== undefined && object.document !== null)
|
|
2937
|
+
? FleetDocument.fromPartial(object.document)
|
|
2938
|
+
: undefined;
|
|
2939
|
+
return message;
|
|
2940
|
+
},
|
|
2941
|
+
};
|
|
2942
|
+
function createBaseInspection_Answer() {
|
|
2943
|
+
return {
|
|
2944
|
+
itemKey: "",
|
|
2945
|
+
label: "",
|
|
2946
|
+
answerType: 0,
|
|
2947
|
+
critical: false,
|
|
2948
|
+
result: 0,
|
|
2949
|
+
value: undefined,
|
|
2950
|
+
note: undefined,
|
|
2951
|
+
photoFileId: undefined,
|
|
2952
|
+
issueId: undefined,
|
|
2953
|
+
};
|
|
2954
|
+
}
|
|
2955
|
+
export const Inspection_Answer = {
|
|
2956
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2957
|
+
if (message.itemKey !== "") {
|
|
2958
|
+
writer.uint32(10).string(message.itemKey);
|
|
2959
|
+
}
|
|
2960
|
+
if (message.label !== "") {
|
|
2961
|
+
writer.uint32(18).string(message.label);
|
|
2962
|
+
}
|
|
2963
|
+
if (message.answerType !== 0) {
|
|
2964
|
+
writer.uint32(24).int32(message.answerType);
|
|
2965
|
+
}
|
|
2966
|
+
if (message.critical !== false) {
|
|
2967
|
+
writer.uint32(32).bool(message.critical);
|
|
2968
|
+
}
|
|
2969
|
+
if (message.result !== 0) {
|
|
2970
|
+
writer.uint32(40).int32(message.result);
|
|
2971
|
+
}
|
|
2972
|
+
if (message.value !== undefined) {
|
|
2973
|
+
writer.uint32(49).double(message.value);
|
|
2974
|
+
}
|
|
2975
|
+
if (message.note !== undefined) {
|
|
2976
|
+
writer.uint32(58).string(message.note);
|
|
2977
|
+
}
|
|
2978
|
+
if (message.photoFileId !== undefined) {
|
|
2979
|
+
writer.uint32(64).uint64(message.photoFileId.toString());
|
|
2980
|
+
}
|
|
2981
|
+
if (message.issueId !== undefined) {
|
|
2982
|
+
writer.uint32(72).uint64(message.issueId.toString());
|
|
2983
|
+
}
|
|
2984
|
+
return writer;
|
|
2985
|
+
},
|
|
2986
|
+
decode(input, length) {
|
|
2987
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2988
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2989
|
+
const message = createBaseInspection_Answer();
|
|
2990
|
+
while (reader.pos < end) {
|
|
2991
|
+
const tag = reader.uint32();
|
|
2992
|
+
switch (tag >>> 3) {
|
|
2993
|
+
case 1: {
|
|
2994
|
+
if (tag !== 10) {
|
|
2995
|
+
break;
|
|
2996
|
+
}
|
|
2997
|
+
message.itemKey = reader.string();
|
|
2998
|
+
continue;
|
|
2999
|
+
}
|
|
3000
|
+
case 2: {
|
|
3001
|
+
if (tag !== 18) {
|
|
3002
|
+
break;
|
|
3003
|
+
}
|
|
3004
|
+
message.label = reader.string();
|
|
3005
|
+
continue;
|
|
3006
|
+
}
|
|
3007
|
+
case 3: {
|
|
3008
|
+
if (tag !== 24) {
|
|
3009
|
+
break;
|
|
3010
|
+
}
|
|
3011
|
+
message.answerType = reader.int32();
|
|
3012
|
+
continue;
|
|
3013
|
+
}
|
|
3014
|
+
case 4: {
|
|
3015
|
+
if (tag !== 32) {
|
|
3016
|
+
break;
|
|
3017
|
+
}
|
|
3018
|
+
message.critical = reader.bool();
|
|
3019
|
+
continue;
|
|
3020
|
+
}
|
|
3021
|
+
case 5: {
|
|
3022
|
+
if (tag !== 40) {
|
|
3023
|
+
break;
|
|
3024
|
+
}
|
|
3025
|
+
message.result = reader.int32();
|
|
3026
|
+
continue;
|
|
3027
|
+
}
|
|
3028
|
+
case 6: {
|
|
3029
|
+
if (tag !== 49) {
|
|
3030
|
+
break;
|
|
3031
|
+
}
|
|
3032
|
+
message.value = reader.double();
|
|
3033
|
+
continue;
|
|
3034
|
+
}
|
|
3035
|
+
case 7: {
|
|
3036
|
+
if (tag !== 58) {
|
|
3037
|
+
break;
|
|
3038
|
+
}
|
|
3039
|
+
message.note = reader.string();
|
|
3040
|
+
continue;
|
|
3041
|
+
}
|
|
3042
|
+
case 8: {
|
|
3043
|
+
if (tag !== 64) {
|
|
3044
|
+
break;
|
|
3045
|
+
}
|
|
3046
|
+
message.photoFileId = Long.fromString(reader.uint64().toString(), true);
|
|
3047
|
+
continue;
|
|
3048
|
+
}
|
|
3049
|
+
case 9: {
|
|
3050
|
+
if (tag !== 72) {
|
|
3051
|
+
break;
|
|
3052
|
+
}
|
|
3053
|
+
message.issueId = Long.fromString(reader.uint64().toString(), true);
|
|
3054
|
+
continue;
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3057
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3058
|
+
break;
|
|
3059
|
+
}
|
|
3060
|
+
reader.skip(tag & 7);
|
|
3061
|
+
}
|
|
3062
|
+
return message;
|
|
3063
|
+
},
|
|
3064
|
+
create(base) {
|
|
3065
|
+
return Inspection_Answer.fromPartial(base ?? {});
|
|
3066
|
+
},
|
|
3067
|
+
fromPartial(object) {
|
|
3068
|
+
const message = createBaseInspection_Answer();
|
|
3069
|
+
message.itemKey = object.itemKey ?? "";
|
|
3070
|
+
message.label = object.label ?? "";
|
|
3071
|
+
message.answerType = object.answerType ?? 0;
|
|
3072
|
+
message.critical = object.critical ?? false;
|
|
3073
|
+
message.result = object.result ?? 0;
|
|
3074
|
+
message.value = object.value ?? undefined;
|
|
3075
|
+
message.note = object.note ?? undefined;
|
|
3076
|
+
message.photoFileId = (object.photoFileId !== undefined && object.photoFileId !== null)
|
|
3077
|
+
? Long.fromValue(object.photoFileId)
|
|
3078
|
+
: undefined;
|
|
3079
|
+
message.issueId = (object.issueId !== undefined && object.issueId !== null)
|
|
3080
|
+
? Long.fromValue(object.issueId)
|
|
3081
|
+
: undefined;
|
|
3082
|
+
return message;
|
|
3083
|
+
},
|
|
3084
|
+
};
|
|
3085
|
+
function createBaseOutOfService() {
|
|
3086
|
+
return {
|
|
3087
|
+
id: Long.UZERO,
|
|
3088
|
+
organizationId: Long.UZERO,
|
|
3089
|
+
deviceId: Long.UZERO,
|
|
3090
|
+
reason: 0,
|
|
3091
|
+
status: 0,
|
|
3092
|
+
note: undefined,
|
|
3093
|
+
startedAt: undefined,
|
|
3094
|
+
expectedReturnAt: undefined,
|
|
3095
|
+
endedAt: undefined,
|
|
3096
|
+
issueId: undefined,
|
|
3097
|
+
maintenanceId: undefined,
|
|
3098
|
+
inspectionId: undefined,
|
|
3099
|
+
endedBy: undefined,
|
|
3100
|
+
endNote: undefined,
|
|
3101
|
+
createdBy: undefined,
|
|
3102
|
+
createdAt: undefined,
|
|
3103
|
+
updatedAt: undefined,
|
|
3104
|
+
};
|
|
3105
|
+
}
|
|
3106
|
+
export const OutOfService = {
|
|
3107
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3108
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
3109
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
3110
|
+
}
|
|
3111
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
3112
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
3113
|
+
}
|
|
3114
|
+
if (!message.deviceId.equals(Long.UZERO)) {
|
|
3115
|
+
writer.uint32(24).uint64(message.deviceId.toString());
|
|
3116
|
+
}
|
|
3117
|
+
if (message.reason !== 0) {
|
|
3118
|
+
writer.uint32(32).int32(message.reason);
|
|
3119
|
+
}
|
|
3120
|
+
if (message.status !== 0) {
|
|
3121
|
+
writer.uint32(40).int32(message.status);
|
|
3122
|
+
}
|
|
3123
|
+
if (message.note !== undefined) {
|
|
3124
|
+
writer.uint32(50).string(message.note);
|
|
3125
|
+
}
|
|
3126
|
+
if (message.startedAt !== undefined) {
|
|
3127
|
+
Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(58).fork()).join();
|
|
3128
|
+
}
|
|
3129
|
+
if (message.expectedReturnAt !== undefined) {
|
|
3130
|
+
Timestamp.encode(toTimestamp(message.expectedReturnAt), writer.uint32(66).fork()).join();
|
|
3131
|
+
}
|
|
3132
|
+
if (message.endedAt !== undefined) {
|
|
3133
|
+
Timestamp.encode(toTimestamp(message.endedAt), writer.uint32(74).fork()).join();
|
|
3134
|
+
}
|
|
3135
|
+
if (message.issueId !== undefined) {
|
|
3136
|
+
writer.uint32(80).uint64(message.issueId.toString());
|
|
3137
|
+
}
|
|
3138
|
+
if (message.maintenanceId !== undefined) {
|
|
3139
|
+
writer.uint32(88).uint64(message.maintenanceId.toString());
|
|
3140
|
+
}
|
|
3141
|
+
if (message.inspectionId !== undefined) {
|
|
3142
|
+
writer.uint32(96).uint64(message.inspectionId.toString());
|
|
3143
|
+
}
|
|
3144
|
+
if (message.endedBy !== undefined) {
|
|
3145
|
+
writer.uint32(104).uint64(message.endedBy.toString());
|
|
3146
|
+
}
|
|
3147
|
+
if (message.endNote !== undefined) {
|
|
3148
|
+
writer.uint32(114).string(message.endNote);
|
|
3149
|
+
}
|
|
3150
|
+
if (message.createdBy !== undefined) {
|
|
3151
|
+
writer.uint32(120).uint64(message.createdBy.toString());
|
|
3152
|
+
}
|
|
3153
|
+
if (message.createdAt !== undefined) {
|
|
3154
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(130).fork()).join();
|
|
3155
|
+
}
|
|
3156
|
+
if (message.updatedAt !== undefined) {
|
|
3157
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(138).fork()).join();
|
|
3158
|
+
}
|
|
3159
|
+
return writer;
|
|
3160
|
+
},
|
|
3161
|
+
decode(input, length) {
|
|
3162
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3163
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3164
|
+
const message = createBaseOutOfService();
|
|
3165
|
+
while (reader.pos < end) {
|
|
3166
|
+
const tag = reader.uint32();
|
|
3167
|
+
switch (tag >>> 3) {
|
|
3168
|
+
case 1: {
|
|
3169
|
+
if (tag !== 8) {
|
|
3170
|
+
break;
|
|
3171
|
+
}
|
|
3172
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
3173
|
+
continue;
|
|
3174
|
+
}
|
|
3175
|
+
case 2: {
|
|
3176
|
+
if (tag !== 16) {
|
|
3177
|
+
break;
|
|
3178
|
+
}
|
|
3179
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
3180
|
+
continue;
|
|
3181
|
+
}
|
|
3182
|
+
case 3: {
|
|
3183
|
+
if (tag !== 24) {
|
|
3184
|
+
break;
|
|
3185
|
+
}
|
|
3186
|
+
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
3187
|
+
continue;
|
|
3188
|
+
}
|
|
3189
|
+
case 4: {
|
|
3190
|
+
if (tag !== 32) {
|
|
3191
|
+
break;
|
|
3192
|
+
}
|
|
3193
|
+
message.reason = reader.int32();
|
|
3194
|
+
continue;
|
|
3195
|
+
}
|
|
3196
|
+
case 5: {
|
|
3197
|
+
if (tag !== 40) {
|
|
3198
|
+
break;
|
|
3199
|
+
}
|
|
3200
|
+
message.status = reader.int32();
|
|
3201
|
+
continue;
|
|
3202
|
+
}
|
|
3203
|
+
case 6: {
|
|
3204
|
+
if (tag !== 50) {
|
|
3205
|
+
break;
|
|
3206
|
+
}
|
|
3207
|
+
message.note = reader.string();
|
|
3208
|
+
continue;
|
|
3209
|
+
}
|
|
3210
|
+
case 7: {
|
|
3211
|
+
if (tag !== 58) {
|
|
3212
|
+
break;
|
|
3213
|
+
}
|
|
3214
|
+
message.startedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3215
|
+
continue;
|
|
3216
|
+
}
|
|
3217
|
+
case 8: {
|
|
3218
|
+
if (tag !== 66) {
|
|
3219
|
+
break;
|
|
3220
|
+
}
|
|
3221
|
+
message.expectedReturnAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3222
|
+
continue;
|
|
3223
|
+
}
|
|
3224
|
+
case 9: {
|
|
3225
|
+
if (tag !== 74) {
|
|
3226
|
+
break;
|
|
3227
|
+
}
|
|
3228
|
+
message.endedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3229
|
+
continue;
|
|
3230
|
+
}
|
|
3231
|
+
case 10: {
|
|
3232
|
+
if (tag !== 80) {
|
|
3233
|
+
break;
|
|
3234
|
+
}
|
|
3235
|
+
message.issueId = Long.fromString(reader.uint64().toString(), true);
|
|
3236
|
+
continue;
|
|
3237
|
+
}
|
|
3238
|
+
case 11: {
|
|
3239
|
+
if (tag !== 88) {
|
|
3240
|
+
break;
|
|
3241
|
+
}
|
|
3242
|
+
message.maintenanceId = Long.fromString(reader.uint64().toString(), true);
|
|
3243
|
+
continue;
|
|
3244
|
+
}
|
|
3245
|
+
case 12: {
|
|
3246
|
+
if (tag !== 96) {
|
|
3247
|
+
break;
|
|
3248
|
+
}
|
|
3249
|
+
message.inspectionId = Long.fromString(reader.uint64().toString(), true);
|
|
3250
|
+
continue;
|
|
3251
|
+
}
|
|
3252
|
+
case 13: {
|
|
3253
|
+
if (tag !== 104) {
|
|
3254
|
+
break;
|
|
3255
|
+
}
|
|
3256
|
+
message.endedBy = Long.fromString(reader.uint64().toString(), true);
|
|
3257
|
+
continue;
|
|
3258
|
+
}
|
|
3259
|
+
case 14: {
|
|
3260
|
+
if (tag !== 114) {
|
|
3261
|
+
break;
|
|
3262
|
+
}
|
|
3263
|
+
message.endNote = reader.string();
|
|
3264
|
+
continue;
|
|
3265
|
+
}
|
|
3266
|
+
case 15: {
|
|
3267
|
+
if (tag !== 120) {
|
|
3268
|
+
break;
|
|
3269
|
+
}
|
|
3270
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
3271
|
+
continue;
|
|
3272
|
+
}
|
|
3273
|
+
case 16: {
|
|
3274
|
+
if (tag !== 130) {
|
|
3275
|
+
break;
|
|
3276
|
+
}
|
|
3277
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3278
|
+
continue;
|
|
3279
|
+
}
|
|
3280
|
+
case 17: {
|
|
3281
|
+
if (tag !== 138) {
|
|
3282
|
+
break;
|
|
3283
|
+
}
|
|
3284
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3285
|
+
continue;
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3289
|
+
break;
|
|
3290
|
+
}
|
|
3291
|
+
reader.skip(tag & 7);
|
|
3292
|
+
}
|
|
3293
|
+
return message;
|
|
3294
|
+
},
|
|
3295
|
+
create(base) {
|
|
3296
|
+
return OutOfService.fromPartial(base ?? {});
|
|
3297
|
+
},
|
|
3298
|
+
fromPartial(object) {
|
|
3299
|
+
const message = createBaseOutOfService();
|
|
3300
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
3301
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
3302
|
+
? Long.fromValue(object.organizationId)
|
|
3303
|
+
: Long.UZERO;
|
|
3304
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
3305
|
+
? Long.fromValue(object.deviceId)
|
|
3306
|
+
: Long.UZERO;
|
|
3307
|
+
message.reason = object.reason ?? 0;
|
|
3308
|
+
message.status = object.status ?? 0;
|
|
3309
|
+
message.note = object.note ?? undefined;
|
|
3310
|
+
message.startedAt = object.startedAt ?? undefined;
|
|
3311
|
+
message.expectedReturnAt = object.expectedReturnAt ?? undefined;
|
|
3312
|
+
message.endedAt = object.endedAt ?? undefined;
|
|
3313
|
+
message.issueId = (object.issueId !== undefined && object.issueId !== null)
|
|
3314
|
+
? Long.fromValue(object.issueId)
|
|
3315
|
+
: undefined;
|
|
3316
|
+
message.maintenanceId = (object.maintenanceId !== undefined && object.maintenanceId !== null)
|
|
3317
|
+
? Long.fromValue(object.maintenanceId)
|
|
3318
|
+
: undefined;
|
|
3319
|
+
message.inspectionId = (object.inspectionId !== undefined && object.inspectionId !== null)
|
|
3320
|
+
? Long.fromValue(object.inspectionId)
|
|
3321
|
+
: undefined;
|
|
3322
|
+
message.endedBy = (object.endedBy !== undefined && object.endedBy !== null)
|
|
3323
|
+
? Long.fromValue(object.endedBy)
|
|
3324
|
+
: undefined;
|
|
3325
|
+
message.endNote = object.endNote ?? undefined;
|
|
3326
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
3327
|
+
? Long.fromValue(object.createdBy)
|
|
3328
|
+
: undefined;
|
|
3329
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
3330
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
3331
|
+
return message;
|
|
3332
|
+
},
|
|
3333
|
+
};
|
|
3334
|
+
function createBaseFleetDocument() {
|
|
3335
|
+
return {
|
|
3336
|
+
id: Long.UZERO,
|
|
3337
|
+
organizationId: Long.UZERO,
|
|
3338
|
+
name: undefined,
|
|
3339
|
+
docType: 0,
|
|
3340
|
+
url: "",
|
|
3341
|
+
objectType: undefined,
|
|
3342
|
+
objectId: undefined,
|
|
3343
|
+
deviceId: undefined,
|
|
3344
|
+
issuedAt: undefined,
|
|
3345
|
+
expiresAt: undefined,
|
|
3346
|
+
remindDaysBefore: undefined,
|
|
3347
|
+
version: 0,
|
|
3348
|
+
replacesId: undefined,
|
|
3349
|
+
status: 0,
|
|
3350
|
+
review: 0,
|
|
3351
|
+
reviewNote: undefined,
|
|
3352
|
+
reviewedBy: undefined,
|
|
3353
|
+
verificationCode: undefined,
|
|
3354
|
+
mime: undefined,
|
|
3355
|
+
size: undefined,
|
|
3356
|
+
createdBy: undefined,
|
|
3357
|
+
createdAt: undefined,
|
|
3358
|
+
updatedAt: undefined,
|
|
3359
|
+
archivedAt: undefined,
|
|
3360
|
+
versions: [],
|
|
3361
|
+
};
|
|
3362
|
+
}
|
|
3363
|
+
export const FleetDocument = {
|
|
3364
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3365
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
3366
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
3367
|
+
}
|
|
3368
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
3369
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
3370
|
+
}
|
|
3371
|
+
if (message.name !== undefined) {
|
|
3372
|
+
writer.uint32(26).string(message.name);
|
|
3373
|
+
}
|
|
3374
|
+
if (message.docType !== 0) {
|
|
3375
|
+
writer.uint32(32).int32(message.docType);
|
|
3376
|
+
}
|
|
3377
|
+
if (message.url !== "") {
|
|
3378
|
+
writer.uint32(42).string(message.url);
|
|
3379
|
+
}
|
|
3380
|
+
if (message.objectType !== undefined) {
|
|
3381
|
+
writer.uint32(50).string(message.objectType);
|
|
3382
|
+
}
|
|
3383
|
+
if (message.objectId !== undefined) {
|
|
3384
|
+
writer.uint32(56).uint64(message.objectId.toString());
|
|
3385
|
+
}
|
|
3386
|
+
if (message.deviceId !== undefined) {
|
|
3387
|
+
writer.uint32(64).uint64(message.deviceId.toString());
|
|
3388
|
+
}
|
|
3389
|
+
if (message.issuedAt !== undefined) {
|
|
3390
|
+
Timestamp.encode(toTimestamp(message.issuedAt), writer.uint32(74).fork()).join();
|
|
3391
|
+
}
|
|
3392
|
+
if (message.expiresAt !== undefined) {
|
|
3393
|
+
Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(82).fork()).join();
|
|
3394
|
+
}
|
|
3395
|
+
if (message.remindDaysBefore !== undefined) {
|
|
3396
|
+
writer.uint32(88).uint32(message.remindDaysBefore);
|
|
3397
|
+
}
|
|
3398
|
+
if (message.version !== 0) {
|
|
3399
|
+
writer.uint32(96).uint32(message.version);
|
|
3400
|
+
}
|
|
3401
|
+
if (message.replacesId !== undefined) {
|
|
3402
|
+
writer.uint32(104).uint64(message.replacesId.toString());
|
|
3403
|
+
}
|
|
3404
|
+
if (message.status !== 0) {
|
|
3405
|
+
writer.uint32(112).int32(message.status);
|
|
3406
|
+
}
|
|
3407
|
+
if (message.review !== 0) {
|
|
3408
|
+
writer.uint32(120).int32(message.review);
|
|
3409
|
+
}
|
|
3410
|
+
if (message.reviewNote !== undefined) {
|
|
3411
|
+
writer.uint32(130).string(message.reviewNote);
|
|
3412
|
+
}
|
|
3413
|
+
if (message.reviewedBy !== undefined) {
|
|
3414
|
+
writer.uint32(136).uint64(message.reviewedBy.toString());
|
|
3415
|
+
}
|
|
3416
|
+
if (message.verificationCode !== undefined) {
|
|
3417
|
+
writer.uint32(146).string(message.verificationCode);
|
|
3418
|
+
}
|
|
3419
|
+
if (message.mime !== undefined) {
|
|
3420
|
+
writer.uint32(154).string(message.mime);
|
|
3421
|
+
}
|
|
3422
|
+
if (message.size !== undefined) {
|
|
3423
|
+
writer.uint32(160).uint64(message.size.toString());
|
|
3424
|
+
}
|
|
3425
|
+
if (message.createdBy !== undefined) {
|
|
3426
|
+
writer.uint32(168).uint64(message.createdBy.toString());
|
|
3427
|
+
}
|
|
3428
|
+
if (message.createdAt !== undefined) {
|
|
3429
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(178).fork()).join();
|
|
3430
|
+
}
|
|
3431
|
+
if (message.updatedAt !== undefined) {
|
|
3432
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(186).fork()).join();
|
|
3433
|
+
}
|
|
3434
|
+
if (message.archivedAt !== undefined) {
|
|
3435
|
+
Timestamp.encode(toTimestamp(message.archivedAt), writer.uint32(194).fork()).join();
|
|
3436
|
+
}
|
|
3437
|
+
for (const v of message.versions) {
|
|
3438
|
+
FleetDocument.encode(v, writer.uint32(202).fork()).join();
|
|
3439
|
+
}
|
|
3440
|
+
return writer;
|
|
3441
|
+
},
|
|
3442
|
+
decode(input, length) {
|
|
3443
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3444
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3445
|
+
const message = createBaseFleetDocument();
|
|
3446
|
+
while (reader.pos < end) {
|
|
3447
|
+
const tag = reader.uint32();
|
|
3448
|
+
switch (tag >>> 3) {
|
|
3449
|
+
case 1: {
|
|
3450
|
+
if (tag !== 8) {
|
|
3451
|
+
break;
|
|
3452
|
+
}
|
|
3453
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
3454
|
+
continue;
|
|
3455
|
+
}
|
|
3456
|
+
case 2: {
|
|
3457
|
+
if (tag !== 16) {
|
|
3458
|
+
break;
|
|
3459
|
+
}
|
|
3460
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
3461
|
+
continue;
|
|
3462
|
+
}
|
|
3463
|
+
case 3: {
|
|
3464
|
+
if (tag !== 26) {
|
|
3465
|
+
break;
|
|
3466
|
+
}
|
|
3467
|
+
message.name = reader.string();
|
|
3468
|
+
continue;
|
|
3469
|
+
}
|
|
3470
|
+
case 4: {
|
|
3471
|
+
if (tag !== 32) {
|
|
3472
|
+
break;
|
|
3473
|
+
}
|
|
3474
|
+
message.docType = reader.int32();
|
|
3475
|
+
continue;
|
|
3476
|
+
}
|
|
3477
|
+
case 5: {
|
|
3478
|
+
if (tag !== 42) {
|
|
3479
|
+
break;
|
|
3480
|
+
}
|
|
3481
|
+
message.url = reader.string();
|
|
3482
|
+
continue;
|
|
3483
|
+
}
|
|
3484
|
+
case 6: {
|
|
3485
|
+
if (tag !== 50) {
|
|
3486
|
+
break;
|
|
3487
|
+
}
|
|
3488
|
+
message.objectType = reader.string();
|
|
3489
|
+
continue;
|
|
3490
|
+
}
|
|
3491
|
+
case 7: {
|
|
3492
|
+
if (tag !== 56) {
|
|
3493
|
+
break;
|
|
3494
|
+
}
|
|
3495
|
+
message.objectId = Long.fromString(reader.uint64().toString(), true);
|
|
3496
|
+
continue;
|
|
3497
|
+
}
|
|
3498
|
+
case 8: {
|
|
3499
|
+
if (tag !== 64) {
|
|
3500
|
+
break;
|
|
3501
|
+
}
|
|
3502
|
+
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
3503
|
+
continue;
|
|
3504
|
+
}
|
|
3505
|
+
case 9: {
|
|
3506
|
+
if (tag !== 74) {
|
|
3507
|
+
break;
|
|
3508
|
+
}
|
|
3509
|
+
message.issuedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3510
|
+
continue;
|
|
3511
|
+
}
|
|
3512
|
+
case 10: {
|
|
3513
|
+
if (tag !== 82) {
|
|
3514
|
+
break;
|
|
3515
|
+
}
|
|
3516
|
+
message.expiresAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3517
|
+
continue;
|
|
3518
|
+
}
|
|
3519
|
+
case 11: {
|
|
3520
|
+
if (tag !== 88) {
|
|
3521
|
+
break;
|
|
3522
|
+
}
|
|
3523
|
+
message.remindDaysBefore = reader.uint32();
|
|
3524
|
+
continue;
|
|
3525
|
+
}
|
|
3526
|
+
case 12: {
|
|
3527
|
+
if (tag !== 96) {
|
|
3528
|
+
break;
|
|
3529
|
+
}
|
|
3530
|
+
message.version = reader.uint32();
|
|
3531
|
+
continue;
|
|
3532
|
+
}
|
|
3533
|
+
case 13: {
|
|
3534
|
+
if (tag !== 104) {
|
|
3535
|
+
break;
|
|
3536
|
+
}
|
|
3537
|
+
message.replacesId = Long.fromString(reader.uint64().toString(), true);
|
|
3538
|
+
continue;
|
|
3539
|
+
}
|
|
3540
|
+
case 14: {
|
|
3541
|
+
if (tag !== 112) {
|
|
3542
|
+
break;
|
|
3543
|
+
}
|
|
3544
|
+
message.status = reader.int32();
|
|
3545
|
+
continue;
|
|
3546
|
+
}
|
|
3547
|
+
case 15: {
|
|
3548
|
+
if (tag !== 120) {
|
|
3549
|
+
break;
|
|
3550
|
+
}
|
|
3551
|
+
message.review = reader.int32();
|
|
3552
|
+
continue;
|
|
3553
|
+
}
|
|
3554
|
+
case 16: {
|
|
3555
|
+
if (tag !== 130) {
|
|
3556
|
+
break;
|
|
3557
|
+
}
|
|
3558
|
+
message.reviewNote = reader.string();
|
|
3559
|
+
continue;
|
|
3560
|
+
}
|
|
3561
|
+
case 17: {
|
|
3562
|
+
if (tag !== 136) {
|
|
3563
|
+
break;
|
|
3564
|
+
}
|
|
3565
|
+
message.reviewedBy = Long.fromString(reader.uint64().toString(), true);
|
|
3566
|
+
continue;
|
|
3567
|
+
}
|
|
3568
|
+
case 18: {
|
|
3569
|
+
if (tag !== 146) {
|
|
3570
|
+
break;
|
|
3571
|
+
}
|
|
3572
|
+
message.verificationCode = reader.string();
|
|
3573
|
+
continue;
|
|
3574
|
+
}
|
|
3575
|
+
case 19: {
|
|
3576
|
+
if (tag !== 154) {
|
|
3577
|
+
break;
|
|
3578
|
+
}
|
|
3579
|
+
message.mime = reader.string();
|
|
3580
|
+
continue;
|
|
3581
|
+
}
|
|
3582
|
+
case 20: {
|
|
3583
|
+
if (tag !== 160) {
|
|
3584
|
+
break;
|
|
3585
|
+
}
|
|
3586
|
+
message.size = Long.fromString(reader.uint64().toString(), true);
|
|
3587
|
+
continue;
|
|
3588
|
+
}
|
|
3589
|
+
case 21: {
|
|
3590
|
+
if (tag !== 168) {
|
|
3591
|
+
break;
|
|
3592
|
+
}
|
|
3593
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
3594
|
+
continue;
|
|
3595
|
+
}
|
|
3596
|
+
case 22: {
|
|
3597
|
+
if (tag !== 178) {
|
|
3598
|
+
break;
|
|
3599
|
+
}
|
|
3600
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3601
|
+
continue;
|
|
3602
|
+
}
|
|
3603
|
+
case 23: {
|
|
3604
|
+
if (tag !== 186) {
|
|
3605
|
+
break;
|
|
3606
|
+
}
|
|
3607
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3608
|
+
continue;
|
|
3609
|
+
}
|
|
3610
|
+
case 24: {
|
|
3611
|
+
if (tag !== 194) {
|
|
3612
|
+
break;
|
|
3613
|
+
}
|
|
3614
|
+
message.archivedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3615
|
+
continue;
|
|
3616
|
+
}
|
|
3617
|
+
case 25: {
|
|
3618
|
+
if (tag !== 202) {
|
|
3619
|
+
break;
|
|
3620
|
+
}
|
|
3621
|
+
message.versions.push(FleetDocument.decode(reader, reader.uint32()));
|
|
3622
|
+
continue;
|
|
3623
|
+
}
|
|
3624
|
+
}
|
|
3625
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3626
|
+
break;
|
|
3627
|
+
}
|
|
3628
|
+
reader.skip(tag & 7);
|
|
3629
|
+
}
|
|
3630
|
+
return message;
|
|
3631
|
+
},
|
|
3632
|
+
create(base) {
|
|
3633
|
+
return FleetDocument.fromPartial(base ?? {});
|
|
3634
|
+
},
|
|
3635
|
+
fromPartial(object) {
|
|
3636
|
+
const message = createBaseFleetDocument();
|
|
3637
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
3638
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
3639
|
+
? Long.fromValue(object.organizationId)
|
|
3640
|
+
: Long.UZERO;
|
|
3641
|
+
message.name = object.name ?? undefined;
|
|
3642
|
+
message.docType = object.docType ?? 0;
|
|
3643
|
+
message.url = object.url ?? "";
|
|
3644
|
+
message.objectType = object.objectType ?? undefined;
|
|
3645
|
+
message.objectId = (object.objectId !== undefined && object.objectId !== null)
|
|
3646
|
+
? Long.fromValue(object.objectId)
|
|
3647
|
+
: undefined;
|
|
3648
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
3649
|
+
? Long.fromValue(object.deviceId)
|
|
3650
|
+
: undefined;
|
|
3651
|
+
message.issuedAt = object.issuedAt ?? undefined;
|
|
3652
|
+
message.expiresAt = object.expiresAt ?? undefined;
|
|
3653
|
+
message.remindDaysBefore = object.remindDaysBefore ?? undefined;
|
|
3654
|
+
message.version = object.version ?? 0;
|
|
3655
|
+
message.replacesId = (object.replacesId !== undefined && object.replacesId !== null)
|
|
3656
|
+
? Long.fromValue(object.replacesId)
|
|
3657
|
+
: undefined;
|
|
3658
|
+
message.status = object.status ?? 0;
|
|
3659
|
+
message.review = object.review ?? 0;
|
|
3660
|
+
message.reviewNote = object.reviewNote ?? undefined;
|
|
3661
|
+
message.reviewedBy = (object.reviewedBy !== undefined && object.reviewedBy !== null)
|
|
3662
|
+
? Long.fromValue(object.reviewedBy)
|
|
3663
|
+
: undefined;
|
|
3664
|
+
message.verificationCode = object.verificationCode ?? undefined;
|
|
3665
|
+
message.mime = object.mime ?? undefined;
|
|
3666
|
+
message.size = (object.size !== undefined && object.size !== null) ? Long.fromValue(object.size) : undefined;
|
|
3667
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
3668
|
+
? Long.fromValue(object.createdBy)
|
|
3669
|
+
: undefined;
|
|
3670
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
3671
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
3672
|
+
message.archivedAt = object.archivedAt ?? undefined;
|
|
3673
|
+
message.versions = object.versions?.map((e) => FleetDocument.fromPartial(e)) || [];
|
|
3674
|
+
return message;
|
|
3675
|
+
},
|
|
3676
|
+
};
|
|
3677
|
+
function createBaseDocumentRequirement() {
|
|
3678
|
+
return {
|
|
3679
|
+
id: Long.UZERO,
|
|
3680
|
+
organizationId: Long.UZERO,
|
|
3681
|
+
docType: 0,
|
|
3682
|
+
appliesTo: 0,
|
|
3683
|
+
condition: 0,
|
|
3684
|
+
conditionIds: [],
|
|
3685
|
+
mandatory: false,
|
|
3686
|
+
isActive: false,
|
|
3687
|
+
metCount: 0,
|
|
3688
|
+
missingCount: 0,
|
|
3689
|
+
dueSoonCount: 0,
|
|
3690
|
+
subjects: [],
|
|
3691
|
+
createdBy: undefined,
|
|
3692
|
+
createdAt: undefined,
|
|
3693
|
+
updatedAt: undefined,
|
|
3694
|
+
};
|
|
3695
|
+
}
|
|
3696
|
+
export const DocumentRequirement = {
|
|
3697
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3698
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
3699
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
3700
|
+
}
|
|
3701
|
+
if (!message.organizationId.equals(Long.UZERO)) {
|
|
3702
|
+
writer.uint32(16).uint64(message.organizationId.toString());
|
|
3703
|
+
}
|
|
3704
|
+
if (message.docType !== 0) {
|
|
3705
|
+
writer.uint32(24).int32(message.docType);
|
|
3706
|
+
}
|
|
3707
|
+
if (message.appliesTo !== 0) {
|
|
3708
|
+
writer.uint32(32).int32(message.appliesTo);
|
|
3709
|
+
}
|
|
3710
|
+
if (message.condition !== 0) {
|
|
3711
|
+
writer.uint32(40).int32(message.condition);
|
|
3712
|
+
}
|
|
3713
|
+
writer.uint32(50).fork();
|
|
3714
|
+
for (const v of message.conditionIds) {
|
|
3715
|
+
writer.uint64(v.toString());
|
|
3716
|
+
}
|
|
3717
|
+
writer.join();
|
|
3718
|
+
if (message.mandatory !== false) {
|
|
3719
|
+
writer.uint32(56).bool(message.mandatory);
|
|
3720
|
+
}
|
|
3721
|
+
if (message.isActive !== false) {
|
|
3722
|
+
writer.uint32(64).bool(message.isActive);
|
|
3723
|
+
}
|
|
3724
|
+
if (message.metCount !== 0) {
|
|
3725
|
+
writer.uint32(72).uint32(message.metCount);
|
|
3726
|
+
}
|
|
3727
|
+
if (message.missingCount !== 0) {
|
|
3728
|
+
writer.uint32(80).uint32(message.missingCount);
|
|
3729
|
+
}
|
|
3730
|
+
if (message.dueSoonCount !== 0) {
|
|
3731
|
+
writer.uint32(88).uint32(message.dueSoonCount);
|
|
3732
|
+
}
|
|
3733
|
+
for (const v of message.subjects) {
|
|
3734
|
+
DocumentRequirement_Subject.encode(v, writer.uint32(98).fork()).join();
|
|
3735
|
+
}
|
|
3736
|
+
if (message.createdBy !== undefined) {
|
|
3737
|
+
writer.uint32(104).uint64(message.createdBy.toString());
|
|
3738
|
+
}
|
|
3739
|
+
if (message.createdAt !== undefined) {
|
|
3740
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(114).fork()).join();
|
|
3741
|
+
}
|
|
3742
|
+
if (message.updatedAt !== undefined) {
|
|
3743
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(122).fork()).join();
|
|
3744
|
+
}
|
|
3745
|
+
return writer;
|
|
3746
|
+
},
|
|
3747
|
+
decode(input, length) {
|
|
3748
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3749
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3750
|
+
const message = createBaseDocumentRequirement();
|
|
3751
|
+
while (reader.pos < end) {
|
|
3752
|
+
const tag = reader.uint32();
|
|
3753
|
+
switch (tag >>> 3) {
|
|
3754
|
+
case 1: {
|
|
3755
|
+
if (tag !== 8) {
|
|
3756
|
+
break;
|
|
3757
|
+
}
|
|
3758
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
3759
|
+
continue;
|
|
3760
|
+
}
|
|
3761
|
+
case 2: {
|
|
3762
|
+
if (tag !== 16) {
|
|
3763
|
+
break;
|
|
3764
|
+
}
|
|
3765
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
3766
|
+
continue;
|
|
3767
|
+
}
|
|
3768
|
+
case 3: {
|
|
3769
|
+
if (tag !== 24) {
|
|
3770
|
+
break;
|
|
3771
|
+
}
|
|
3772
|
+
message.docType = reader.int32();
|
|
3773
|
+
continue;
|
|
3774
|
+
}
|
|
3775
|
+
case 4: {
|
|
3776
|
+
if (tag !== 32) {
|
|
3777
|
+
break;
|
|
3778
|
+
}
|
|
3779
|
+
message.appliesTo = reader.int32();
|
|
3780
|
+
continue;
|
|
3781
|
+
}
|
|
3782
|
+
case 5: {
|
|
3783
|
+
if (tag !== 40) {
|
|
3784
|
+
break;
|
|
3785
|
+
}
|
|
3786
|
+
message.condition = reader.int32();
|
|
3787
|
+
continue;
|
|
3788
|
+
}
|
|
3789
|
+
case 6: {
|
|
3790
|
+
if (tag === 48) {
|
|
3791
|
+
message.conditionIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
3792
|
+
continue;
|
|
3793
|
+
}
|
|
3794
|
+
if (tag === 50) {
|
|
3795
|
+
const end2 = reader.uint32() + reader.pos;
|
|
3796
|
+
while (reader.pos < end2) {
|
|
3797
|
+
message.conditionIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
3798
|
+
}
|
|
3799
|
+
continue;
|
|
3800
|
+
}
|
|
3801
|
+
break;
|
|
3802
|
+
}
|
|
3803
|
+
case 7: {
|
|
3804
|
+
if (tag !== 56) {
|
|
3805
|
+
break;
|
|
3806
|
+
}
|
|
3807
|
+
message.mandatory = reader.bool();
|
|
3808
|
+
continue;
|
|
3809
|
+
}
|
|
3810
|
+
case 8: {
|
|
3811
|
+
if (tag !== 64) {
|
|
3812
|
+
break;
|
|
3813
|
+
}
|
|
3814
|
+
message.isActive = reader.bool();
|
|
3815
|
+
continue;
|
|
3816
|
+
}
|
|
3817
|
+
case 9: {
|
|
3818
|
+
if (tag !== 72) {
|
|
3819
|
+
break;
|
|
3820
|
+
}
|
|
3821
|
+
message.metCount = reader.uint32();
|
|
3822
|
+
continue;
|
|
3823
|
+
}
|
|
3824
|
+
case 10: {
|
|
3825
|
+
if (tag !== 80) {
|
|
3826
|
+
break;
|
|
3827
|
+
}
|
|
3828
|
+
message.missingCount = reader.uint32();
|
|
3829
|
+
continue;
|
|
3830
|
+
}
|
|
3831
|
+
case 11: {
|
|
3832
|
+
if (tag !== 88) {
|
|
3833
|
+
break;
|
|
3834
|
+
}
|
|
3835
|
+
message.dueSoonCount = reader.uint32();
|
|
3836
|
+
continue;
|
|
3837
|
+
}
|
|
3838
|
+
case 12: {
|
|
3839
|
+
if (tag !== 98) {
|
|
3840
|
+
break;
|
|
3841
|
+
}
|
|
3842
|
+
message.subjects.push(DocumentRequirement_Subject.decode(reader, reader.uint32()));
|
|
3843
|
+
continue;
|
|
3844
|
+
}
|
|
3845
|
+
case 13: {
|
|
3846
|
+
if (tag !== 104) {
|
|
3847
|
+
break;
|
|
3848
|
+
}
|
|
3849
|
+
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
3850
|
+
continue;
|
|
3851
|
+
}
|
|
3852
|
+
case 14: {
|
|
3853
|
+
if (tag !== 114) {
|
|
3854
|
+
break;
|
|
3855
|
+
}
|
|
3856
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3857
|
+
continue;
|
|
3858
|
+
}
|
|
3859
|
+
case 15: {
|
|
3860
|
+
if (tag !== 122) {
|
|
3861
|
+
break;
|
|
3862
|
+
}
|
|
3863
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3864
|
+
continue;
|
|
3865
|
+
}
|
|
3866
|
+
}
|
|
3867
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3868
|
+
break;
|
|
3869
|
+
}
|
|
3870
|
+
reader.skip(tag & 7);
|
|
3871
|
+
}
|
|
3872
|
+
return message;
|
|
3873
|
+
},
|
|
3874
|
+
create(base) {
|
|
3875
|
+
return DocumentRequirement.fromPartial(base ?? {});
|
|
3876
|
+
},
|
|
3877
|
+
fromPartial(object) {
|
|
3878
|
+
const message = createBaseDocumentRequirement();
|
|
3879
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
3880
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
3881
|
+
? Long.fromValue(object.organizationId)
|
|
3882
|
+
: Long.UZERO;
|
|
3883
|
+
message.docType = object.docType ?? 0;
|
|
3884
|
+
message.appliesTo = object.appliesTo ?? 0;
|
|
3885
|
+
message.condition = object.condition ?? 0;
|
|
3886
|
+
message.conditionIds = object.conditionIds?.map((e) => Long.fromValue(e)) || [];
|
|
3887
|
+
message.mandatory = object.mandatory ?? false;
|
|
3888
|
+
message.isActive = object.isActive ?? false;
|
|
3889
|
+
message.metCount = object.metCount ?? 0;
|
|
3890
|
+
message.missingCount = object.missingCount ?? 0;
|
|
3891
|
+
message.dueSoonCount = object.dueSoonCount ?? 0;
|
|
3892
|
+
message.subjects = object.subjects?.map((e) => DocumentRequirement_Subject.fromPartial(e)) || [];
|
|
3893
|
+
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
3894
|
+
? Long.fromValue(object.createdBy)
|
|
3895
|
+
: undefined;
|
|
3896
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
3897
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
3898
|
+
return message;
|
|
3899
|
+
},
|
|
3900
|
+
};
|
|
3901
|
+
function createBaseDocumentRequirement_Subject() {
|
|
3902
|
+
return { subjectType: 0, subjectId: Long.UZERO, name: "", deviceId: undefined, state: 0, document: undefined };
|
|
3903
|
+
}
|
|
3904
|
+
export const DocumentRequirement_Subject = {
|
|
3905
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3906
|
+
if (message.subjectType !== 0) {
|
|
3907
|
+
writer.uint32(8).int32(message.subjectType);
|
|
3908
|
+
}
|
|
3909
|
+
if (!message.subjectId.equals(Long.UZERO)) {
|
|
3910
|
+
writer.uint32(16).uint64(message.subjectId.toString());
|
|
3911
|
+
}
|
|
3912
|
+
if (message.name !== "") {
|
|
3913
|
+
writer.uint32(26).string(message.name);
|
|
3914
|
+
}
|
|
3915
|
+
if (message.deviceId !== undefined) {
|
|
3916
|
+
writer.uint32(32).uint64(message.deviceId.toString());
|
|
3917
|
+
}
|
|
3918
|
+
if (message.state !== 0) {
|
|
3919
|
+
writer.uint32(40).int32(message.state);
|
|
3920
|
+
}
|
|
3921
|
+
if (message.document !== undefined) {
|
|
3922
|
+
FleetDocument.encode(message.document, writer.uint32(50).fork()).join();
|
|
3923
|
+
}
|
|
3924
|
+
return writer;
|
|
3925
|
+
},
|
|
3926
|
+
decode(input, length) {
|
|
3927
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3928
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3929
|
+
const message = createBaseDocumentRequirement_Subject();
|
|
3930
|
+
while (reader.pos < end) {
|
|
3931
|
+
const tag = reader.uint32();
|
|
3932
|
+
switch (tag >>> 3) {
|
|
3933
|
+
case 1: {
|
|
3934
|
+
if (tag !== 8) {
|
|
3935
|
+
break;
|
|
3936
|
+
}
|
|
3937
|
+
message.subjectType = reader.int32();
|
|
3938
|
+
continue;
|
|
3939
|
+
}
|
|
3940
|
+
case 2: {
|
|
3941
|
+
if (tag !== 16) {
|
|
3942
|
+
break;
|
|
3943
|
+
}
|
|
3944
|
+
message.subjectId = Long.fromString(reader.uint64().toString(), true);
|
|
3945
|
+
continue;
|
|
3946
|
+
}
|
|
3947
|
+
case 3: {
|
|
3948
|
+
if (tag !== 26) {
|
|
3949
|
+
break;
|
|
3950
|
+
}
|
|
3951
|
+
message.name = reader.string();
|
|
3952
|
+
continue;
|
|
3953
|
+
}
|
|
3954
|
+
case 4: {
|
|
3955
|
+
if (tag !== 32) {
|
|
3956
|
+
break;
|
|
3957
|
+
}
|
|
3958
|
+
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
3959
|
+
continue;
|
|
3960
|
+
}
|
|
3961
|
+
case 5: {
|
|
3962
|
+
if (tag !== 40) {
|
|
3963
|
+
break;
|
|
3964
|
+
}
|
|
3965
|
+
message.state = reader.int32();
|
|
3966
|
+
continue;
|
|
3967
|
+
}
|
|
3968
|
+
case 6: {
|
|
3969
|
+
if (tag !== 50) {
|
|
3970
|
+
break;
|
|
3971
|
+
}
|
|
3972
|
+
message.document = FleetDocument.decode(reader, reader.uint32());
|
|
3973
|
+
continue;
|
|
3974
|
+
}
|
|
3975
|
+
}
|
|
3976
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3977
|
+
break;
|
|
3978
|
+
}
|
|
3979
|
+
reader.skip(tag & 7);
|
|
3980
|
+
}
|
|
3981
|
+
return message;
|
|
3982
|
+
},
|
|
3983
|
+
create(base) {
|
|
3984
|
+
return DocumentRequirement_Subject.fromPartial(base ?? {});
|
|
3985
|
+
},
|
|
3986
|
+
fromPartial(object) {
|
|
3987
|
+
const message = createBaseDocumentRequirement_Subject();
|
|
3988
|
+
message.subjectType = object.subjectType ?? 0;
|
|
3989
|
+
message.subjectId = (object.subjectId !== undefined && object.subjectId !== null)
|
|
3990
|
+
? Long.fromValue(object.subjectId)
|
|
3991
|
+
: Long.UZERO;
|
|
3992
|
+
message.name = object.name ?? "";
|
|
3993
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
3994
|
+
? Long.fromValue(object.deviceId)
|
|
3995
|
+
: undefined;
|
|
3996
|
+
message.state = object.state ?? 0;
|
|
3997
|
+
message.document = (object.document !== undefined && object.document !== null)
|
|
3998
|
+
? FleetDocument.fromPartial(object.document)
|
|
3999
|
+
: undefined;
|
|
4000
|
+
return message;
|
|
4001
|
+
},
|
|
4002
|
+
};
|
|
4003
|
+
function createBaseFleetInboxItem() {
|
|
4004
|
+
return {
|
|
4005
|
+
kind: 0,
|
|
4006
|
+
subjectType: 0,
|
|
4007
|
+
subjectId: Long.UZERO,
|
|
4008
|
+
deviceId: undefined,
|
|
4009
|
+
title: "",
|
|
4010
|
+
subtitle: undefined,
|
|
4011
|
+
amount: undefined,
|
|
4012
|
+
currencyId: undefined,
|
|
4013
|
+
urgent: false,
|
|
4014
|
+
since: undefined,
|
|
4015
|
+
flags: [],
|
|
4016
|
+
};
|
|
4017
|
+
}
|
|
4018
|
+
export const FleetInboxItem = {
|
|
4019
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4020
|
+
if (message.kind !== 0) {
|
|
4021
|
+
writer.uint32(8).int32(message.kind);
|
|
4022
|
+
}
|
|
4023
|
+
if (message.subjectType !== 0) {
|
|
4024
|
+
writer.uint32(16).int32(message.subjectType);
|
|
4025
|
+
}
|
|
4026
|
+
if (!message.subjectId.equals(Long.UZERO)) {
|
|
4027
|
+
writer.uint32(24).uint64(message.subjectId.toString());
|
|
4028
|
+
}
|
|
4029
|
+
if (message.deviceId !== undefined) {
|
|
4030
|
+
writer.uint32(32).uint64(message.deviceId.toString());
|
|
4031
|
+
}
|
|
4032
|
+
if (message.title !== "") {
|
|
4033
|
+
writer.uint32(42).string(message.title);
|
|
4034
|
+
}
|
|
4035
|
+
if (message.subtitle !== undefined) {
|
|
4036
|
+
writer.uint32(50).string(message.subtitle);
|
|
4037
|
+
}
|
|
4038
|
+
if (message.amount !== undefined) {
|
|
4039
|
+
writer.uint32(57).double(message.amount);
|
|
4040
|
+
}
|
|
4041
|
+
if (message.currencyId !== undefined) {
|
|
4042
|
+
writer.uint32(64).uint64(message.currencyId.toString());
|
|
4043
|
+
}
|
|
4044
|
+
if (message.urgent !== false) {
|
|
4045
|
+
writer.uint32(72).bool(message.urgent);
|
|
4046
|
+
}
|
|
4047
|
+
if (message.since !== undefined) {
|
|
4048
|
+
Timestamp.encode(toTimestamp(message.since), writer.uint32(82).fork()).join();
|
|
4049
|
+
}
|
|
4050
|
+
writer.uint32(90).fork();
|
|
4051
|
+
for (const v of message.flags) {
|
|
4052
|
+
writer.int32(v);
|
|
4053
|
+
}
|
|
4054
|
+
writer.join();
|
|
4055
|
+
return writer;
|
|
4056
|
+
},
|
|
4057
|
+
decode(input, length) {
|
|
4058
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4059
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4060
|
+
const message = createBaseFleetInboxItem();
|
|
4061
|
+
while (reader.pos < end) {
|
|
4062
|
+
const tag = reader.uint32();
|
|
4063
|
+
switch (tag >>> 3) {
|
|
4064
|
+
case 1: {
|
|
4065
|
+
if (tag !== 8) {
|
|
4066
|
+
break;
|
|
4067
|
+
}
|
|
4068
|
+
message.kind = reader.int32();
|
|
4069
|
+
continue;
|
|
4070
|
+
}
|
|
4071
|
+
case 2: {
|
|
4072
|
+
if (tag !== 16) {
|
|
4073
|
+
break;
|
|
4074
|
+
}
|
|
4075
|
+
message.subjectType = reader.int32();
|
|
4076
|
+
continue;
|
|
4077
|
+
}
|
|
4078
|
+
case 3: {
|
|
4079
|
+
if (tag !== 24) {
|
|
4080
|
+
break;
|
|
4081
|
+
}
|
|
4082
|
+
message.subjectId = Long.fromString(reader.uint64().toString(), true);
|
|
4083
|
+
continue;
|
|
4084
|
+
}
|
|
4085
|
+
case 4: {
|
|
4086
|
+
if (tag !== 32) {
|
|
4087
|
+
break;
|
|
4088
|
+
}
|
|
4089
|
+
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
4090
|
+
continue;
|
|
4091
|
+
}
|
|
4092
|
+
case 5: {
|
|
4093
|
+
if (tag !== 42) {
|
|
4094
|
+
break;
|
|
4095
|
+
}
|
|
4096
|
+
message.title = reader.string();
|
|
4097
|
+
continue;
|
|
4098
|
+
}
|
|
4099
|
+
case 6: {
|
|
4100
|
+
if (tag !== 50) {
|
|
4101
|
+
break;
|
|
4102
|
+
}
|
|
4103
|
+
message.subtitle = reader.string();
|
|
4104
|
+
continue;
|
|
4105
|
+
}
|
|
4106
|
+
case 7: {
|
|
4107
|
+
if (tag !== 57) {
|
|
4108
|
+
break;
|
|
4109
|
+
}
|
|
4110
|
+
message.amount = reader.double();
|
|
4111
|
+
continue;
|
|
4112
|
+
}
|
|
4113
|
+
case 8: {
|
|
4114
|
+
if (tag !== 64) {
|
|
4115
|
+
break;
|
|
4116
|
+
}
|
|
4117
|
+
message.currencyId = Long.fromString(reader.uint64().toString(), true);
|
|
4118
|
+
continue;
|
|
4119
|
+
}
|
|
4120
|
+
case 9: {
|
|
4121
|
+
if (tag !== 72) {
|
|
4122
|
+
break;
|
|
4123
|
+
}
|
|
4124
|
+
message.urgent = reader.bool();
|
|
4125
|
+
continue;
|
|
4126
|
+
}
|
|
4127
|
+
case 10: {
|
|
4128
|
+
if (tag !== 82) {
|
|
4129
|
+
break;
|
|
4130
|
+
}
|
|
4131
|
+
message.since = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
4132
|
+
continue;
|
|
4133
|
+
}
|
|
4134
|
+
case 11: {
|
|
4135
|
+
if (tag === 88) {
|
|
4136
|
+
message.flags.push(reader.int32());
|
|
4137
|
+
continue;
|
|
4138
|
+
}
|
|
4139
|
+
if (tag === 90) {
|
|
4140
|
+
const end2 = reader.uint32() + reader.pos;
|
|
4141
|
+
while (reader.pos < end2) {
|
|
4142
|
+
message.flags.push(reader.int32());
|
|
4143
|
+
}
|
|
4144
|
+
continue;
|
|
4145
|
+
}
|
|
4146
|
+
break;
|
|
4147
|
+
}
|
|
4148
|
+
}
|
|
4149
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4150
|
+
break;
|
|
4151
|
+
}
|
|
4152
|
+
reader.skip(tag & 7);
|
|
4153
|
+
}
|
|
4154
|
+
return message;
|
|
4155
|
+
},
|
|
4156
|
+
create(base) {
|
|
4157
|
+
return FleetInboxItem.fromPartial(base ?? {});
|
|
4158
|
+
},
|
|
4159
|
+
fromPartial(object) {
|
|
4160
|
+
const message = createBaseFleetInboxItem();
|
|
4161
|
+
message.kind = object.kind ?? 0;
|
|
4162
|
+
message.subjectType = object.subjectType ?? 0;
|
|
4163
|
+
message.subjectId = (object.subjectId !== undefined && object.subjectId !== null)
|
|
4164
|
+
? Long.fromValue(object.subjectId)
|
|
4165
|
+
: Long.UZERO;
|
|
4166
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
4167
|
+
? Long.fromValue(object.deviceId)
|
|
4168
|
+
: undefined;
|
|
4169
|
+
message.title = object.title ?? "";
|
|
4170
|
+
message.subtitle = object.subtitle ?? undefined;
|
|
4171
|
+
message.amount = object.amount ?? undefined;
|
|
4172
|
+
message.currencyId = (object.currencyId !== undefined && object.currencyId !== null)
|
|
4173
|
+
? Long.fromValue(object.currencyId)
|
|
4174
|
+
: undefined;
|
|
4175
|
+
message.urgent = object.urgent ?? false;
|
|
4176
|
+
message.since = object.since ?? undefined;
|
|
4177
|
+
message.flags = object.flags?.map((e) => e) || [];
|
|
4178
|
+
return message;
|
|
4179
|
+
},
|
|
4180
|
+
};
|
|
4181
|
+
function toTimestamp(date) {
|
|
4182
|
+
const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
|
|
4183
|
+
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
4184
|
+
return { seconds, nanos };
|
|
4185
|
+
}
|
|
4186
|
+
function fromTimestamp(t) {
|
|
4187
|
+
let millis = (t.seconds.toNumber() || 0) * 1_000;
|
|
4188
|
+
millis += (t.nanos || 0) / 1_000_000;
|
|
4189
|
+
return new globalThis.Date(millis);
|
|
4190
|
+
}
|
|
4191
|
+
function numberToLong(number) {
|
|
4192
|
+
return Long.fromNumber(number);
|
|
4193
|
+
}
|