@fatehan/tsrp 1.6.16 → 1.6.18
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/package.json +1 -1
- package/dist/fatehan/activities/workflow.d.ts +0 -219
- package/dist/fatehan/activities/workflow.d.ts.map +0 -1
- package/dist/fatehan/activities/workflow.js +0 -1941
- package/dist/fatehan/activities/workshift.d.ts +0 -140
- package/dist/fatehan/activities/workshift.d.ts.map +0 -1
- package/dist/fatehan/activities/workshift.js +0 -1244
- package/dist/fatehan/apis/client.d.ts +0 -246
- package/dist/fatehan/apis/client.d.ts.map +0 -1
- package/dist/fatehan/apis/client.js +0 -2572
- package/dist/fatehan/areas/area.d.ts +0 -96
- package/dist/fatehan/areas/area.d.ts.map +0 -1
- package/dist/fatehan/areas/area.js +0 -761
- package/dist/fatehan/devices/devices.d.ts +0 -256
- package/dist/fatehan/devices/devices.d.ts.map +0 -1
- package/dist/fatehan/devices/devices.js +0 -2730
- package/dist/fatehan/devices/maintenance.d.ts +0 -64
- package/dist/fatehan/devices/maintenance.d.ts.map +0 -1
- package/dist/fatehan/devices/maintenance.js +0 -484
- package/dist/fatehan/financial/financial.d.ts +0 -162
- package/dist/fatehan/financial/financial.d.ts.map +0 -1
- package/dist/fatehan/financial/financial.js +0 -1701
- package/dist/fatehan/google/protobuf/descriptor.d.ts +0 -1303
- package/dist/fatehan/google/protobuf/descriptor.d.ts.map +0 -1
- package/dist/fatehan/google/protobuf/descriptor.js +0 -3467
- package/dist/fatehan/google/protobuf/duration.d.ts +0 -99
- package/dist/fatehan/google/protobuf/duration.d.ts.map +0 -1
- package/dist/fatehan/google/protobuf/duration.js +0 -63
- package/dist/fatehan/google/protobuf/field_mask.d.ts +0 -228
- package/dist/fatehan/google/protobuf/field_mask.d.ts.map +0 -1
- package/dist/fatehan/google/protobuf/field_mask.js +0 -57
- package/dist/fatehan/google/protobuf/timestamp.d.ts +0 -129
- package/dist/fatehan/google/protobuf/timestamp.d.ts.map +0 -1
- package/dist/fatehan/google/protobuf/timestamp.js +0 -63
- package/dist/fatehan/identities/authentication.d.ts +0 -164
- package/dist/fatehan/identities/authentication.d.ts.map +0 -1
- package/dist/fatehan/identities/authentication.js +0 -1291
- package/dist/fatehan/identities/identities.d.ts +0 -969
- package/dist/fatehan/identities/identities.d.ts.map +0 -1
- package/dist/fatehan/identities/identities.js +0 -2993
- package/dist/fatehan/models/fusion.d.ts +0 -149
- package/dist/fatehan/models/fusion.d.ts.map +0 -1
- package/dist/fatehan/models/fusion.js +0 -1531
- package/dist/fatehan/models/models.d.ts +0 -162
- package/dist/fatehan/models/models.d.ts.map +0 -1
- package/dist/fatehan/models/models.js +0 -1486
- package/dist/fatehan/notifies/direct.d.ts +0 -85
- package/dist/fatehan/notifies/direct.d.ts.map +0 -1
- package/dist/fatehan/notifies/direct.js +0 -669
- package/dist/fatehan/notifies/notify.d.ts +0 -232
- package/dist/fatehan/notifies/notify.d.ts.map +0 -1
- package/dist/fatehan/notifies/notify.js +0 -1958
- package/dist/fatehan/packets/commands.d.ts +0 -150
- package/dist/fatehan/packets/commands.d.ts.map +0 -1
- package/dist/fatehan/packets/commands.js +0 -1364
- package/dist/fatehan/packets/dataModel.d.ts +0 -1610
- package/dist/fatehan/packets/dataModel.d.ts.map +0 -1
- package/dist/fatehan/packets/dataModel.js +0 -14947
- package/dist/fatehan/packets/dataModule.d.ts +0 -61
- package/dist/fatehan/packets/dataModule.d.ts.map +0 -1
- package/dist/fatehan/packets/dataModule.js +0 -386
- package/dist/fatehan/packets/forge.d.ts +0 -142
- package/dist/fatehan/packets/forge.d.ts.map +0 -1
- package/dist/fatehan/packets/forge.js +0 -1339
- package/dist/fatehan/services/api.d.ts +0 -1207
- package/dist/fatehan/services/api.d.ts.map +0 -1
- package/dist/fatehan/services/api.js +0 -12492
- package/dist/fatehan/services/repositories.d.ts +0 -78
- package/dist/fatehan/services/repositories.d.ts.map +0 -1
- package/dist/fatehan/services/repositories.js +0 -620
- package/dist/fatehan/stream/stream.d.ts +0 -224
- package/dist/fatehan/stream/stream.d.ts.map +0 -1
- package/dist/fatehan/stream/stream.js +0 -1416
- package/dist/fatehan/trips/trip.d.ts +0 -325
- package/dist/fatehan/trips/trip.d.ts.map +0 -1
- package/dist/fatehan/trips/trip.js +0 -1635
- package/dist/fatehan/utils/buf/validate/validate.d.ts +0 -3520
- package/dist/fatehan/utils/buf/validate/validate.d.ts.map +0 -1
- package/dist/fatehan/utils/buf/validate/validate.js +0 -4248
- package/dist/services.d.ts +0 -78
- package/dist/services.d.ts.map +0 -1
- package/dist/services.js +0 -242
- package/dist/store/system.io.d.ts +0 -6
- package/dist/store/system.io.d.ts.map +0 -1
- package/dist/store/system.io.js +0 -14
- package/dist/system.io.d.ts +0 -6
- package/dist/system.io.d.ts.map +0 -1
- package/dist/system.io.js +0 -208
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
import Long from "long";
|
|
3
|
-
export declare const protobufPackage = "com.fatehan.devices";
|
|
4
|
-
export declare enum MaintenanceStatus {
|
|
5
|
-
RUNNING = 0,
|
|
6
|
-
FINISHED = 1,
|
|
7
|
-
CANCELED = 2,
|
|
8
|
-
ACCEPTED = 3,
|
|
9
|
-
UNRECOGNIZED = -1
|
|
10
|
-
}
|
|
11
|
-
export interface Maintenance {
|
|
12
|
-
id: Long;
|
|
13
|
-
deviceId: Long;
|
|
14
|
-
serviceId: Long;
|
|
15
|
-
organizationId: Long;
|
|
16
|
-
createdBy?: Long | undefined;
|
|
17
|
-
updatedBy?: Long | undefined;
|
|
18
|
-
startedMileage?: Long | undefined;
|
|
19
|
-
startedUptime?: Long | undefined;
|
|
20
|
-
startedAt: Date | undefined;
|
|
21
|
-
expiresAt?: Date | undefined;
|
|
22
|
-
uptime?: number | undefined;
|
|
23
|
-
mileage?: number | undefined;
|
|
24
|
-
finishedAt?: Date | undefined;
|
|
25
|
-
currentUptime: Long;
|
|
26
|
-
currentMileage: Long;
|
|
27
|
-
status: MaintenanceStatus;
|
|
28
|
-
createdAt: Date | undefined;
|
|
29
|
-
updatedAt: Date | undefined;
|
|
30
|
-
service?: MaintenanceService | undefined;
|
|
31
|
-
}
|
|
32
|
-
export interface MaintenanceService {
|
|
33
|
-
id: Long;
|
|
34
|
-
name: string;
|
|
35
|
-
organizationId: Long;
|
|
36
|
-
createdBy?: Long | undefined;
|
|
37
|
-
updatedBy?: Long | undefined;
|
|
38
|
-
isDefault: boolean;
|
|
39
|
-
expireMileagePeriod?: Long | undefined;
|
|
40
|
-
expireDatePeriod?: Date | undefined;
|
|
41
|
-
expireActiveDurationPeriod?: Long | undefined;
|
|
42
|
-
createdAt?: Date | undefined;
|
|
43
|
-
updatedAt?: Date | undefined;
|
|
44
|
-
}
|
|
45
|
-
export declare const Maintenance: MessageFns<Maintenance>;
|
|
46
|
-
export declare const MaintenanceService: MessageFns<MaintenanceService>;
|
|
47
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
48
|
-
export type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
49
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
50
|
-
} : Partial<T>;
|
|
51
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
52
|
-
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
53
|
-
[K in keyof P]: Exact<P[K], I[K]>;
|
|
54
|
-
} & {
|
|
55
|
-
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
56
|
-
};
|
|
57
|
-
export interface MessageFns<T> {
|
|
58
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
59
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
60
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
61
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
62
|
-
}
|
|
63
|
-
export {};
|
|
64
|
-
//# sourceMappingURL=maintenance.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"maintenance.d.ts","sourceRoot":"","sources":["../../../src/fatehan/devices/maintenance.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAErD,oBAAY,iBAAiB;IAC3B,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,QAAQ,IAAI;IACZ,QAAQ,IAAI;IACZ,YAAY,KAAK;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,IAAI,CAAC;IACT,QAAQ,EAAE,IAAI,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,cAAc,EAAE,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC7B,cAAc,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAClC,aAAa,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IACjC,SAAS,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,UAAU,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC9B,aAAa,EAAE,IAAI,CAAC;IACpB,cAAc,EAAE,IAAI,CAAC;IACrB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,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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 MaintenanceStatus;
|
|
12
|
-
(function (MaintenanceStatus) {
|
|
13
|
-
MaintenanceStatus[MaintenanceStatus["RUNNING"] = 0] = "RUNNING";
|
|
14
|
-
MaintenanceStatus[MaintenanceStatus["FINISHED"] = 1] = "FINISHED";
|
|
15
|
-
MaintenanceStatus[MaintenanceStatus["CANCELED"] = 2] = "CANCELED";
|
|
16
|
-
MaintenanceStatus[MaintenanceStatus["ACCEPTED"] = 3] = "ACCEPTED";
|
|
17
|
-
MaintenanceStatus[MaintenanceStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
18
|
-
})(MaintenanceStatus || (MaintenanceStatus = {}));
|
|
19
|
-
function createBaseMaintenance() {
|
|
20
|
-
return {
|
|
21
|
-
id: Long.UZERO,
|
|
22
|
-
deviceId: Long.UZERO,
|
|
23
|
-
serviceId: Long.UZERO,
|
|
24
|
-
organizationId: Long.UZERO,
|
|
25
|
-
createdBy: undefined,
|
|
26
|
-
updatedBy: undefined,
|
|
27
|
-
startedMileage: undefined,
|
|
28
|
-
startedUptime: undefined,
|
|
29
|
-
startedAt: undefined,
|
|
30
|
-
expiresAt: undefined,
|
|
31
|
-
uptime: undefined,
|
|
32
|
-
mileage: undefined,
|
|
33
|
-
finishedAt: undefined,
|
|
34
|
-
currentUptime: Long.UZERO,
|
|
35
|
-
currentMileage: Long.UZERO,
|
|
36
|
-
status: 0,
|
|
37
|
-
createdAt: undefined,
|
|
38
|
-
updatedAt: undefined,
|
|
39
|
-
service: undefined,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
export const Maintenance = {
|
|
43
|
-
encode(message, writer = new BinaryWriter()) {
|
|
44
|
-
if (!message.id.equals(Long.UZERO)) {
|
|
45
|
-
writer.uint32(8).uint64(message.id.toString());
|
|
46
|
-
}
|
|
47
|
-
if (!message.deviceId.equals(Long.UZERO)) {
|
|
48
|
-
writer.uint32(16).uint64(message.deviceId.toString());
|
|
49
|
-
}
|
|
50
|
-
if (!message.serviceId.equals(Long.UZERO)) {
|
|
51
|
-
writer.uint32(24).uint64(message.serviceId.toString());
|
|
52
|
-
}
|
|
53
|
-
if (!message.organizationId.equals(Long.UZERO)) {
|
|
54
|
-
writer.uint32(32).uint64(message.organizationId.toString());
|
|
55
|
-
}
|
|
56
|
-
if (message.createdBy !== undefined) {
|
|
57
|
-
writer.uint32(40).uint64(message.createdBy.toString());
|
|
58
|
-
}
|
|
59
|
-
if (message.updatedBy !== undefined) {
|
|
60
|
-
writer.uint32(48).uint64(message.updatedBy.toString());
|
|
61
|
-
}
|
|
62
|
-
if (message.startedMileage !== undefined) {
|
|
63
|
-
writer.uint32(56).uint64(message.startedMileage.toString());
|
|
64
|
-
}
|
|
65
|
-
if (message.startedUptime !== undefined) {
|
|
66
|
-
writer.uint32(64).uint64(message.startedUptime.toString());
|
|
67
|
-
}
|
|
68
|
-
if (message.startedAt !== undefined) {
|
|
69
|
-
Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(74).fork()).join();
|
|
70
|
-
}
|
|
71
|
-
if (message.expiresAt !== undefined) {
|
|
72
|
-
Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(82).fork()).join();
|
|
73
|
-
}
|
|
74
|
-
if (message.uptime !== undefined) {
|
|
75
|
-
writer.uint32(88).uint32(message.uptime);
|
|
76
|
-
}
|
|
77
|
-
if (message.mileage !== undefined) {
|
|
78
|
-
writer.uint32(96).uint32(message.mileage);
|
|
79
|
-
}
|
|
80
|
-
if (message.finishedAt !== undefined) {
|
|
81
|
-
Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(106).fork()).join();
|
|
82
|
-
}
|
|
83
|
-
if (!message.currentUptime.equals(Long.UZERO)) {
|
|
84
|
-
writer.uint32(112).uint64(message.currentUptime.toString());
|
|
85
|
-
}
|
|
86
|
-
if (!message.currentMileage.equals(Long.UZERO)) {
|
|
87
|
-
writer.uint32(120).uint64(message.currentMileage.toString());
|
|
88
|
-
}
|
|
89
|
-
if (message.status !== 0) {
|
|
90
|
-
writer.uint32(128).int32(message.status);
|
|
91
|
-
}
|
|
92
|
-
if (message.createdAt !== undefined) {
|
|
93
|
-
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(138).fork()).join();
|
|
94
|
-
}
|
|
95
|
-
if (message.updatedAt !== undefined) {
|
|
96
|
-
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(146).fork()).join();
|
|
97
|
-
}
|
|
98
|
-
if (message.service !== undefined) {
|
|
99
|
-
MaintenanceService.encode(message.service, writer.uint32(154).fork()).join();
|
|
100
|
-
}
|
|
101
|
-
return writer;
|
|
102
|
-
},
|
|
103
|
-
decode(input, length) {
|
|
104
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
105
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
106
|
-
const message = createBaseMaintenance();
|
|
107
|
-
while (reader.pos < end) {
|
|
108
|
-
const tag = reader.uint32();
|
|
109
|
-
switch (tag >>> 3) {
|
|
110
|
-
case 1: {
|
|
111
|
-
if (tag !== 8) {
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
115
|
-
continue;
|
|
116
|
-
}
|
|
117
|
-
case 2: {
|
|
118
|
-
if (tag !== 16) {
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
121
|
-
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
case 3: {
|
|
125
|
-
if (tag !== 24) {
|
|
126
|
-
break;
|
|
127
|
-
}
|
|
128
|
-
message.serviceId = Long.fromString(reader.uint64().toString(), true);
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
case 4: {
|
|
132
|
-
if (tag !== 32) {
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
|
-
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
136
|
-
continue;
|
|
137
|
-
}
|
|
138
|
-
case 5: {
|
|
139
|
-
if (tag !== 40) {
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
143
|
-
continue;
|
|
144
|
-
}
|
|
145
|
-
case 6: {
|
|
146
|
-
if (tag !== 48) {
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
message.updatedBy = Long.fromString(reader.uint64().toString(), true);
|
|
150
|
-
continue;
|
|
151
|
-
}
|
|
152
|
-
case 7: {
|
|
153
|
-
if (tag !== 56) {
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
message.startedMileage = Long.fromString(reader.uint64().toString(), true);
|
|
157
|
-
continue;
|
|
158
|
-
}
|
|
159
|
-
case 8: {
|
|
160
|
-
if (tag !== 64) {
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
message.startedUptime = Long.fromString(reader.uint64().toString(), true);
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
case 9: {
|
|
167
|
-
if (tag !== 74) {
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
|
-
message.startedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
171
|
-
continue;
|
|
172
|
-
}
|
|
173
|
-
case 10: {
|
|
174
|
-
if (tag !== 82) {
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
message.expiresAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
178
|
-
continue;
|
|
179
|
-
}
|
|
180
|
-
case 11: {
|
|
181
|
-
if (tag !== 88) {
|
|
182
|
-
break;
|
|
183
|
-
}
|
|
184
|
-
message.uptime = reader.uint32();
|
|
185
|
-
continue;
|
|
186
|
-
}
|
|
187
|
-
case 12: {
|
|
188
|
-
if (tag !== 96) {
|
|
189
|
-
break;
|
|
190
|
-
}
|
|
191
|
-
message.mileage = reader.uint32();
|
|
192
|
-
continue;
|
|
193
|
-
}
|
|
194
|
-
case 13: {
|
|
195
|
-
if (tag !== 106) {
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
message.finishedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
case 14: {
|
|
202
|
-
if (tag !== 112) {
|
|
203
|
-
break;
|
|
204
|
-
}
|
|
205
|
-
message.currentUptime = Long.fromString(reader.uint64().toString(), true);
|
|
206
|
-
continue;
|
|
207
|
-
}
|
|
208
|
-
case 15: {
|
|
209
|
-
if (tag !== 120) {
|
|
210
|
-
break;
|
|
211
|
-
}
|
|
212
|
-
message.currentMileage = Long.fromString(reader.uint64().toString(), true);
|
|
213
|
-
continue;
|
|
214
|
-
}
|
|
215
|
-
case 16: {
|
|
216
|
-
if (tag !== 128) {
|
|
217
|
-
break;
|
|
218
|
-
}
|
|
219
|
-
message.status = reader.int32();
|
|
220
|
-
continue;
|
|
221
|
-
}
|
|
222
|
-
case 17: {
|
|
223
|
-
if (tag !== 138) {
|
|
224
|
-
break;
|
|
225
|
-
}
|
|
226
|
-
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
227
|
-
continue;
|
|
228
|
-
}
|
|
229
|
-
case 18: {
|
|
230
|
-
if (tag !== 146) {
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
234
|
-
continue;
|
|
235
|
-
}
|
|
236
|
-
case 19: {
|
|
237
|
-
if (tag !== 154) {
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
message.service = MaintenanceService.decode(reader, reader.uint32());
|
|
241
|
-
continue;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
reader.skip(tag & 7);
|
|
248
|
-
}
|
|
249
|
-
return message;
|
|
250
|
-
},
|
|
251
|
-
create(base) {
|
|
252
|
-
return Maintenance.fromPartial(base ?? {});
|
|
253
|
-
},
|
|
254
|
-
fromPartial(object) {
|
|
255
|
-
const message = createBaseMaintenance();
|
|
256
|
-
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
257
|
-
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
258
|
-
? Long.fromValue(object.deviceId)
|
|
259
|
-
: Long.UZERO;
|
|
260
|
-
message.serviceId = (object.serviceId !== undefined && object.serviceId !== null)
|
|
261
|
-
? Long.fromValue(object.serviceId)
|
|
262
|
-
: Long.UZERO;
|
|
263
|
-
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
264
|
-
? Long.fromValue(object.organizationId)
|
|
265
|
-
: Long.UZERO;
|
|
266
|
-
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
267
|
-
? Long.fromValue(object.createdBy)
|
|
268
|
-
: undefined;
|
|
269
|
-
message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
|
|
270
|
-
? Long.fromValue(object.updatedBy)
|
|
271
|
-
: undefined;
|
|
272
|
-
message.startedMileage = (object.startedMileage !== undefined && object.startedMileage !== null)
|
|
273
|
-
? Long.fromValue(object.startedMileage)
|
|
274
|
-
: undefined;
|
|
275
|
-
message.startedUptime = (object.startedUptime !== undefined && object.startedUptime !== null)
|
|
276
|
-
? Long.fromValue(object.startedUptime)
|
|
277
|
-
: undefined;
|
|
278
|
-
message.startedAt = object.startedAt ?? undefined;
|
|
279
|
-
message.expiresAt = object.expiresAt ?? undefined;
|
|
280
|
-
message.uptime = object.uptime ?? undefined;
|
|
281
|
-
message.mileage = object.mileage ?? undefined;
|
|
282
|
-
message.finishedAt = object.finishedAt ?? undefined;
|
|
283
|
-
message.currentUptime = (object.currentUptime !== undefined && object.currentUptime !== null)
|
|
284
|
-
? Long.fromValue(object.currentUptime)
|
|
285
|
-
: Long.UZERO;
|
|
286
|
-
message.currentMileage = (object.currentMileage !== undefined && object.currentMileage !== null)
|
|
287
|
-
? Long.fromValue(object.currentMileage)
|
|
288
|
-
: Long.UZERO;
|
|
289
|
-
message.status = object.status ?? 0;
|
|
290
|
-
message.createdAt = object.createdAt ?? undefined;
|
|
291
|
-
message.updatedAt = object.updatedAt ?? undefined;
|
|
292
|
-
message.service = (object.service !== undefined && object.service !== null)
|
|
293
|
-
? MaintenanceService.fromPartial(object.service)
|
|
294
|
-
: undefined;
|
|
295
|
-
return message;
|
|
296
|
-
},
|
|
297
|
-
};
|
|
298
|
-
function createBaseMaintenanceService() {
|
|
299
|
-
return {
|
|
300
|
-
id: Long.UZERO,
|
|
301
|
-
name: "",
|
|
302
|
-
organizationId: Long.UZERO,
|
|
303
|
-
createdBy: undefined,
|
|
304
|
-
updatedBy: undefined,
|
|
305
|
-
isDefault: false,
|
|
306
|
-
expireMileagePeriod: undefined,
|
|
307
|
-
expireDatePeriod: undefined,
|
|
308
|
-
expireActiveDurationPeriod: undefined,
|
|
309
|
-
createdAt: undefined,
|
|
310
|
-
updatedAt: undefined,
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
export const MaintenanceService = {
|
|
314
|
-
encode(message, writer = new BinaryWriter()) {
|
|
315
|
-
if (!message.id.equals(Long.UZERO)) {
|
|
316
|
-
writer.uint32(8).uint64(message.id.toString());
|
|
317
|
-
}
|
|
318
|
-
if (message.name !== "") {
|
|
319
|
-
writer.uint32(18).string(message.name);
|
|
320
|
-
}
|
|
321
|
-
if (!message.organizationId.equals(Long.UZERO)) {
|
|
322
|
-
writer.uint32(24).uint64(message.organizationId.toString());
|
|
323
|
-
}
|
|
324
|
-
if (message.createdBy !== undefined) {
|
|
325
|
-
writer.uint32(32).uint64(message.createdBy.toString());
|
|
326
|
-
}
|
|
327
|
-
if (message.updatedBy !== undefined) {
|
|
328
|
-
writer.uint32(40).uint64(message.updatedBy.toString());
|
|
329
|
-
}
|
|
330
|
-
if (message.isDefault !== false) {
|
|
331
|
-
writer.uint32(48).bool(message.isDefault);
|
|
332
|
-
}
|
|
333
|
-
if (message.expireMileagePeriod !== undefined) {
|
|
334
|
-
writer.uint32(56).uint64(message.expireMileagePeriod.toString());
|
|
335
|
-
}
|
|
336
|
-
if (message.expireDatePeriod !== undefined) {
|
|
337
|
-
Timestamp.encode(toTimestamp(message.expireDatePeriod), writer.uint32(66).fork()).join();
|
|
338
|
-
}
|
|
339
|
-
if (message.expireActiveDurationPeriod !== undefined) {
|
|
340
|
-
writer.uint32(72).uint64(message.expireActiveDurationPeriod.toString());
|
|
341
|
-
}
|
|
342
|
-
if (message.createdAt !== undefined) {
|
|
343
|
-
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
|
|
344
|
-
}
|
|
345
|
-
if (message.updatedAt !== undefined) {
|
|
346
|
-
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
|
|
347
|
-
}
|
|
348
|
-
return writer;
|
|
349
|
-
},
|
|
350
|
-
decode(input, length) {
|
|
351
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
352
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
353
|
-
const message = createBaseMaintenanceService();
|
|
354
|
-
while (reader.pos < end) {
|
|
355
|
-
const tag = reader.uint32();
|
|
356
|
-
switch (tag >>> 3) {
|
|
357
|
-
case 1: {
|
|
358
|
-
if (tag !== 8) {
|
|
359
|
-
break;
|
|
360
|
-
}
|
|
361
|
-
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
362
|
-
continue;
|
|
363
|
-
}
|
|
364
|
-
case 2: {
|
|
365
|
-
if (tag !== 18) {
|
|
366
|
-
break;
|
|
367
|
-
}
|
|
368
|
-
message.name = reader.string();
|
|
369
|
-
continue;
|
|
370
|
-
}
|
|
371
|
-
case 3: {
|
|
372
|
-
if (tag !== 24) {
|
|
373
|
-
break;
|
|
374
|
-
}
|
|
375
|
-
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
376
|
-
continue;
|
|
377
|
-
}
|
|
378
|
-
case 4: {
|
|
379
|
-
if (tag !== 32) {
|
|
380
|
-
break;
|
|
381
|
-
}
|
|
382
|
-
message.createdBy = Long.fromString(reader.uint64().toString(), true);
|
|
383
|
-
continue;
|
|
384
|
-
}
|
|
385
|
-
case 5: {
|
|
386
|
-
if (tag !== 40) {
|
|
387
|
-
break;
|
|
388
|
-
}
|
|
389
|
-
message.updatedBy = Long.fromString(reader.uint64().toString(), true);
|
|
390
|
-
continue;
|
|
391
|
-
}
|
|
392
|
-
case 6: {
|
|
393
|
-
if (tag !== 48) {
|
|
394
|
-
break;
|
|
395
|
-
}
|
|
396
|
-
message.isDefault = reader.bool();
|
|
397
|
-
continue;
|
|
398
|
-
}
|
|
399
|
-
case 7: {
|
|
400
|
-
if (tag !== 56) {
|
|
401
|
-
break;
|
|
402
|
-
}
|
|
403
|
-
message.expireMileagePeriod = Long.fromString(reader.uint64().toString(), true);
|
|
404
|
-
continue;
|
|
405
|
-
}
|
|
406
|
-
case 8: {
|
|
407
|
-
if (tag !== 66) {
|
|
408
|
-
break;
|
|
409
|
-
}
|
|
410
|
-
message.expireDatePeriod = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
411
|
-
continue;
|
|
412
|
-
}
|
|
413
|
-
case 9: {
|
|
414
|
-
if (tag !== 72) {
|
|
415
|
-
break;
|
|
416
|
-
}
|
|
417
|
-
message.expireActiveDurationPeriod = Long.fromString(reader.uint64().toString(), true);
|
|
418
|
-
continue;
|
|
419
|
-
}
|
|
420
|
-
case 10: {
|
|
421
|
-
if (tag !== 82) {
|
|
422
|
-
break;
|
|
423
|
-
}
|
|
424
|
-
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
425
|
-
continue;
|
|
426
|
-
}
|
|
427
|
-
case 11: {
|
|
428
|
-
if (tag !== 90) {
|
|
429
|
-
break;
|
|
430
|
-
}
|
|
431
|
-
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
432
|
-
continue;
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
436
|
-
break;
|
|
437
|
-
}
|
|
438
|
-
reader.skip(tag & 7);
|
|
439
|
-
}
|
|
440
|
-
return message;
|
|
441
|
-
},
|
|
442
|
-
create(base) {
|
|
443
|
-
return MaintenanceService.fromPartial(base ?? {});
|
|
444
|
-
},
|
|
445
|
-
fromPartial(object) {
|
|
446
|
-
const message = createBaseMaintenanceService();
|
|
447
|
-
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
448
|
-
message.name = object.name ?? "";
|
|
449
|
-
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
450
|
-
? Long.fromValue(object.organizationId)
|
|
451
|
-
: Long.UZERO;
|
|
452
|
-
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
453
|
-
? Long.fromValue(object.createdBy)
|
|
454
|
-
: undefined;
|
|
455
|
-
message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
|
|
456
|
-
? Long.fromValue(object.updatedBy)
|
|
457
|
-
: undefined;
|
|
458
|
-
message.isDefault = object.isDefault ?? false;
|
|
459
|
-
message.expireMileagePeriod = (object.expireMileagePeriod !== undefined && object.expireMileagePeriod !== null)
|
|
460
|
-
? Long.fromValue(object.expireMileagePeriod)
|
|
461
|
-
: undefined;
|
|
462
|
-
message.expireDatePeriod = object.expireDatePeriod ?? undefined;
|
|
463
|
-
message.expireActiveDurationPeriod =
|
|
464
|
-
(object.expireActiveDurationPeriod !== undefined && object.expireActiveDurationPeriod !== null)
|
|
465
|
-
? Long.fromValue(object.expireActiveDurationPeriod)
|
|
466
|
-
: undefined;
|
|
467
|
-
message.createdAt = object.createdAt ?? undefined;
|
|
468
|
-
message.updatedAt = object.updatedAt ?? undefined;
|
|
469
|
-
return message;
|
|
470
|
-
},
|
|
471
|
-
};
|
|
472
|
-
function toTimestamp(date) {
|
|
473
|
-
const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
|
|
474
|
-
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
475
|
-
return { seconds, nanos };
|
|
476
|
-
}
|
|
477
|
-
function fromTimestamp(t) {
|
|
478
|
-
let millis = (t.seconds.toNumber() || 0) * 1_000;
|
|
479
|
-
millis += (t.nanos || 0) / 1_000_000;
|
|
480
|
-
return new globalThis.Date(millis);
|
|
481
|
-
}
|
|
482
|
-
function numberToLong(number) {
|
|
483
|
-
return Long.fromNumber(number);
|
|
484
|
-
}
|