You've already forked npm-core-sdk
601 lines
33 KiB
TypeScript
601 lines
33 KiB
TypeScript
// @generated by protobuf-ts 2.9.6
|
|
// @generated from protobuf file "tracking.proto" (package "api", syntax proto3)
|
|
// tslint:disable
|
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
import { WireType } from "@protobuf-ts/runtime";
|
|
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
import { PartnerPayload } from "./partner";
|
|
import { ActorPayload } from "./actor";
|
|
import { EntityID } from "./shared";
|
|
import { EventHeader } from "./shared";
|
|
import { ETA } from "./tradeShared";
|
|
import { AttachmentSummary } from "./shared";
|
|
import { TradeTier } from "./tradeShared";
|
|
import { DateTime } from "./shared";
|
|
import { TrackingStatusStruct } from "./transportShared";
|
|
import { TrackingEvent } from "./transportShared";
|
|
//
|
|
// The main goal of this entity is to keep track of the link between the HandlingunitID and the Tracking number.
|
|
// It is usually initiated with the Dispatched event or may be created by the Switched event when a new tracking event applies to Handlingunit
|
|
//
|
|
// It also keep tracks of all the events received for the same tracking number (Notified events).
|
|
//
|
|
// When the tracking is transfered to a next tracking number, we have it here
|
|
//
|
|
// The Dispatched Date is kept here as it is an important information to be tranfered to the stock
|
|
// updated 2021/02/16
|
|
|
|
/**
|
|
* @generated from protobuf message api.TrackingPayload
|
|
*/
|
|
export interface TrackingPayload {
|
|
/**
|
|
* @generated from protobuf field: string HandlingunitID = 1 [json_name = "HandlingunitID"];
|
|
*/
|
|
handlingunitID: string;
|
|
/**
|
|
* @generated from protobuf field: string TrackingURL = 2 [json_name = "TrackingURL"];
|
|
*/
|
|
trackingURL: string;
|
|
/**
|
|
* @generated from protobuf field: repeated api.TrackingEvent Events = 3 [json_name = "Events"];
|
|
*/
|
|
events: TrackingEvent[];
|
|
/**
|
|
* @generated from protobuf field: string NextTrackingID = 4 [json_name = "NextTrackingID"];
|
|
*/
|
|
nextTrackingID: string;
|
|
/**
|
|
* @generated from protobuf field: string NextTrackingURL = 5 [json_name = "NextTrackingURL"];
|
|
*/
|
|
nextTrackingURL: string;
|
|
// repeated MetadataElement MetaData = 6
|
|
// [
|
|
// (metadata) = true, (aggKey) = "Key", (kpiExclude) = "[{\"entity\":\"Executionflow\"},{\"entity\":\"Stock\"}]"
|
|
// ];
|
|
|
|
/**
|
|
* @generated from protobuf field: api.TrackingStatusStruct Status = 7 [json_name = "Status"];
|
|
*/
|
|
status?: TrackingStatusStruct; // Status field is not accessible from APIs
|
|
/**
|
|
* @generated from protobuf field: api.DateTime DispatchedDateTime = 8 [json_name = "DispatchedDateTime"];
|
|
*/
|
|
dispatchedDateTime?: DateTime;
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier HUCarrier = 9 [json_name = "HUCarrier"];
|
|
*/
|
|
hUCarrier?: TradeTier;
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier HUShipFrom = 10 [json_name = "HUShipFrom"];
|
|
*/
|
|
hUShipFrom?: TradeTier;
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier HUShipTo = 11 [json_name = "HUShipTo"];
|
|
*/
|
|
hUShipTo?: TradeTier;
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier NextHUCarrier = 12 [json_name = "NextHUCarrier"];
|
|
*/
|
|
nextHUCarrier?: TradeTier;
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier NextHUShipFrom = 13 [json_name = "NextHUShipFrom"];
|
|
*/
|
|
nextHUShipFrom?: TradeTier;
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier NextHUShipTo = 14 [json_name = "NextHUShipTo"];
|
|
*/
|
|
nextHUShipTo?: TradeTier;
|
|
/**
|
|
* @generated from protobuf field: repeated api.AttachmentSummary Attachments = 15 [json_name = "Attachments"];
|
|
*/
|
|
attachments: AttachmentSummary[];
|
|
/**
|
|
* @generated from protobuf field: int32 AttachmentNumber = 16 [json_name = "AttachmentNumber"];
|
|
*/
|
|
attachmentNumber: number;
|
|
/**
|
|
* @generated from protobuf field: api.ETA TrackingETA = 19 [json_name = "TrackingETA"];
|
|
*/
|
|
trackingETA?: ETA;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.Tracking
|
|
*/
|
|
export interface Tracking {
|
|
/**
|
|
* @generated from protobuf field: api.EventHeader LastEventHeader = 1 [json_name = "LastEventHeader"];
|
|
*/
|
|
lastEventHeader?: EventHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
|
|
*/
|
|
iD?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.TrackingPayload Payload = 3 [json_name = "Payload"];
|
|
*/
|
|
payload?: TrackingPayload;
|
|
}
|
|
// Tracking Enrichment
|
|
|
|
/**
|
|
* @generated from protobuf message api.TrackingEnrichment
|
|
*/
|
|
export interface TrackingEnrichment {
|
|
/**
|
|
* @generated from protobuf field: string ParentEventID = 1 [json_name = "ParentEventID"];
|
|
*/
|
|
parentEventID: string;
|
|
/**
|
|
* @generated from protobuf field: string EntityName = 2 [json_name = "EntityName"];
|
|
*/
|
|
entityName: string;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 3 [json_name = "EntityRefID"];
|
|
*/
|
|
entityRefID: string;
|
|
/**
|
|
* @generated from protobuf field: string RefFilter = 4 [json_name = "RefFilter"];
|
|
*/
|
|
refFilter: string;
|
|
/**
|
|
* @generated from protobuf field: string MergePath = 5 [json_name = "MergePath"];
|
|
*/
|
|
mergePath: string;
|
|
/**
|
|
* @generated from protobuf oneof: Content
|
|
*/
|
|
content: {
|
|
oneofKind: "actor";
|
|
/**
|
|
* @generated from protobuf field: api.ActorPayload Actor = 11 [json_name = "Actor"];
|
|
*/
|
|
actor: ActorPayload;
|
|
} | {
|
|
oneofKind: "partner";
|
|
/**
|
|
* @generated from protobuf field: api.PartnerPayload Partner = 12 [json_name = "Partner"];
|
|
*/
|
|
partner: PartnerPayload;
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
/**
|
|
* @generated from protobuf field: string Project = 6 [json_name = "Project"];
|
|
*/
|
|
project: string;
|
|
/**
|
|
* @generated from protobuf field: string ParentEntityName = 7 [json_name = "ParentEntityName"];
|
|
*/
|
|
parentEntityName: string;
|
|
/**
|
|
* @generated from protobuf field: string ParentEntityID = 8 [json_name = "ParentEntityID"];
|
|
*/
|
|
parentEntityID: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.TrackingTriplet
|
|
*/
|
|
export interface TrackingTriplet {
|
|
/**
|
|
* @generated from protobuf field: api.Tracking Current = 1 [json_name = "Current"];
|
|
*/
|
|
current?: Tracking;
|
|
/**
|
|
* @generated from protobuf field: api.Tracking Previous = 2 [json_name = "Previous"];
|
|
*/
|
|
previous?: Tracking;
|
|
/**
|
|
* @generated from protobuf field: api.Tracking LastEvent = 3 [json_name = "LastEvent"];
|
|
*/
|
|
lastEvent?: Tracking;
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingPayload$Type extends MessageType<TrackingPayload> {
|
|
constructor() {
|
|
super("api.TrackingPayload", [
|
|
{ no: 1, name: "HandlingunitID", kind: "scalar", jsonName: "HandlingunitID", T: 9 /*ScalarType.STRING*/, options: { "api.dataRestrictionKey": "Tracking", "api.indexationType": { Types: [{ Context: "*", Type: "generatedText,keyword" }] }, "api.kpiItems": { Items: [{ Context: "Tracking", Group: "tracking", Queryable: true }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortKeyword" }] } } },
|
|
{ no: 2, name: "TrackingURL", kind: "scalar", jsonName: "TrackingURL", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 3, name: "Events", kind: "message", jsonName: "Events", repeat: 1 /*RepeatType.PACKED*/, T: () => TrackingEvent, options: { "api.aggAppend": "Notified" } },
|
|
{ no: 4, name: "NextTrackingID", kind: "scalar", jsonName: "NextTrackingID", T: 9 /*ScalarType.STRING*/, options: { "api.indexationType": { Types: [{ Context: "*", Type: "generatedText,keyword" }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortKeyword" }] } } },
|
|
{ no: 5, name: "NextTrackingURL", kind: "scalar", jsonName: "NextTrackingURL", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 7, name: "Status", kind: "message", jsonName: "Status", T: () => TrackingStatusStruct, options: { "validate.rules": { message: { unauthorized: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true } } },
|
|
{ no: 8, name: "DispatchedDateTime", kind: "message", jsonName: "DispatchedDateTime", T: () => DateTime },
|
|
{ no: 9, name: "HUCarrier", kind: "message", jsonName: "HUCarrier", T: () => TradeTier },
|
|
{ no: 10, name: "HUShipFrom", kind: "message", jsonName: "HUShipFrom", T: () => TradeTier },
|
|
{ no: 11, name: "HUShipTo", kind: "message", jsonName: "HUShipTo", T: () => TradeTier },
|
|
{ no: 12, name: "NextHUCarrier", kind: "message", jsonName: "NextHUCarrier", T: () => TradeTier, options: { "api.kpiExclude": { Items: [{ Context: "Tracking", Group: "tracking" }] }, "api.extractRefExclude": "Tracking" } },
|
|
{ no: 13, name: "NextHUShipFrom", kind: "message", jsonName: "NextHUShipFrom", T: () => TradeTier, options: { "api.kpiExclude": { Items: [{ Context: "Tracking", Group: "tracking" }] }, "api.extractRefExclude": "Tracking" } },
|
|
{ no: 14, name: "NextHUShipTo", kind: "message", jsonName: "NextHUShipTo", T: () => TradeTier, options: { "api.kpiExclude": { Items: [{ Context: "Tracking", Group: "tracking" }] }, "api.extractRefExclude": "Tracking" } },
|
|
{ no: 15, name: "Attachments", kind: "message", jsonName: "Attachments", repeat: 1 /*RepeatType.PACKED*/, T: () => AttachmentSummary, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of attachments per type" }, "api.aggSkip": "AttachmentAdded,AttachmentRemoved" } },
|
|
{ no: 16, name: "AttachmentNumber", kind: "scalar", jsonName: "AttachmentNumber", T: 5 /*ScalarType.INT32*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Total number of attachments" } } },
|
|
{ no: 19, name: "TrackingETA", kind: "message", jsonName: "TrackingETA", T: () => ETA, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Estimated Time of Arrival for the HandlingUnit(s) concerned by the trackingID" }, "api.aggSkip": "ETAUpdated" } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<TrackingPayload>): TrackingPayload {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.handlingunitID = "";
|
|
message.trackingURL = "";
|
|
message.events = [];
|
|
message.nextTrackingID = "";
|
|
message.nextTrackingURL = "";
|
|
message.attachments = [];
|
|
message.attachmentNumber = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingPayload>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingPayload): TrackingPayload {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string HandlingunitID = 1 [json_name = "HandlingunitID"];*/ 1:
|
|
message.handlingunitID = reader.string();
|
|
break;
|
|
case /* string TrackingURL = 2 [json_name = "TrackingURL"];*/ 2:
|
|
message.trackingURL = reader.string();
|
|
break;
|
|
case /* repeated api.TrackingEvent Events = 3 [json_name = "Events"];*/ 3:
|
|
message.events.push(TrackingEvent.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* string NextTrackingID = 4 [json_name = "NextTrackingID"];*/ 4:
|
|
message.nextTrackingID = reader.string();
|
|
break;
|
|
case /* string NextTrackingURL = 5 [json_name = "NextTrackingURL"];*/ 5:
|
|
message.nextTrackingURL = reader.string();
|
|
break;
|
|
case /* api.TrackingStatusStruct Status = 7 [json_name = "Status"];*/ 7:
|
|
message.status = TrackingStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.status);
|
|
break;
|
|
case /* api.DateTime DispatchedDateTime = 8 [json_name = "DispatchedDateTime"];*/ 8:
|
|
message.dispatchedDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.dispatchedDateTime);
|
|
break;
|
|
case /* api.TradeTier HUCarrier = 9 [json_name = "HUCarrier"];*/ 9:
|
|
message.hUCarrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.hUCarrier);
|
|
break;
|
|
case /* api.TradeTier HUShipFrom = 10 [json_name = "HUShipFrom"];*/ 10:
|
|
message.hUShipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.hUShipFrom);
|
|
break;
|
|
case /* api.TradeTier HUShipTo = 11 [json_name = "HUShipTo"];*/ 11:
|
|
message.hUShipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.hUShipTo);
|
|
break;
|
|
case /* api.TradeTier NextHUCarrier = 12 [json_name = "NextHUCarrier"];*/ 12:
|
|
message.nextHUCarrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.nextHUCarrier);
|
|
break;
|
|
case /* api.TradeTier NextHUShipFrom = 13 [json_name = "NextHUShipFrom"];*/ 13:
|
|
message.nextHUShipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.nextHUShipFrom);
|
|
break;
|
|
case /* api.TradeTier NextHUShipTo = 14 [json_name = "NextHUShipTo"];*/ 14:
|
|
message.nextHUShipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.nextHUShipTo);
|
|
break;
|
|
case /* repeated api.AttachmentSummary Attachments = 15 [json_name = "Attachments"];*/ 15:
|
|
message.attachments.push(AttachmentSummary.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* int32 AttachmentNumber = 16 [json_name = "AttachmentNumber"];*/ 16:
|
|
message.attachmentNumber = reader.int32();
|
|
break;
|
|
case /* api.ETA TrackingETA = 19 [json_name = "TrackingETA"];*/ 19:
|
|
message.trackingETA = ETA.internalBinaryRead(reader, reader.uint32(), options, message.trackingETA);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string HandlingunitID = 1 [json_name = "HandlingunitID"]; */
|
|
if (message.handlingunitID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.handlingunitID);
|
|
/* string TrackingURL = 2 [json_name = "TrackingURL"]; */
|
|
if (message.trackingURL !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.trackingURL);
|
|
/* repeated api.TrackingEvent Events = 3 [json_name = "Events"]; */
|
|
for (let i = 0; i < message.events.length; i++)
|
|
TrackingEvent.internalBinaryWrite(message.events[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
/* string NextTrackingID = 4 [json_name = "NextTrackingID"]; */
|
|
if (message.nextTrackingID !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.nextTrackingID);
|
|
/* string NextTrackingURL = 5 [json_name = "NextTrackingURL"]; */
|
|
if (message.nextTrackingURL !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.nextTrackingURL);
|
|
/* api.TrackingStatusStruct Status = 7 [json_name = "Status"]; */
|
|
if (message.status)
|
|
TrackingStatusStruct.internalBinaryWrite(message.status, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.DateTime DispatchedDateTime = 8 [json_name = "DispatchedDateTime"]; */
|
|
if (message.dispatchedDateTime)
|
|
DateTime.internalBinaryWrite(message.dispatchedDateTime, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier HUCarrier = 9 [json_name = "HUCarrier"]; */
|
|
if (message.hUCarrier)
|
|
TradeTier.internalBinaryWrite(message.hUCarrier, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier HUShipFrom = 10 [json_name = "HUShipFrom"]; */
|
|
if (message.hUShipFrom)
|
|
TradeTier.internalBinaryWrite(message.hUShipFrom, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier HUShipTo = 11 [json_name = "HUShipTo"]; */
|
|
if (message.hUShipTo)
|
|
TradeTier.internalBinaryWrite(message.hUShipTo, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier NextHUCarrier = 12 [json_name = "NextHUCarrier"]; */
|
|
if (message.nextHUCarrier)
|
|
TradeTier.internalBinaryWrite(message.nextHUCarrier, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier NextHUShipFrom = 13 [json_name = "NextHUShipFrom"]; */
|
|
if (message.nextHUShipFrom)
|
|
TradeTier.internalBinaryWrite(message.nextHUShipFrom, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier NextHUShipTo = 14 [json_name = "NextHUShipTo"]; */
|
|
if (message.nextHUShipTo)
|
|
TradeTier.internalBinaryWrite(message.nextHUShipTo, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.AttachmentSummary Attachments = 15 [json_name = "Attachments"]; */
|
|
for (let i = 0; i < message.attachments.length; i++)
|
|
AttachmentSummary.internalBinaryWrite(message.attachments[i], writer.tag(15, WireType.LengthDelimited).fork(), options).join();
|
|
/* int32 AttachmentNumber = 16 [json_name = "AttachmentNumber"]; */
|
|
if (message.attachmentNumber !== 0)
|
|
writer.tag(16, WireType.Varint).int32(message.attachmentNumber);
|
|
/* api.ETA TrackingETA = 19 [json_name = "TrackingETA"]; */
|
|
if (message.trackingETA)
|
|
ETA.internalBinaryWrite(message.trackingETA, writer.tag(19, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingPayload
|
|
*/
|
|
export const TrackingPayload = new TrackingPayload$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class Tracking$Type extends MessageType<Tracking> {
|
|
constructor() {
|
|
super("api.Tracking", [
|
|
{ no: 1, name: "LastEventHeader", kind: "message", jsonName: "LastEventHeader", T: () => EventHeader },
|
|
{ no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
|
|
{ no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingPayload }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<Tracking>): Tracking {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Tracking>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Tracking): Tracking {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.EventHeader LastEventHeader = 1 [json_name = "LastEventHeader"];*/ 1:
|
|
message.lastEventHeader = EventHeader.internalBinaryRead(reader, reader.uint32(), options, message.lastEventHeader);
|
|
break;
|
|
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
|
|
message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
|
|
break;
|
|
case /* api.TrackingPayload Payload = 3 [json_name = "Payload"];*/ 3:
|
|
message.payload = TrackingPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: Tracking, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.EventHeader LastEventHeader = 1 [json_name = "LastEventHeader"]; */
|
|
if (message.lastEventHeader)
|
|
EventHeader.internalBinaryWrite(message.lastEventHeader, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityID ID = 2 [json_name = "ID"]; */
|
|
if (message.iD)
|
|
EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TrackingPayload Payload = 3 [json_name = "Payload"]; */
|
|
if (message.payload)
|
|
TrackingPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.Tracking
|
|
*/
|
|
export const Tracking = new Tracking$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingEnrichment$Type extends MessageType<TrackingEnrichment> {
|
|
constructor() {
|
|
super("api.TrackingEnrichment", [
|
|
{ no: 1, name: "ParentEventID", kind: "scalar", jsonName: "ParentEventID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "EntityName", kind: "scalar", jsonName: "EntityName", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 3, name: "EntityRefID", kind: "scalar", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 4, name: "RefFilter", kind: "scalar", jsonName: "RefFilter", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 5, name: "MergePath", kind: "scalar", jsonName: "MergePath", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 11, name: "Actor", kind: "message", jsonName: "Actor", oneof: "content", T: () => ActorPayload },
|
|
{ no: 12, name: "Partner", kind: "message", jsonName: "Partner", oneof: "content", T: () => PartnerPayload },
|
|
{ no: 6, name: "Project", kind: "scalar", jsonName: "Project", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 7, name: "ParentEntityName", kind: "scalar", jsonName: "ParentEntityName", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 8, name: "ParentEntityID", kind: "scalar", jsonName: "ParentEntityID", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<TrackingEnrichment>): TrackingEnrichment {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.parentEventID = "";
|
|
message.entityName = "";
|
|
message.entityRefID = "";
|
|
message.refFilter = "";
|
|
message.mergePath = "";
|
|
message.content = { oneofKind: undefined };
|
|
message.project = "";
|
|
message.parentEntityName = "";
|
|
message.parentEntityID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingEnrichment>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingEnrichment): TrackingEnrichment {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ParentEventID = 1 [json_name = "ParentEventID"];*/ 1:
|
|
message.parentEventID = reader.string();
|
|
break;
|
|
case /* string EntityName = 2 [json_name = "EntityName"];*/ 2:
|
|
message.entityName = reader.string();
|
|
break;
|
|
case /* string EntityRefID = 3 [json_name = "EntityRefID"];*/ 3:
|
|
message.entityRefID = reader.string();
|
|
break;
|
|
case /* string RefFilter = 4 [json_name = "RefFilter"];*/ 4:
|
|
message.refFilter = reader.string();
|
|
break;
|
|
case /* string MergePath = 5 [json_name = "MergePath"];*/ 5:
|
|
message.mergePath = reader.string();
|
|
break;
|
|
case /* api.ActorPayload Actor = 11 [json_name = "Actor"];*/ 11:
|
|
message.content = {
|
|
oneofKind: "actor",
|
|
actor: ActorPayload.internalBinaryRead(reader, reader.uint32(), options, (message.content as any).actor)
|
|
};
|
|
break;
|
|
case /* api.PartnerPayload Partner = 12 [json_name = "Partner"];*/ 12:
|
|
message.content = {
|
|
oneofKind: "partner",
|
|
partner: PartnerPayload.internalBinaryRead(reader, reader.uint32(), options, (message.content as any).partner)
|
|
};
|
|
break;
|
|
case /* string Project = 6 [json_name = "Project"];*/ 6:
|
|
message.project = reader.string();
|
|
break;
|
|
case /* string ParentEntityName = 7 [json_name = "ParentEntityName"];*/ 7:
|
|
message.parentEntityName = reader.string();
|
|
break;
|
|
case /* string ParentEntityID = 8 [json_name = "ParentEntityID"];*/ 8:
|
|
message.parentEntityID = reader.string();
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingEnrichment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ParentEventID = 1 [json_name = "ParentEventID"]; */
|
|
if (message.parentEventID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.parentEventID);
|
|
/* string EntityName = 2 [json_name = "EntityName"]; */
|
|
if (message.entityName !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.entityName);
|
|
/* string EntityRefID = 3 [json_name = "EntityRefID"]; */
|
|
if (message.entityRefID !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.entityRefID);
|
|
/* string RefFilter = 4 [json_name = "RefFilter"]; */
|
|
if (message.refFilter !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.refFilter);
|
|
/* string MergePath = 5 [json_name = "MergePath"]; */
|
|
if (message.mergePath !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.mergePath);
|
|
/* api.ActorPayload Actor = 11 [json_name = "Actor"]; */
|
|
if (message.content.oneofKind === "actor")
|
|
ActorPayload.internalBinaryWrite(message.content.actor, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.PartnerPayload Partner = 12 [json_name = "Partner"]; */
|
|
if (message.content.oneofKind === "partner")
|
|
PartnerPayload.internalBinaryWrite(message.content.partner, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
/* string Project = 6 [json_name = "Project"]; */
|
|
if (message.project !== "")
|
|
writer.tag(6, WireType.LengthDelimited).string(message.project);
|
|
/* string ParentEntityName = 7 [json_name = "ParentEntityName"]; */
|
|
if (message.parentEntityName !== "")
|
|
writer.tag(7, WireType.LengthDelimited).string(message.parentEntityName);
|
|
/* string ParentEntityID = 8 [json_name = "ParentEntityID"]; */
|
|
if (message.parentEntityID !== "")
|
|
writer.tag(8, WireType.LengthDelimited).string(message.parentEntityID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingEnrichment
|
|
*/
|
|
export const TrackingEnrichment = new TrackingEnrichment$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingTriplet$Type extends MessageType<TrackingTriplet> {
|
|
constructor() {
|
|
super("api.TrackingTriplet", [
|
|
{ no: 1, name: "Current", kind: "message", jsonName: "Current", T: () => Tracking },
|
|
{ no: 2, name: "Previous", kind: "message", jsonName: "Previous", T: () => Tracking },
|
|
{ no: 3, name: "LastEvent", kind: "message", jsonName: "LastEvent", T: () => Tracking }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<TrackingTriplet>): TrackingTriplet {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingTriplet>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingTriplet): TrackingTriplet {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.Tracking Current = 1 [json_name = "Current"];*/ 1:
|
|
message.current = Tracking.internalBinaryRead(reader, reader.uint32(), options, message.current);
|
|
break;
|
|
case /* api.Tracking Previous = 2 [json_name = "Previous"];*/ 2:
|
|
message.previous = Tracking.internalBinaryRead(reader, reader.uint32(), options, message.previous);
|
|
break;
|
|
case /* api.Tracking LastEvent = 3 [json_name = "LastEvent"];*/ 3:
|
|
message.lastEvent = Tracking.internalBinaryRead(reader, reader.uint32(), options, message.lastEvent);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingTriplet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.Tracking Current = 1 [json_name = "Current"]; */
|
|
if (message.current)
|
|
Tracking.internalBinaryWrite(message.current, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.Tracking Previous = 2 [json_name = "Previous"]; */
|
|
if (message.previous)
|
|
Tracking.internalBinaryWrite(message.previous, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.Tracking LastEvent = 3 [json_name = "LastEvent"]; */
|
|
if (message.lastEvent)
|
|
Tracking.internalBinaryWrite(message.lastEvent, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingTriplet
|
|
*/
|
|
export const TrackingTriplet = new TrackingTriplet$Type();
|