@fatehan/tsrp 1.0.20 → 1.0.22
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/areas/area.d.ts +21 -20
- package/dist/fatehan/areas/area.d.ts.map +1 -1
- package/dist/fatehan/areas/area.js +95 -86
- package/dist/fatehan/google/protobuf/timestamp.d.ts +3 -2
- package/dist/fatehan/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/fatehan/google/protobuf/timestamp.js +16 -20
- package/dist/fatehan/models/fusion.d.ts +15 -14
- package/dist/fatehan/models/fusion.d.ts.map +1 -1
- package/dist/fatehan/models/fusion.js +150 -135
- package/dist/fatehan/models/models.d.ts +25 -24
- package/dist/fatehan/models/models.d.ts.map +1 -1
- package/dist/fatehan/models/models.js +182 -159
- package/dist/fatehan/models/operation.d.ts +26 -25
- package/dist/fatehan/models/operation.d.ts.map +1 -1
- package/dist/fatehan/models/operation.js +111 -96
- package/dist/fatehan/notifies/notify.d.ts +23 -22
- package/dist/fatehan/notifies/notify.d.ts.map +1 -1
- package/dist/fatehan/notifies/notify.js +172 -146
- package/dist/fatehan/packets/dataModel.d.ts +63 -62
- package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
- package/dist/fatehan/packets/dataModel.js +617 -541
- package/dist/fatehan/packets/messages.d.ts +22 -21
- package/dist/fatehan/packets/messages.d.ts.map +1 -1
- package/dist/fatehan/packets/messages.js +157 -136
- package/dist/fatehan/reports/report.d.ts +219 -222
- package/dist/fatehan/reports/report.d.ts.map +1 -1
- package/dist/fatehan/reports/report.js +1335 -1161
- package/dist/fatehan/trips/trip.d.ts +29 -28
- package/dist/fatehan/trips/trip.d.ts.map +1 -1
- package/dist/fatehan/trips/trip.js +153 -146
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.test.js +12 -8
- package/package.json +4 -2
- package/readme.md +1 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import Long from "long";
|
|
2
3
|
import { Point } from "../areas/area";
|
|
3
4
|
export declare const protobufPackage = "com.fatehan.models";
|
|
4
5
|
export interface Operation {
|
|
5
6
|
id: number;
|
|
6
|
-
deviceId?:
|
|
7
|
+
deviceId?: Long | undefined;
|
|
7
8
|
status: Operation_Status;
|
|
8
9
|
destinationsIndex: number;
|
|
9
|
-
geoId:
|
|
10
|
+
geoId: Long;
|
|
10
11
|
description?: string | undefined;
|
|
11
|
-
destinations
|
|
12
|
+
destinations?: DestinationList | undefined;
|
|
12
13
|
destinationName?: string | undefined;
|
|
13
14
|
picture?: string | undefined;
|
|
14
15
|
passengers: string;
|
|
@@ -21,18 +22,18 @@ export interface Operation {
|
|
|
21
22
|
internalMileage: number;
|
|
22
23
|
externalMileage: number;
|
|
23
24
|
totalNightly: number;
|
|
24
|
-
organizationId?:
|
|
25
|
-
userAcceptedId?:
|
|
26
|
-
userCreatedId?:
|
|
27
|
-
userRejectedId?:
|
|
28
|
-
userRequestedId?:
|
|
29
|
-
requestedAt
|
|
30
|
-
startedAt
|
|
31
|
-
acceptedAt
|
|
32
|
-
rejectedAt
|
|
33
|
-
endedAt
|
|
34
|
-
createdAt
|
|
35
|
-
updatedAt
|
|
25
|
+
organizationId?: Long | undefined;
|
|
26
|
+
userAcceptedId?: Long | undefined;
|
|
27
|
+
userCreatedId?: Long | undefined;
|
|
28
|
+
userRejectedId?: Long | undefined;
|
|
29
|
+
userRequestedId?: Long | undefined;
|
|
30
|
+
requestedAt?: Date | undefined;
|
|
31
|
+
startedAt?: Date | undefined;
|
|
32
|
+
acceptedAt?: Date | undefined;
|
|
33
|
+
rejectedAt?: Date | undefined;
|
|
34
|
+
endedAt?: Date | undefined;
|
|
35
|
+
createdAt?: Date | undefined;
|
|
36
|
+
updatedAt?: Date | undefined;
|
|
36
37
|
errorCode?: number | undefined;
|
|
37
38
|
}
|
|
38
39
|
export declare enum Operation_Status {
|
|
@@ -49,22 +50,22 @@ export interface DestinationList {
|
|
|
49
50
|
destination: Destination[];
|
|
50
51
|
}
|
|
51
52
|
export interface Destination {
|
|
52
|
-
areaId:
|
|
53
|
-
start
|
|
54
|
-
finish
|
|
53
|
+
areaId: Long;
|
|
54
|
+
start?: Destination_Event | undefined;
|
|
55
|
+
finish?: Destination_Event | undefined;
|
|
55
56
|
duration: number;
|
|
56
57
|
mileage?: number | undefined;
|
|
57
58
|
}
|
|
58
59
|
export interface Destination_Event {
|
|
59
|
-
point
|
|
60
|
-
datetime
|
|
61
|
-
gpsTime
|
|
62
|
-
mileage?:
|
|
60
|
+
point?: Point | undefined;
|
|
61
|
+
datetime?: Date | undefined;
|
|
62
|
+
gpsTime?: Date | undefined;
|
|
63
|
+
mileage?: Long | undefined;
|
|
63
64
|
}
|
|
64
65
|
export interface OperationMileageMemory {
|
|
65
66
|
status: boolean;
|
|
66
|
-
gpsTime
|
|
67
|
-
mileage?:
|
|
67
|
+
gpsTime?: Date | undefined;
|
|
68
|
+
mileage?: Long | undefined;
|
|
68
69
|
}
|
|
69
70
|
export declare const Operation: MessageFns<Operation>;
|
|
70
71
|
export declare const DestinationList: MessageFns<DestinationList>;
|
|
@@ -72,7 +73,7 @@ export declare const Destination: MessageFns<Destination>;
|
|
|
72
73
|
export declare const Destination_Event: MessageFns<Destination_Event>;
|
|
73
74
|
export declare const OperationMileageMemory: MessageFns<OperationMileageMemory>;
|
|
74
75
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
75
|
-
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
76
|
+
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 {} ? {
|
|
76
77
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
77
78
|
} : Partial<T>;
|
|
78
79
|
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../src/fatehan/models/operation.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../src/fatehan/models/operation.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,MAAM,EAAE,gBAAgB,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,IAAI,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IAC3C,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,E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AAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAC/D"}
|
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
// protoc-gen-ts_proto v2.7.0
|
|
5
5
|
// protoc v6.31.1
|
|
6
6
|
// source: models/operation.proto
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
7
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
11
|
exports.OperationMileageMemory = exports.Destination_Event = exports.Destination = exports.DestinationList = exports.Operation = exports.Operation_Status = exports.protobufPackage = void 0;
|
|
9
12
|
exports.operation_StatusFromJSON = operation_StatusFromJSON;
|
|
10
13
|
exports.operation_StatusToJSON = operation_StatusToJSON;
|
|
11
14
|
/* eslint-disable */
|
|
12
15
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
16
|
+
const long_1 = __importDefault(require("long"));
|
|
13
17
|
const area_1 = require("../areas/area");
|
|
14
18
|
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
15
19
|
exports.protobufPackage = "com.fatehan.models";
|
|
@@ -68,7 +72,7 @@ function createBaseOperation() {
|
|
|
68
72
|
deviceId: undefined,
|
|
69
73
|
status: 0,
|
|
70
74
|
destinationsIndex: 0,
|
|
71
|
-
geoId:
|
|
75
|
+
geoId: long_1.default.UZERO,
|
|
72
76
|
description: undefined,
|
|
73
77
|
destinations: undefined,
|
|
74
78
|
destinationName: undefined,
|
|
@@ -104,7 +108,7 @@ exports.Operation = {
|
|
|
104
108
|
writer.uint32(8).uint32(message.id);
|
|
105
109
|
}
|
|
106
110
|
if (message.deviceId !== undefined) {
|
|
107
|
-
writer.uint32(16).uint64(message.deviceId);
|
|
111
|
+
writer.uint32(16).uint64(message.deviceId.toString());
|
|
108
112
|
}
|
|
109
113
|
if (message.status !== 0) {
|
|
110
114
|
writer.uint32(24).int32(message.status);
|
|
@@ -112,8 +116,8 @@ exports.Operation = {
|
|
|
112
116
|
if (message.destinationsIndex !== 0) {
|
|
113
117
|
writer.uint32(32).uint32(message.destinationsIndex);
|
|
114
118
|
}
|
|
115
|
-
if (message.geoId
|
|
116
|
-
writer.uint32(40).uint64(message.geoId);
|
|
119
|
+
if (!message.geoId.equals(long_1.default.UZERO)) {
|
|
120
|
+
writer.uint32(40).uint64(message.geoId.toString());
|
|
117
121
|
}
|
|
118
122
|
if (message.description !== undefined) {
|
|
119
123
|
writer.uint32(50).string(message.description);
|
|
@@ -158,19 +162,19 @@ exports.Operation = {
|
|
|
158
162
|
writer.uint32(200).uint32(message.totalNightly);
|
|
159
163
|
}
|
|
160
164
|
if (message.organizationId !== undefined) {
|
|
161
|
-
writer.uint32(208).uint64(message.organizationId);
|
|
165
|
+
writer.uint32(208).uint64(message.organizationId.toString());
|
|
162
166
|
}
|
|
163
167
|
if (message.userAcceptedId !== undefined) {
|
|
164
|
-
writer.uint32(216).uint64(message.userAcceptedId);
|
|
168
|
+
writer.uint32(216).uint64(message.userAcceptedId.toString());
|
|
165
169
|
}
|
|
166
170
|
if (message.userCreatedId !== undefined) {
|
|
167
|
-
writer.uint32(224).uint64(message.userCreatedId);
|
|
171
|
+
writer.uint32(224).uint64(message.userCreatedId.toString());
|
|
168
172
|
}
|
|
169
173
|
if (message.userRejectedId !== undefined) {
|
|
170
|
-
writer.uint32(232).uint64(message.userRejectedId);
|
|
174
|
+
writer.uint32(232).uint64(message.userRejectedId.toString());
|
|
171
175
|
}
|
|
172
176
|
if (message.userRequestedId !== undefined) {
|
|
173
|
-
writer.uint32(152).uint64(message.userRequestedId);
|
|
177
|
+
writer.uint32(152).uint64(message.userRequestedId.toString());
|
|
174
178
|
}
|
|
175
179
|
if (message.requestedAt !== undefined) {
|
|
176
180
|
timestamp_1.Timestamp.encode(toTimestamp(message.requestedAt), writer.uint32(242).fork()).join();
|
|
@@ -216,7 +220,7 @@ exports.Operation = {
|
|
|
216
220
|
if (tag !== 16) {
|
|
217
221
|
break;
|
|
218
222
|
}
|
|
219
|
-
message.deviceId =
|
|
223
|
+
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
220
224
|
continue;
|
|
221
225
|
}
|
|
222
226
|
case 3: {
|
|
@@ -237,7 +241,7 @@ exports.Operation = {
|
|
|
237
241
|
if (tag !== 40) {
|
|
238
242
|
break;
|
|
239
243
|
}
|
|
240
|
-
message.geoId =
|
|
244
|
+
message.geoId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
241
245
|
continue;
|
|
242
246
|
}
|
|
243
247
|
case 6: {
|
|
@@ -342,35 +346,35 @@ exports.Operation = {
|
|
|
342
346
|
if (tag !== 208) {
|
|
343
347
|
break;
|
|
344
348
|
}
|
|
345
|
-
message.organizationId =
|
|
349
|
+
message.organizationId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
346
350
|
continue;
|
|
347
351
|
}
|
|
348
352
|
case 27: {
|
|
349
353
|
if (tag !== 216) {
|
|
350
354
|
break;
|
|
351
355
|
}
|
|
352
|
-
message.userAcceptedId =
|
|
356
|
+
message.userAcceptedId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
353
357
|
continue;
|
|
354
358
|
}
|
|
355
359
|
case 28: {
|
|
356
360
|
if (tag !== 224) {
|
|
357
361
|
break;
|
|
358
362
|
}
|
|
359
|
-
message.userCreatedId =
|
|
363
|
+
message.userCreatedId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
360
364
|
continue;
|
|
361
365
|
}
|
|
362
366
|
case 29: {
|
|
363
367
|
if (tag !== 232) {
|
|
364
368
|
break;
|
|
365
369
|
}
|
|
366
|
-
message.userRejectedId =
|
|
370
|
+
message.userRejectedId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
367
371
|
continue;
|
|
368
372
|
}
|
|
369
373
|
case 19: {
|
|
370
374
|
if (tag !== 152) {
|
|
371
375
|
break;
|
|
372
376
|
}
|
|
373
|
-
message.userRequestedId =
|
|
377
|
+
message.userRequestedId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
374
378
|
continue;
|
|
375
379
|
}
|
|
376
380
|
case 30: {
|
|
@@ -440,10 +444,10 @@ exports.Operation = {
|
|
|
440
444
|
fromJSON(object) {
|
|
441
445
|
return {
|
|
442
446
|
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
443
|
-
deviceId: isSet(object.device_id) ?
|
|
447
|
+
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : undefined,
|
|
444
448
|
status: isSet(object.status) ? operation_StatusFromJSON(object.status) : 0,
|
|
445
449
|
destinationsIndex: isSet(object.destinations_index) ? globalThis.Number(object.destinations_index) : 0,
|
|
446
|
-
geoId: isSet(object.geo_id) ?
|
|
450
|
+
geoId: isSet(object.geo_id) ? long_1.default.fromValue(object.geo_id) : long_1.default.UZERO,
|
|
447
451
|
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
448
452
|
destinations: isSet(object.destinations) ? exports.DestinationList.fromJSON(object.destinations) : undefined,
|
|
449
453
|
destinationName: isSet(object.destination_name) ? globalThis.String(object.destination_name) : undefined,
|
|
@@ -462,11 +466,11 @@ exports.Operation = {
|
|
|
462
466
|
internalMileage: isSet(object.internal_mileage) ? globalThis.Number(object.internal_mileage) : 0,
|
|
463
467
|
externalMileage: isSet(object.external_mileage) ? globalThis.Number(object.external_mileage) : 0,
|
|
464
468
|
totalNightly: isSet(object.total_nightly) ? globalThis.Number(object.total_nightly) : 0,
|
|
465
|
-
organizationId: isSet(object.organization_id) ?
|
|
466
|
-
userAcceptedId: isSet(object.user_accepted_id) ?
|
|
467
|
-
userCreatedId: isSet(object.user_created_id) ?
|
|
468
|
-
userRejectedId: isSet(object.user_rejected_id) ?
|
|
469
|
-
userRequestedId: isSet(object.user_requested_id) ?
|
|
469
|
+
organizationId: isSet(object.organization_id) ? long_1.default.fromValue(object.organization_id) : undefined,
|
|
470
|
+
userAcceptedId: isSet(object.user_accepted_id) ? long_1.default.fromValue(object.user_accepted_id) : undefined,
|
|
471
|
+
userCreatedId: isSet(object.user_created_id) ? long_1.default.fromValue(object.user_created_id) : undefined,
|
|
472
|
+
userRejectedId: isSet(object.user_rejected_id) ? long_1.default.fromValue(object.user_rejected_id) : undefined,
|
|
473
|
+
userRequestedId: isSet(object.user_requested_id) ? long_1.default.fromValue(object.user_requested_id) : undefined,
|
|
470
474
|
requestedAt: isSet(object.requested_at) ? fromJsonTimestamp(object.requested_at) : undefined,
|
|
471
475
|
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
472
476
|
acceptedAt: isSet(object.accepted_at) ? fromJsonTimestamp(object.accepted_at) : undefined,
|
|
@@ -483,7 +487,7 @@ exports.Operation = {
|
|
|
483
487
|
obj.id = Math.round(message.id);
|
|
484
488
|
}
|
|
485
489
|
if (message.deviceId !== undefined) {
|
|
486
|
-
obj.device_id =
|
|
490
|
+
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
487
491
|
}
|
|
488
492
|
if (message.status !== 0) {
|
|
489
493
|
obj.status = operation_StatusToJSON(message.status);
|
|
@@ -491,8 +495,8 @@ exports.Operation = {
|
|
|
491
495
|
if (message.destinationsIndex !== 0) {
|
|
492
496
|
obj.destinations_index = Math.round(message.destinationsIndex);
|
|
493
497
|
}
|
|
494
|
-
if (message.geoId
|
|
495
|
-
obj.geo_id =
|
|
498
|
+
if (!message.geoId.equals(long_1.default.UZERO)) {
|
|
499
|
+
obj.geo_id = (message.geoId || long_1.default.UZERO).toString();
|
|
496
500
|
}
|
|
497
501
|
if (message.description !== undefined) {
|
|
498
502
|
obj.description = message.description;
|
|
@@ -537,19 +541,19 @@ exports.Operation = {
|
|
|
537
541
|
obj.total_nightly = Math.round(message.totalNightly);
|
|
538
542
|
}
|
|
539
543
|
if (message.organizationId !== undefined) {
|
|
540
|
-
obj.organization_id =
|
|
544
|
+
obj.organization_id = (message.organizationId || long_1.default.UZERO).toString();
|
|
541
545
|
}
|
|
542
546
|
if (message.userAcceptedId !== undefined) {
|
|
543
|
-
obj.user_accepted_id =
|
|
547
|
+
obj.user_accepted_id = (message.userAcceptedId || long_1.default.UZERO).toString();
|
|
544
548
|
}
|
|
545
549
|
if (message.userCreatedId !== undefined) {
|
|
546
|
-
obj.user_created_id =
|
|
550
|
+
obj.user_created_id = (message.userCreatedId || long_1.default.UZERO).toString();
|
|
547
551
|
}
|
|
548
552
|
if (message.userRejectedId !== undefined) {
|
|
549
|
-
obj.user_rejected_id =
|
|
553
|
+
obj.user_rejected_id = (message.userRejectedId || long_1.default.UZERO).toString();
|
|
550
554
|
}
|
|
551
555
|
if (message.userRequestedId !== undefined) {
|
|
552
|
-
obj.user_requested_id =
|
|
556
|
+
obj.user_requested_id = (message.userRequestedId || long_1.default.UZERO).toString();
|
|
553
557
|
}
|
|
554
558
|
if (message.requestedAt !== undefined) {
|
|
555
559
|
obj.requested_at = message.requestedAt.toISOString();
|
|
@@ -581,42 +585,54 @@ exports.Operation = {
|
|
|
581
585
|
return exports.Operation.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
582
586
|
},
|
|
583
587
|
fromPartial(object) {
|
|
584
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z
|
|
588
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
585
589
|
const message = createBaseOperation();
|
|
586
590
|
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
|
|
587
|
-
message.deviceId = (
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
message.
|
|
591
|
-
message.
|
|
591
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
592
|
+
? long_1.default.fromValue(object.deviceId)
|
|
593
|
+
: undefined;
|
|
594
|
+
message.status = (_b = object.status) !== null && _b !== void 0 ? _b : 0;
|
|
595
|
+
message.destinationsIndex = (_c = object.destinationsIndex) !== null && _c !== void 0 ? _c : 0;
|
|
596
|
+
message.geoId = (object.geoId !== undefined && object.geoId !== null) ? long_1.default.fromValue(object.geoId) : long_1.default.UZERO;
|
|
597
|
+
message.description = (_d = object.description) !== null && _d !== void 0 ? _d : undefined;
|
|
592
598
|
message.destinations = (object.destinations !== undefined && object.destinations !== null)
|
|
593
599
|
? exports.DestinationList.fromPartial(object.destinations)
|
|
594
600
|
: undefined;
|
|
595
|
-
message.destinationName = (
|
|
596
|
-
message.picture = (
|
|
597
|
-
message.passengers = (
|
|
598
|
-
message.passengersName = (
|
|
599
|
-
message.workTime = (
|
|
600
|
-
message.extraWorkTime = (
|
|
601
|
-
message.extraNightWorkTime = (
|
|
602
|
-
message.holidayExtraWorkTime = (
|
|
603
|
-
message.holidayExtraNightWorkTime = (
|
|
604
|
-
message.internalMileage = (
|
|
605
|
-
message.externalMileage = (
|
|
606
|
-
message.totalNightly = (
|
|
607
|
-
message.organizationId = (
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
message.
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
message.
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
message.
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
message.
|
|
601
|
+
message.destinationName = (_e = object.destinationName) !== null && _e !== void 0 ? _e : undefined;
|
|
602
|
+
message.picture = (_f = object.picture) !== null && _f !== void 0 ? _f : undefined;
|
|
603
|
+
message.passengers = (_g = object.passengers) !== null && _g !== void 0 ? _g : "";
|
|
604
|
+
message.passengersName = (_h = object.passengersName) !== null && _h !== void 0 ? _h : undefined;
|
|
605
|
+
message.workTime = (_j = object.workTime) !== null && _j !== void 0 ? _j : 0;
|
|
606
|
+
message.extraWorkTime = (_k = object.extraWorkTime) !== null && _k !== void 0 ? _k : 0;
|
|
607
|
+
message.extraNightWorkTime = (_l = object.extraNightWorkTime) !== null && _l !== void 0 ? _l : 0;
|
|
608
|
+
message.holidayExtraWorkTime = (_m = object.holidayExtraWorkTime) !== null && _m !== void 0 ? _m : 0;
|
|
609
|
+
message.holidayExtraNightWorkTime = (_o = object.holidayExtraNightWorkTime) !== null && _o !== void 0 ? _o : 0;
|
|
610
|
+
message.internalMileage = (_p = object.internalMileage) !== null && _p !== void 0 ? _p : 0;
|
|
611
|
+
message.externalMileage = (_q = object.externalMileage) !== null && _q !== void 0 ? _q : 0;
|
|
612
|
+
message.totalNightly = (_r = object.totalNightly) !== null && _r !== void 0 ? _r : 0;
|
|
613
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
614
|
+
? long_1.default.fromValue(object.organizationId)
|
|
615
|
+
: undefined;
|
|
616
|
+
message.userAcceptedId = (object.userAcceptedId !== undefined && object.userAcceptedId !== null)
|
|
617
|
+
? long_1.default.fromValue(object.userAcceptedId)
|
|
618
|
+
: undefined;
|
|
619
|
+
message.userCreatedId = (object.userCreatedId !== undefined && object.userCreatedId !== null)
|
|
620
|
+
? long_1.default.fromValue(object.userCreatedId)
|
|
621
|
+
: undefined;
|
|
622
|
+
message.userRejectedId = (object.userRejectedId !== undefined && object.userRejectedId !== null)
|
|
623
|
+
? long_1.default.fromValue(object.userRejectedId)
|
|
624
|
+
: undefined;
|
|
625
|
+
message.userRequestedId = (object.userRequestedId !== undefined && object.userRequestedId !== null)
|
|
626
|
+
? long_1.default.fromValue(object.userRequestedId)
|
|
627
|
+
: undefined;
|
|
628
|
+
message.requestedAt = (_s = object.requestedAt) !== null && _s !== void 0 ? _s : undefined;
|
|
629
|
+
message.startedAt = (_t = object.startedAt) !== null && _t !== void 0 ? _t : undefined;
|
|
630
|
+
message.acceptedAt = (_u = object.acceptedAt) !== null && _u !== void 0 ? _u : undefined;
|
|
631
|
+
message.rejectedAt = (_v = object.rejectedAt) !== null && _v !== void 0 ? _v : undefined;
|
|
632
|
+
message.endedAt = (_w = object.endedAt) !== null && _w !== void 0 ? _w : undefined;
|
|
633
|
+
message.createdAt = (_x = object.createdAt) !== null && _x !== void 0 ? _x : undefined;
|
|
634
|
+
message.updatedAt = (_y = object.updatedAt) !== null && _y !== void 0 ? _y : undefined;
|
|
635
|
+
message.errorCode = (_z = object.errorCode) !== null && _z !== void 0 ? _z : undefined;
|
|
620
636
|
return message;
|
|
621
637
|
},
|
|
622
638
|
};
|
|
@@ -678,12 +694,12 @@ exports.DestinationList = {
|
|
|
678
694
|
},
|
|
679
695
|
};
|
|
680
696
|
function createBaseDestination() {
|
|
681
|
-
return { areaId:
|
|
697
|
+
return { areaId: long_1.default.UZERO, start: undefined, finish: undefined, duration: 0, mileage: undefined };
|
|
682
698
|
}
|
|
683
699
|
exports.Destination = {
|
|
684
700
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
685
|
-
if (message.areaId
|
|
686
|
-
writer.uint32(8).uint64(message.areaId);
|
|
701
|
+
if (!message.areaId.equals(long_1.default.UZERO)) {
|
|
702
|
+
writer.uint32(8).uint64(message.areaId.toString());
|
|
687
703
|
}
|
|
688
704
|
if (message.start !== undefined) {
|
|
689
705
|
exports.Destination_Event.encode(message.start, writer.uint32(18).fork()).join();
|
|
@@ -710,7 +726,7 @@ exports.Destination = {
|
|
|
710
726
|
if (tag !== 8) {
|
|
711
727
|
break;
|
|
712
728
|
}
|
|
713
|
-
message.areaId =
|
|
729
|
+
message.areaId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
714
730
|
continue;
|
|
715
731
|
}
|
|
716
732
|
case 2: {
|
|
@@ -751,7 +767,7 @@ exports.Destination = {
|
|
|
751
767
|
},
|
|
752
768
|
fromJSON(object) {
|
|
753
769
|
return {
|
|
754
|
-
areaId: isSet(object.area_id) ?
|
|
770
|
+
areaId: isSet(object.area_id) ? long_1.default.fromValue(object.area_id) : long_1.default.UZERO,
|
|
755
771
|
start: isSet(object.start) ? exports.Destination_Event.fromJSON(object.start) : undefined,
|
|
756
772
|
finish: isSet(object.finish) ? exports.Destination_Event.fromJSON(object.finish) : undefined,
|
|
757
773
|
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
@@ -760,8 +776,8 @@ exports.Destination = {
|
|
|
760
776
|
},
|
|
761
777
|
toJSON(message) {
|
|
762
778
|
const obj = {};
|
|
763
|
-
if (message.areaId
|
|
764
|
-
obj.area_id =
|
|
779
|
+
if (!message.areaId.equals(long_1.default.UZERO)) {
|
|
780
|
+
obj.area_id = (message.areaId || long_1.default.UZERO).toString();
|
|
765
781
|
}
|
|
766
782
|
if (message.start !== undefined) {
|
|
767
783
|
obj.start = exports.Destination_Event.toJSON(message.start);
|
|
@@ -781,17 +797,19 @@ exports.Destination = {
|
|
|
781
797
|
return exports.Destination.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
782
798
|
},
|
|
783
799
|
fromPartial(object) {
|
|
784
|
-
var _a, _b
|
|
800
|
+
var _a, _b;
|
|
785
801
|
const message = createBaseDestination();
|
|
786
|
-
message.areaId = (
|
|
802
|
+
message.areaId = (object.areaId !== undefined && object.areaId !== null)
|
|
803
|
+
? long_1.default.fromValue(object.areaId)
|
|
804
|
+
: long_1.default.UZERO;
|
|
787
805
|
message.start = (object.start !== undefined && object.start !== null)
|
|
788
806
|
? exports.Destination_Event.fromPartial(object.start)
|
|
789
807
|
: undefined;
|
|
790
808
|
message.finish = (object.finish !== undefined && object.finish !== null)
|
|
791
809
|
? exports.Destination_Event.fromPartial(object.finish)
|
|
792
810
|
: undefined;
|
|
793
|
-
message.duration = (
|
|
794
|
-
message.mileage = (
|
|
811
|
+
message.duration = (_a = object.duration) !== null && _a !== void 0 ? _a : 0;
|
|
812
|
+
message.mileage = (_b = object.mileage) !== null && _b !== void 0 ? _b : undefined;
|
|
795
813
|
return message;
|
|
796
814
|
},
|
|
797
815
|
};
|
|
@@ -810,7 +828,7 @@ exports.Destination_Event = {
|
|
|
810
828
|
timestamp_1.Timestamp.encode(toTimestamp(message.gpsTime), writer.uint32(26).fork()).join();
|
|
811
829
|
}
|
|
812
830
|
if (message.mileage !== undefined) {
|
|
813
|
-
writer.uint32(32).uint64(message.mileage);
|
|
831
|
+
writer.uint32(32).uint64(message.mileage.toString());
|
|
814
832
|
}
|
|
815
833
|
return writer;
|
|
816
834
|
},
|
|
@@ -846,7 +864,7 @@ exports.Destination_Event = {
|
|
|
846
864
|
if (tag !== 32) {
|
|
847
865
|
break;
|
|
848
866
|
}
|
|
849
|
-
message.mileage =
|
|
867
|
+
message.mileage = long_1.default.fromString(reader.uint64().toString(), true);
|
|
850
868
|
continue;
|
|
851
869
|
}
|
|
852
870
|
}
|
|
@@ -862,7 +880,7 @@ exports.Destination_Event = {
|
|
|
862
880
|
point: isSet(object.point) ? area_1.Point.fromJSON(object.point) : undefined,
|
|
863
881
|
datetime: isSet(object.datetime) ? fromJsonTimestamp(object.datetime) : undefined,
|
|
864
882
|
gpsTime: isSet(object.gps_time) ? fromJsonTimestamp(object.gps_time) : undefined,
|
|
865
|
-
mileage: isSet(object.mileage) ?
|
|
883
|
+
mileage: isSet(object.mileage) ? long_1.default.fromValue(object.mileage) : undefined,
|
|
866
884
|
};
|
|
867
885
|
},
|
|
868
886
|
toJSON(message) {
|
|
@@ -877,7 +895,7 @@ exports.Destination_Event = {
|
|
|
877
895
|
obj.gps_time = message.gpsTime.toISOString();
|
|
878
896
|
}
|
|
879
897
|
if (message.mileage !== undefined) {
|
|
880
|
-
obj.mileage =
|
|
898
|
+
obj.mileage = (message.mileage || long_1.default.UZERO).toString();
|
|
881
899
|
}
|
|
882
900
|
return obj;
|
|
883
901
|
},
|
|
@@ -885,12 +903,14 @@ exports.Destination_Event = {
|
|
|
885
903
|
return exports.Destination_Event.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
886
904
|
},
|
|
887
905
|
fromPartial(object) {
|
|
888
|
-
var _a, _b
|
|
906
|
+
var _a, _b;
|
|
889
907
|
const message = createBaseDestination_Event();
|
|
890
908
|
message.point = (object.point !== undefined && object.point !== null) ? area_1.Point.fromPartial(object.point) : undefined;
|
|
891
909
|
message.datetime = (_a = object.datetime) !== null && _a !== void 0 ? _a : undefined;
|
|
892
910
|
message.gpsTime = (_b = object.gpsTime) !== null && _b !== void 0 ? _b : undefined;
|
|
893
|
-
message.mileage = (
|
|
911
|
+
message.mileage = (object.mileage !== undefined && object.mileage !== null)
|
|
912
|
+
? long_1.default.fromValue(object.mileage)
|
|
913
|
+
: undefined;
|
|
894
914
|
return message;
|
|
895
915
|
},
|
|
896
916
|
};
|
|
@@ -906,7 +926,7 @@ exports.OperationMileageMemory = {
|
|
|
906
926
|
timestamp_1.Timestamp.encode(toTimestamp(message.gpsTime), writer.uint32(18).fork()).join();
|
|
907
927
|
}
|
|
908
928
|
if (message.mileage !== undefined) {
|
|
909
|
-
writer.uint32(24).uint64(message.mileage);
|
|
929
|
+
writer.uint32(24).uint64(message.mileage.toString());
|
|
910
930
|
}
|
|
911
931
|
return writer;
|
|
912
932
|
},
|
|
@@ -935,7 +955,7 @@ exports.OperationMileageMemory = {
|
|
|
935
955
|
if (tag !== 24) {
|
|
936
956
|
break;
|
|
937
957
|
}
|
|
938
|
-
message.mileage =
|
|
958
|
+
message.mileage = long_1.default.fromString(reader.uint64().toString(), true);
|
|
939
959
|
continue;
|
|
940
960
|
}
|
|
941
961
|
}
|
|
@@ -950,7 +970,7 @@ exports.OperationMileageMemory = {
|
|
|
950
970
|
return {
|
|
951
971
|
status: isSet(object.status) ? globalThis.Boolean(object.status) : false,
|
|
952
972
|
gpsTime: isSet(object.gpsTime) ? fromJsonTimestamp(object.gpsTime) : undefined,
|
|
953
|
-
mileage: isSet(object.mileage) ?
|
|
973
|
+
mileage: isSet(object.mileage) ? long_1.default.fromValue(object.mileage) : undefined,
|
|
954
974
|
};
|
|
955
975
|
},
|
|
956
976
|
toJSON(message) {
|
|
@@ -962,7 +982,7 @@ exports.OperationMileageMemory = {
|
|
|
962
982
|
obj.gpsTime = message.gpsTime.toISOString();
|
|
963
983
|
}
|
|
964
984
|
if (message.mileage !== undefined) {
|
|
965
|
-
obj.mileage =
|
|
985
|
+
obj.mileage = (message.mileage || long_1.default.UZERO).toString();
|
|
966
986
|
}
|
|
967
987
|
return obj;
|
|
968
988
|
},
|
|
@@ -970,21 +990,23 @@ exports.OperationMileageMemory = {
|
|
|
970
990
|
return exports.OperationMileageMemory.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
971
991
|
},
|
|
972
992
|
fromPartial(object) {
|
|
973
|
-
var _a, _b
|
|
993
|
+
var _a, _b;
|
|
974
994
|
const message = createBaseOperationMileageMemory();
|
|
975
995
|
message.status = (_a = object.status) !== null && _a !== void 0 ? _a : false;
|
|
976
996
|
message.gpsTime = (_b = object.gpsTime) !== null && _b !== void 0 ? _b : undefined;
|
|
977
|
-
message.mileage = (
|
|
997
|
+
message.mileage = (object.mileage !== undefined && object.mileage !== null)
|
|
998
|
+
? long_1.default.fromValue(object.mileage)
|
|
999
|
+
: undefined;
|
|
978
1000
|
return message;
|
|
979
1001
|
},
|
|
980
1002
|
};
|
|
981
1003
|
function toTimestamp(date) {
|
|
982
|
-
const seconds = Math.trunc(date.getTime() / 1000);
|
|
1004
|
+
const seconds = numberToLong(Math.trunc(date.getTime() / 1000));
|
|
983
1005
|
const nanos = (date.getTime() % 1000) * 1000000;
|
|
984
1006
|
return { seconds, nanos };
|
|
985
1007
|
}
|
|
986
1008
|
function fromTimestamp(t) {
|
|
987
|
-
let millis = (t.seconds || 0) * 1000;
|
|
1009
|
+
let millis = (t.seconds.toNumber() || 0) * 1000;
|
|
988
1010
|
millis += (t.nanos || 0) / 1000000;
|
|
989
1011
|
return new globalThis.Date(millis);
|
|
990
1012
|
}
|
|
@@ -999,15 +1021,8 @@ function fromJsonTimestamp(o) {
|
|
|
999
1021
|
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
1000
1022
|
}
|
|
1001
1023
|
}
|
|
1002
|
-
function
|
|
1003
|
-
|
|
1004
|
-
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1005
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1006
|
-
}
|
|
1007
|
-
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1008
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1009
|
-
}
|
|
1010
|
-
return num;
|
|
1024
|
+
function numberToLong(number) {
|
|
1025
|
+
return long_1.default.fromNumber(number);
|
|
1011
1026
|
}
|
|
1012
1027
|
function isSet(value) {
|
|
1013
1028
|
return value !== null && value !== undefined;
|