@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.
Files changed (36) hide show
  1. package/dist/fatehan/areas/area.d.ts +21 -20
  2. package/dist/fatehan/areas/area.d.ts.map +1 -1
  3. package/dist/fatehan/areas/area.js +95 -86
  4. package/dist/fatehan/google/protobuf/timestamp.d.ts +3 -2
  5. package/dist/fatehan/google/protobuf/timestamp.d.ts.map +1 -1
  6. package/dist/fatehan/google/protobuf/timestamp.js +16 -20
  7. package/dist/fatehan/models/fusion.d.ts +15 -14
  8. package/dist/fatehan/models/fusion.d.ts.map +1 -1
  9. package/dist/fatehan/models/fusion.js +150 -135
  10. package/dist/fatehan/models/models.d.ts +25 -24
  11. package/dist/fatehan/models/models.d.ts.map +1 -1
  12. package/dist/fatehan/models/models.js +182 -159
  13. package/dist/fatehan/models/operation.d.ts +26 -25
  14. package/dist/fatehan/models/operation.d.ts.map +1 -1
  15. package/dist/fatehan/models/operation.js +111 -96
  16. package/dist/fatehan/notifies/notify.d.ts +23 -22
  17. package/dist/fatehan/notifies/notify.d.ts.map +1 -1
  18. package/dist/fatehan/notifies/notify.js +172 -146
  19. package/dist/fatehan/packets/dataModel.d.ts +63 -62
  20. package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
  21. package/dist/fatehan/packets/dataModel.js +617 -541
  22. package/dist/fatehan/packets/messages.d.ts +22 -21
  23. package/dist/fatehan/packets/messages.d.ts.map +1 -1
  24. package/dist/fatehan/packets/messages.js +157 -136
  25. package/dist/fatehan/reports/report.d.ts +219 -222
  26. package/dist/fatehan/reports/report.d.ts.map +1 -1
  27. package/dist/fatehan/reports/report.js +1335 -1161
  28. package/dist/fatehan/trips/trip.d.ts +29 -28
  29. package/dist/fatehan/trips/trip.d.ts.map +1 -1
  30. package/dist/fatehan/trips/trip.js +153 -146
  31. package/dist/index.d.ts +2 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +15 -0
  34. package/dist/index.test.js +12 -8
  35. package/package.json +4 -2
  36. 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?: number | undefined;
7
+ deviceId?: Long | undefined;
7
8
  status: Operation_Status;
8
9
  destinationsIndex: number;
9
- geoId: number;
10
+ geoId: Long;
10
11
  description?: string | undefined;
11
- destinations: DestinationList | undefined;
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?: number | undefined;
25
- userAcceptedId?: number | undefined;
26
- userCreatedId?: number | undefined;
27
- userRejectedId?: number | undefined;
28
- userRequestedId?: number | undefined;
29
- requestedAt: Date | undefined;
30
- startedAt: Date | undefined;
31
- acceptedAt: Date | undefined;
32
- rejectedAt: Date | undefined;
33
- endedAt: Date | undefined;
34
- createdAt: Date | undefined;
35
- updatedAt: Date | undefined;
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: number;
53
- start: Destination_Event | undefined;
54
- finish: Destination_Event | undefined;
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: Point | undefined;
60
- datetime: Date | undefined;
61
- gpsTime: Date | undefined;
62
- mileage?: number | undefined;
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: Date | undefined;
67
- mileage?: number | undefined;
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,C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AAE,CAAC,GAAG,CAAC,CAAC;IACxD,WAAW,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: 0,
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 !== 0) {
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 = longToNumber(reader.uint64());
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 = longToNumber(reader.uint64());
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 = longToNumber(reader.uint64());
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 = longToNumber(reader.uint64());
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 = longToNumber(reader.uint64());
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 = longToNumber(reader.uint64());
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 = longToNumber(reader.uint64());
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) ? globalThis.Number(object.device_id) : undefined,
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) ? globalThis.Number(object.geo_id) : 0,
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) ? globalThis.Number(object.organization_id) : undefined,
466
- userAcceptedId: isSet(object.user_accepted_id) ? globalThis.Number(object.user_accepted_id) : undefined,
467
- userCreatedId: isSet(object.user_created_id) ? globalThis.Number(object.user_created_id) : undefined,
468
- userRejectedId: isSet(object.user_rejected_id) ? globalThis.Number(object.user_rejected_id) : undefined,
469
- userRequestedId: isSet(object.user_requested_id) ? globalThis.Number(object.user_requested_id) : undefined,
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 = Math.round(message.deviceId);
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 !== 0) {
495
- obj.geo_id = Math.round(message.geoId);
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 = Math.round(message.organizationId);
544
+ obj.organization_id = (message.organizationId || long_1.default.UZERO).toString();
541
545
  }
542
546
  if (message.userAcceptedId !== undefined) {
543
- obj.user_accepted_id = Math.round(message.userAcceptedId);
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 = Math.round(message.userCreatedId);
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 = Math.round(message.userRejectedId);
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 = Math.round(message.userRequestedId);
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, _0, _1, _2, _3, _4, _5, _6;
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 = (_b = object.deviceId) !== null && _b !== void 0 ? _b : undefined;
588
- message.status = (_c = object.status) !== null && _c !== void 0 ? _c : 0;
589
- message.destinationsIndex = (_d = object.destinationsIndex) !== null && _d !== void 0 ? _d : 0;
590
- message.geoId = (_e = object.geoId) !== null && _e !== void 0 ? _e : 0;
591
- message.description = (_f = object.description) !== null && _f !== void 0 ? _f : undefined;
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 = (_g = object.destinationName) !== null && _g !== void 0 ? _g : undefined;
596
- message.picture = (_h = object.picture) !== null && _h !== void 0 ? _h : undefined;
597
- message.passengers = (_j = object.passengers) !== null && _j !== void 0 ? _j : "";
598
- message.passengersName = (_k = object.passengersName) !== null && _k !== void 0 ? _k : undefined;
599
- message.workTime = (_l = object.workTime) !== null && _l !== void 0 ? _l : 0;
600
- message.extraWorkTime = (_m = object.extraWorkTime) !== null && _m !== void 0 ? _m : 0;
601
- message.extraNightWorkTime = (_o = object.extraNightWorkTime) !== null && _o !== void 0 ? _o : 0;
602
- message.holidayExtraWorkTime = (_p = object.holidayExtraWorkTime) !== null && _p !== void 0 ? _p : 0;
603
- message.holidayExtraNightWorkTime = (_q = object.holidayExtraNightWorkTime) !== null && _q !== void 0 ? _q : 0;
604
- message.internalMileage = (_r = object.internalMileage) !== null && _r !== void 0 ? _r : 0;
605
- message.externalMileage = (_s = object.externalMileage) !== null && _s !== void 0 ? _s : 0;
606
- message.totalNightly = (_t = object.totalNightly) !== null && _t !== void 0 ? _t : 0;
607
- message.organizationId = (_u = object.organizationId) !== null && _u !== void 0 ? _u : undefined;
608
- message.userAcceptedId = (_v = object.userAcceptedId) !== null && _v !== void 0 ? _v : undefined;
609
- message.userCreatedId = (_w = object.userCreatedId) !== null && _w !== void 0 ? _w : undefined;
610
- message.userRejectedId = (_x = object.userRejectedId) !== null && _x !== void 0 ? _x : undefined;
611
- message.userRequestedId = (_y = object.userRequestedId) !== null && _y !== void 0 ? _y : undefined;
612
- message.requestedAt = (_z = object.requestedAt) !== null && _z !== void 0 ? _z : undefined;
613
- message.startedAt = (_0 = object.startedAt) !== null && _0 !== void 0 ? _0 : undefined;
614
- message.acceptedAt = (_1 = object.acceptedAt) !== null && _1 !== void 0 ? _1 : undefined;
615
- message.rejectedAt = (_2 = object.rejectedAt) !== null && _2 !== void 0 ? _2 : undefined;
616
- message.endedAt = (_3 = object.endedAt) !== null && _3 !== void 0 ? _3 : undefined;
617
- message.createdAt = (_4 = object.createdAt) !== null && _4 !== void 0 ? _4 : undefined;
618
- message.updatedAt = (_5 = object.updatedAt) !== null && _5 !== void 0 ? _5 : undefined;
619
- message.errorCode = (_6 = object.errorCode) !== null && _6 !== void 0 ? _6 : undefined;
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: 0, start: undefined, finish: undefined, duration: 0, mileage: undefined };
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 !== 0) {
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 = longToNumber(reader.uint64());
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) ? globalThis.Number(object.area_id) : 0,
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 !== 0) {
764
- obj.area_id = Math.round(message.areaId);
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, _c;
800
+ var _a, _b;
785
801
  const message = createBaseDestination();
786
- message.areaId = (_a = object.areaId) !== null && _a !== void 0 ? _a : 0;
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 = (_b = object.duration) !== null && _b !== void 0 ? _b : 0;
794
- message.mileage = (_c = object.mileage) !== null && _c !== void 0 ? _c : undefined;
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 = longToNumber(reader.uint64());
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) ? globalThis.Number(object.mileage) : undefined,
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 = Math.round(message.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, _c;
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 = (_c = object.mileage) !== null && _c !== void 0 ? _c : undefined;
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 = longToNumber(reader.uint64());
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) ? globalThis.Number(object.mileage) : undefined,
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 = Math.round(message.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, _c;
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 = (_c = object.mileage) !== null && _c !== void 0 ? _c : undefined;
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 longToNumber(int64) {
1003
- const num = globalThis.Number(int64.toString());
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;