quiver-protobuf-typescript 1.0.1689159484 → 1.0.1689170133
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/courier/courier_location.ts +93 -0
- package/package.json +1 -1
|
@@ -51,6 +51,12 @@ export interface CourierLocation {
|
|
|
51
51
|
accuracy: number;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
export interface StartNextCourierJobRequest {
|
|
55
|
+
courierId: number;
|
|
56
|
+
location: CreateCourierLocationRequest | undefined;
|
|
57
|
+
timestamp: string | undefined;
|
|
58
|
+
}
|
|
59
|
+
|
|
54
60
|
function createBaseCreateCourierLocationRequest(): CreateCourierLocationRequest {
|
|
55
61
|
return { courierId: undefined, latitude: 0, longitude: 0, timestamp: undefined, accuracy: 0 };
|
|
56
62
|
}
|
|
@@ -786,6 +792,93 @@ export const CourierLocation = {
|
|
|
786
792
|
},
|
|
787
793
|
};
|
|
788
794
|
|
|
795
|
+
function createBaseStartNextCourierJobRequest(): StartNextCourierJobRequest {
|
|
796
|
+
return { courierId: 0, location: undefined, timestamp: undefined };
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
export const StartNextCourierJobRequest = {
|
|
800
|
+
encode(message: StartNextCourierJobRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
801
|
+
if (message.courierId !== 0) {
|
|
802
|
+
writer.uint32(8).int32(message.courierId);
|
|
803
|
+
}
|
|
804
|
+
if (message.location !== undefined) {
|
|
805
|
+
CreateCourierLocationRequest.encode(message.location, writer.uint32(18).fork()).ldelim();
|
|
806
|
+
}
|
|
807
|
+
if (message.timestamp !== undefined) {
|
|
808
|
+
Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(26).fork()).ldelim();
|
|
809
|
+
}
|
|
810
|
+
return writer;
|
|
811
|
+
},
|
|
812
|
+
|
|
813
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): StartNextCourierJobRequest {
|
|
814
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
815
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
816
|
+
const message = createBaseStartNextCourierJobRequest();
|
|
817
|
+
while (reader.pos < end) {
|
|
818
|
+
const tag = reader.uint32();
|
|
819
|
+
switch (tag >>> 3) {
|
|
820
|
+
case 1:
|
|
821
|
+
if (tag !== 8) {
|
|
822
|
+
break;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
message.courierId = reader.int32();
|
|
826
|
+
continue;
|
|
827
|
+
case 2:
|
|
828
|
+
if (tag !== 18) {
|
|
829
|
+
break;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
message.location = CreateCourierLocationRequest.decode(reader, reader.uint32());
|
|
833
|
+
continue;
|
|
834
|
+
case 3:
|
|
835
|
+
if (tag !== 26) {
|
|
836
|
+
break;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
840
|
+
continue;
|
|
841
|
+
}
|
|
842
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
843
|
+
break;
|
|
844
|
+
}
|
|
845
|
+
reader.skipType(tag & 7);
|
|
846
|
+
}
|
|
847
|
+
return message;
|
|
848
|
+
},
|
|
849
|
+
|
|
850
|
+
fromJSON(object: any): StartNextCourierJobRequest {
|
|
851
|
+
return {
|
|
852
|
+
courierId: isSet(object.courierId) ? Number(object.courierId) : 0,
|
|
853
|
+
location: isSet(object.location) ? CreateCourierLocationRequest.fromJSON(object.location) : undefined,
|
|
854
|
+
timestamp: isSet(object.timestamp) ? String(object.timestamp) : undefined,
|
|
855
|
+
};
|
|
856
|
+
},
|
|
857
|
+
|
|
858
|
+
toJSON(message: StartNextCourierJobRequest): unknown {
|
|
859
|
+
const obj: any = {};
|
|
860
|
+
message.courierId !== undefined && (obj.courierId = Math.round(message.courierId));
|
|
861
|
+
message.location !== undefined &&
|
|
862
|
+
(obj.location = message.location ? CreateCourierLocationRequest.toJSON(message.location) : undefined);
|
|
863
|
+
message.timestamp !== undefined && (obj.timestamp = message.timestamp);
|
|
864
|
+
return obj;
|
|
865
|
+
},
|
|
866
|
+
|
|
867
|
+
create<I extends Exact<DeepPartial<StartNextCourierJobRequest>, I>>(base?: I): StartNextCourierJobRequest {
|
|
868
|
+
return StartNextCourierJobRequest.fromPartial(base ?? {});
|
|
869
|
+
},
|
|
870
|
+
|
|
871
|
+
fromPartial<I extends Exact<DeepPartial<StartNextCourierJobRequest>, I>>(object: I): StartNextCourierJobRequest {
|
|
872
|
+
const message = createBaseStartNextCourierJobRequest();
|
|
873
|
+
message.courierId = object.courierId ?? 0;
|
|
874
|
+
message.location = (object.location !== undefined && object.location !== null)
|
|
875
|
+
? CreateCourierLocationRequest.fromPartial(object.location)
|
|
876
|
+
: undefined;
|
|
877
|
+
message.timestamp = object.timestamp ?? undefined;
|
|
878
|
+
return message;
|
|
879
|
+
},
|
|
880
|
+
};
|
|
881
|
+
|
|
789
882
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
790
883
|
|
|
791
884
|
export type DeepPartial<T> = T extends Builtin ? T
|