Files
npm-core-sdk/executionflowAction.ts
2025-09-23 12:47:58 +00:00

1200 lines
68 KiB
TypeScript

// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
// @generated from protobuf file "executionflowAction.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 { HandlingunitSummary } from "./warehousingShared";
import { ExeFlowLine } from "./tradeShared";
import { OrderRequestedMilestones } from "./tradeShared";
import { MetadataElement } from "./shared";
import { DateTime } from "./shared";
import { ETA } from "./tradeShared";
import { EntityID } from "./shared";
import { CommandHeader } from "./shared";
import { ClaimSummary } from "./shared";
import { AttachmentSummary } from "./shared";
import { TradeTier } from "./tradeShared";
import { ExecutionflowStatusStruct } from "./tradeShared";
// Action Summary
// - MapSummaryToOrder : Map entity summary to Order entity > trade.order.ExecutionflowUpdated
// - NotifyPartnerApps : Notify new exeflow to PartnerApps
// - CreateDetectedOrder : Create an order for the detected ExecutionFlow > trade.order.OrderDetected
// - MapETAToOrder : map the Executionflow ETA to the corresponding order entity >trade.order.ExecutionflowETAUpdated
//
/**
*
* ExecutionflowMapSummaryToOrder : map the Executionflow status to the corresponding trade order entity
*
* @generated from protobuf message api.ExecutionflowMapSummaryToOrderPayload
*/
export interface ExecutionflowMapSummaryToOrderPayload {
/**
* @generated from protobuf field: api.ExecutionflowStatusStruct Status = 1
*/
Status?: ExecutionflowStatusStruct;
/**
* @generated from protobuf field: string OrderID = 2
*/
OrderID: string;
/**
* @generated from protobuf field: api.TradeTier ShipFrom = 4
*/
ShipFrom?: TradeTier;
/**
* @generated from protobuf field: api.TradeTier ShipTo = 5
*/
ShipTo?: TradeTier;
/**
* @generated from protobuf field: api.TradeTier Carrier = 6
*/
Carrier?: TradeTier;
/**
* @generated from protobuf field: string CarrierService = 7
*/
CarrierService: string;
/**
* @generated from protobuf field: repeated api.AttachmentSummary Attachments = 16
*/
Attachments: AttachmentSummary[];
/**
* @generated from protobuf field: int32 AttachmentNumber = 17
*/
AttachmentNumber: number;
/**
* @generated from protobuf field: repeated api.ClaimSummary Claims = 18
*/
Claims: ClaimSummary[];
/**
* @generated from protobuf field: int32 ClaimNumber = 19
*/
ClaimNumber: number;
}
/**
* @generated from protobuf message api.ExecutionflowMapSummaryToOrder
*/
export interface ExecutionflowMapSummaryToOrder {
/**
* @generated from protobuf field: api.CommandHeader Header = 1
*/
Header?: CommandHeader;
/**
* @generated from protobuf field: api.EntityID ID = 2
*/
ID?: EntityID;
/**
* @generated from protobuf field: api.ExecutionflowMapSummaryToOrderPayload Payload = 3
*/
Payload?: ExecutionflowMapSummaryToOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowMapSummaryToOrderPayload EventPayload = 4
*/
EventPayload?: ExecutionflowMapSummaryToOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowMapSummaryToOrderPayload PreviousPayload = 5
*/
PreviousPayload?: ExecutionflowMapSummaryToOrderPayload;
}
/**
*
* ExecutionflowMapETAToOrder : map the Executionflow ETA to the corresponding trade order entity
*
* @generated from protobuf message api.ExecutionflowMapETAToOrderPayload
*/
export interface ExecutionflowMapETAToOrderPayload {
/**
* @generated from protobuf field: api.ETA ExecutionflowETAComputed = 1
*/
ExecutionflowETAComputed?: ETA;
/**
* @generated from protobuf field: string OrderID = 2
*/
OrderID: string;
}
/**
* @generated from protobuf message api.ExecutionflowMapETAToOrder
*/
export interface ExecutionflowMapETAToOrder {
/**
* @generated from protobuf field: api.CommandHeader Header = 1
*/
Header?: CommandHeader;
/**
* @generated from protobuf field: api.EntityID ID = 2
*/
ID?: EntityID;
/**
* @generated from protobuf field: api.ExecutionflowMapETAToOrderPayload Payload = 3
*/
Payload?: ExecutionflowMapETAToOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowMapETAToOrderPayload EventPayload = 4
*/
EventPayload?: ExecutionflowMapETAToOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowMapETAToOrderPayload PreviousPayload = 5
*/
PreviousPayload?: ExecutionflowMapETAToOrderPayload;
}
/**
*
* NotifyPartnerApps : Notify new exeflow to partner Apps
*
* @generated from protobuf message api.ExecutionflowNotifyPartnerAppsPayload
*/
export interface ExecutionflowNotifyPartnerAppsPayload {
/**
* @generated from protobuf field: api.DateTime CreationDateTime = 1
*/
CreationDateTime?: DateTime;
/**
* @generated from protobuf field: string OrderID = 2
*/
OrderID: string;
/**
* Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
*
* @generated from protobuf field: repeated api.MetadataElement MetaData = 3
*/
MetaData: MetadataElement[];
/**
* Where to ship the order from
*
* @generated from protobuf field: api.TradeTier ShipFrom = 4
*/
ShipFrom?: TradeTier;
/**
* Where to ship the order to
*
* @generated from protobuf field: api.TradeTier ShipTo = 5
*/
ShipTo?: TradeTier;
/**
* Definition of the order carrier
*
* @generated from protobuf field: api.TradeTier Carrier = 6
*/
Carrier?: TradeTier;
/**
* Type of carrier service
*
* @generated from protobuf field: string CarrierService = 7
*/
CarrierService: string;
/**
* @generated from protobuf field: api.OrderRequestedMilestones RequestedMilestones = 8
*/
RequestedMilestones?: OrderRequestedMilestones;
/**
* @generated from protobuf field: repeated api.ExeFlowLine Lines = 9
*/
Lines: ExeFlowLine[];
/**
* @generated from protobuf field: repeated api.HandlingunitSummary Handlingunits = 11
*/
Handlingunits: HandlingunitSummary[];
/**
* @generated from protobuf field: api.ExecutionflowStatusStruct Status = 13
*/
Status?: ExecutionflowStatusStruct;
/**
* @generated from protobuf field: bool ShipFromAcked = 14
*/
ShipFromAcked: boolean;
/**
* @generated from protobuf field: bool ShipToAcked = 15
*/
ShipToAcked: boolean;
}
/**
* @generated from protobuf message api.ExecutionflowNotifyPartnerApps
*/
export interface ExecutionflowNotifyPartnerApps {
/**
* @generated from protobuf field: api.CommandHeader Header = 1
*/
Header?: CommandHeader;
/**
* @generated from protobuf field: api.EntityID ID = 2
*/
ID?: EntityID;
/**
* @generated from protobuf field: api.ExecutionflowNotifyPartnerAppsPayload Payload = 3
*/
Payload?: ExecutionflowNotifyPartnerAppsPayload;
/**
* @generated from protobuf field: api.ExecutionflowNotifyPartnerAppsPayload EventPayload = 4
*/
EventPayload?: ExecutionflowNotifyPartnerAppsPayload;
/**
* @generated from protobuf field: api.ExecutionflowNotifyPartnerAppsPayload PreviousPayload = 5
*/
PreviousPayload?: ExecutionflowNotifyPartnerAppsPayload;
}
/**
*
* CreateDetectedOrder : Create order to give access to detected exeflow
*
* @generated from protobuf message api.ExecutionflowCreateDetectedOrderPayload
*/
export interface ExecutionflowCreateDetectedOrderPayload {
/**
* @generated from protobuf field: api.DateTime CreationDateTime = 1
*/
CreationDateTime?: DateTime;
/**
* @generated from protobuf field: string OrderID = 2
*/
OrderID: string;
/**
* @generated from protobuf field: repeated api.MetadataElement MetaData = 3
*/
MetaData: MetadataElement[];
/**
* @generated from protobuf field: api.TradeTier ShipFrom = 4
*/
ShipFrom?: TradeTier;
/**
* @generated from protobuf field: api.TradeTier ShipTo = 5
*/
ShipTo?: TradeTier;
/**
* @generated from protobuf field: api.TradeTier Carrier = 6
*/
Carrier?: TradeTier;
/**
* @generated from protobuf field: string CarrierService = 7
*/
CarrierService: string;
/**
* @generated from protobuf field: api.OrderRequestedMilestones RequestedMilestones = 8
*/
RequestedMilestones?: OrderRequestedMilestones;
/**
* @generated from protobuf field: repeated api.ExeFlowLine Lines = 9
*/
Lines: ExeFlowLine[];
// repeated HandlingunitSummary Handlingunits = 11;
/**
* @generated from protobuf field: api.ExecutionflowStatusStruct Status = 13
*/
Status?: ExecutionflowStatusStruct;
}
/**
* @generated from protobuf message api.ExecutionflowCreateDetectedOrder
*/
export interface ExecutionflowCreateDetectedOrder {
/**
* @generated from protobuf field: api.CommandHeader Header = 1
*/
Header?: CommandHeader;
/**
* @generated from protobuf field: api.EntityID ID = 2
*/
ID?: EntityID;
/**
* @generated from protobuf field: api.ExecutionflowCreateDetectedOrderPayload Payload = 3
*/
Payload?: ExecutionflowCreateDetectedOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowCreateDetectedOrderPayload EventPayload = 4
*/
EventPayload?: ExecutionflowCreateDetectedOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowCreateDetectedOrderPayload PreviousPayload = 5
*/
PreviousPayload?: ExecutionflowCreateDetectedOrderPayload;
}
/**
* @generated from protobuf message api.ExecutionflowPropagateLinesToOrderPayload
*/
export interface ExecutionflowPropagateLinesToOrderPayload {
/**
* Lines of the order
*
* @generated from protobuf field: repeated api.ExeFlowLine Lines = 1
*/
Lines: ExeFlowLine[];
/**
* @generated from protobuf field: string OrderID = 2
*/
OrderID: string;
}
/**
* @generated from protobuf message api.ExecutionflowPropagateLinesToOrder
*/
export interface ExecutionflowPropagateLinesToOrder {
/**
* @generated from protobuf field: api.CommandHeader Header = 1
*/
Header?: CommandHeader;
/**
* @generated from protobuf field: api.EntityID ID = 2
*/
ID?: EntityID;
/**
* @generated from protobuf field: api.ExecutionflowPropagateLinesToOrderPayload Payload = 3
*/
Payload?: ExecutionflowPropagateLinesToOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowPropagateLinesToOrderPayload EventPayload = 4
*/
EventPayload?: ExecutionflowPropagateLinesToOrderPayload;
/**
* @generated from protobuf field: api.ExecutionflowPropagateLinesToOrderPayload PreviousPayload = 5
*/
PreviousPayload?: ExecutionflowPropagateLinesToOrderPayload;
}
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowMapSummaryToOrderPayload$Type extends MessageType<ExecutionflowMapSummaryToOrderPayload> {
constructor() {
super("api.ExecutionflowMapSummaryToOrderPayload", [
{ no: 1, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => ExecutionflowStatusStruct },
{ no: 2, name: "OrderID", kind: "scalar", localName: "OrderID", jsonName: "OrderID", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "ShipFrom", kind: "message", localName: "ShipFrom", jsonName: "ShipFrom", T: () => TradeTier },
{ no: 5, name: "ShipTo", kind: "message", localName: "ShipTo", jsonName: "ShipTo", T: () => TradeTier },
{ no: 6, name: "Carrier", kind: "message", localName: "Carrier", jsonName: "Carrier", T: () => TradeTier },
{ no: 7, name: "CarrierService", kind: "scalar", localName: "CarrierService", jsonName: "CarrierService", T: 9 /*ScalarType.STRING*/ },
{ no: 16, name: "Attachments", kind: "message", localName: "Attachments", jsonName: "Attachments", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AttachmentSummary },
{ no: 17, name: "AttachmentNumber", kind: "scalar", localName: "AttachmentNumber", jsonName: "AttachmentNumber", T: 5 /*ScalarType.INT32*/ },
{ no: 18, name: "Claims", kind: "message", localName: "Claims", jsonName: "Claims", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ClaimSummary },
{ no: 19, name: "ClaimNumber", kind: "scalar", localName: "ClaimNumber", jsonName: "ClaimNumber", T: 5 /*ScalarType.INT32*/ }
], { "api.messageType": "Command", "api.payload": true, "api.action": "MapSummaryToOrder" });
}
create(value?: PartialMessage<ExecutionflowMapSummaryToOrderPayload>): ExecutionflowMapSummaryToOrderPayload {
const message = globalThis.Object.create((this.messagePrototype!));
message.OrderID = "";
message.CarrierService = "";
message.Attachments = [];
message.AttachmentNumber = 0;
message.Claims = [];
message.ClaimNumber = 0;
if (value !== undefined)
reflectionMergePartial<ExecutionflowMapSummaryToOrderPayload>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowMapSummaryToOrderPayload): ExecutionflowMapSummaryToOrderPayload {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.ExecutionflowStatusStruct Status */ 1:
message.Status = ExecutionflowStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status);
break;
case /* string OrderID */ 2:
message.OrderID = reader.string();
break;
case /* api.TradeTier ShipFrom */ 4:
message.ShipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.ShipFrom);
break;
case /* api.TradeTier ShipTo */ 5:
message.ShipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.ShipTo);
break;
case /* api.TradeTier Carrier */ 6:
message.Carrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.Carrier);
break;
case /* string CarrierService */ 7:
message.CarrierService = reader.string();
break;
case /* repeated api.AttachmentSummary Attachments */ 16:
message.Attachments.push(AttachmentSummary.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* int32 AttachmentNumber */ 17:
message.AttachmentNumber = reader.int32();
break;
case /* repeated api.ClaimSummary Claims */ 18:
message.Claims.push(ClaimSummary.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* int32 ClaimNumber */ 19:
message.ClaimNumber = reader.int32();
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: ExecutionflowMapSummaryToOrderPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.ExecutionflowStatusStruct Status = 1; */
if (message.Status)
ExecutionflowStatusStruct.internalBinaryWrite(message.Status, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string OrderID = 2; */
if (message.OrderID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.OrderID);
/* api.TradeTier ShipFrom = 4; */
if (message.ShipFrom)
TradeTier.internalBinaryWrite(message.ShipFrom, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier ShipTo = 5; */
if (message.ShipTo)
TradeTier.internalBinaryWrite(message.ShipTo, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier Carrier = 6; */
if (message.Carrier)
TradeTier.internalBinaryWrite(message.Carrier, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* string CarrierService = 7; */
if (message.CarrierService !== "")
writer.tag(7, WireType.LengthDelimited).string(message.CarrierService);
/* repeated api.AttachmentSummary Attachments = 16; */
for (let i = 0; i < message.Attachments.length; i++)
AttachmentSummary.internalBinaryWrite(message.Attachments[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
/* int32 AttachmentNumber = 17; */
if (message.AttachmentNumber !== 0)
writer.tag(17, WireType.Varint).int32(message.AttachmentNumber);
/* repeated api.ClaimSummary Claims = 18; */
for (let i = 0; i < message.Claims.length; i++)
ClaimSummary.internalBinaryWrite(message.Claims[i], writer.tag(18, WireType.LengthDelimited).fork(), options).join();
/* int32 ClaimNumber = 19; */
if (message.ClaimNumber !== 0)
writer.tag(19, WireType.Varint).int32(message.ClaimNumber);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.ExecutionflowMapSummaryToOrderPayload
*/
export const ExecutionflowMapSummaryToOrderPayload = new ExecutionflowMapSummaryToOrderPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowMapSummaryToOrder$Type extends MessageType<ExecutionflowMapSummaryToOrder> {
constructor() {
super("api.ExecutionflowMapSummaryToOrder", [
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader },
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => ExecutionflowMapSummaryToOrderPayload },
{ no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => ExecutionflowMapSummaryToOrderPayload },
{ no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => ExecutionflowMapSummaryToOrderPayload }
], { "api.messageType": "Command", "api.action": "MapSummaryToOrder", "api.resultingEvent": "order.ExecutionflowUpdated", "api.triggerNotEventFilters": "ETAUpdated,HUETAUpdated,Restored,LinesAdded" });
}
create(value?: PartialMessage<ExecutionflowMapSummaryToOrder>): ExecutionflowMapSummaryToOrder {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExecutionflowMapSummaryToOrder>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowMapSummaryToOrder): ExecutionflowMapSummaryToOrder {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.CommandHeader Header */ 1:
message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
break;
case /* api.EntityID ID */ 2:
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
break;
case /* api.ExecutionflowMapSummaryToOrderPayload Payload */ 3:
message.Payload = ExecutionflowMapSummaryToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
break;
case /* api.ExecutionflowMapSummaryToOrderPayload EventPayload */ 4:
message.EventPayload = ExecutionflowMapSummaryToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload);
break;
case /* api.ExecutionflowMapSummaryToOrderPayload PreviousPayload */ 5:
message.PreviousPayload = ExecutionflowMapSummaryToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.PreviousPayload);
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: ExecutionflowMapSummaryToOrder, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.CommandHeader Header = 1; */
if (message.Header)
CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.EntityID ID = 2; */
if (message.ID)
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapSummaryToOrderPayload Payload = 3; */
if (message.Payload)
ExecutionflowMapSummaryToOrderPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapSummaryToOrderPayload EventPayload = 4; */
if (message.EventPayload)
ExecutionflowMapSummaryToOrderPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapSummaryToOrderPayload PreviousPayload = 5; */
if (message.PreviousPayload)
ExecutionflowMapSummaryToOrderPayload.internalBinaryWrite(message.PreviousPayload, writer.tag(5, 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.ExecutionflowMapSummaryToOrder
*/
export const ExecutionflowMapSummaryToOrder = new ExecutionflowMapSummaryToOrder$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowMapETAToOrderPayload$Type extends MessageType<ExecutionflowMapETAToOrderPayload> {
constructor() {
super("api.ExecutionflowMapETAToOrderPayload", [
{ no: 1, name: "ExecutionflowETAComputed", kind: "message", localName: "ExecutionflowETAComputed", jsonName: "ExecutionflowETAComputed", T: () => ETA },
{ no: 2, name: "OrderID", kind: "scalar", localName: "OrderID", jsonName: "OrderID", T: 9 /*ScalarType.STRING*/ }
], { "api.messageType": "Command", "api.payload": true, "api.action": "MapETAToOrder" });
}
create(value?: PartialMessage<ExecutionflowMapETAToOrderPayload>): ExecutionflowMapETAToOrderPayload {
const message = globalThis.Object.create((this.messagePrototype!));
message.OrderID = "";
if (value !== undefined)
reflectionMergePartial<ExecutionflowMapETAToOrderPayload>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowMapETAToOrderPayload): ExecutionflowMapETAToOrderPayload {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.ETA ExecutionflowETAComputed */ 1:
message.ExecutionflowETAComputed = ETA.internalBinaryRead(reader, reader.uint32(), options, message.ExecutionflowETAComputed);
break;
case /* string OrderID */ 2:
message.OrderID = 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: ExecutionflowMapETAToOrderPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.ETA ExecutionflowETAComputed = 1; */
if (message.ExecutionflowETAComputed)
ETA.internalBinaryWrite(message.ExecutionflowETAComputed, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string OrderID = 2; */
if (message.OrderID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.OrderID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.ExecutionflowMapETAToOrderPayload
*/
export const ExecutionflowMapETAToOrderPayload = new ExecutionflowMapETAToOrderPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowMapETAToOrder$Type extends MessageType<ExecutionflowMapETAToOrder> {
constructor() {
super("api.ExecutionflowMapETAToOrder", [
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader },
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => ExecutionflowMapETAToOrderPayload },
{ no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => ExecutionflowMapETAToOrderPayload },
{ no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => ExecutionflowMapETAToOrderPayload }
], { "api.messageType": "Command", "api.action": "MapETAToOrder", "api.resultingEvent": "order.ExecutionflowETAUpdated", "api.triggerEventFilters": "ETAUpdated,HUETAUpdated,Created,Detected,HUContentUpdated" });
}
create(value?: PartialMessage<ExecutionflowMapETAToOrder>): ExecutionflowMapETAToOrder {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExecutionflowMapETAToOrder>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowMapETAToOrder): ExecutionflowMapETAToOrder {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.CommandHeader Header */ 1:
message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
break;
case /* api.EntityID ID */ 2:
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
break;
case /* api.ExecutionflowMapETAToOrderPayload Payload */ 3:
message.Payload = ExecutionflowMapETAToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
break;
case /* api.ExecutionflowMapETAToOrderPayload EventPayload */ 4:
message.EventPayload = ExecutionflowMapETAToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload);
break;
case /* api.ExecutionflowMapETAToOrderPayload PreviousPayload */ 5:
message.PreviousPayload = ExecutionflowMapETAToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.PreviousPayload);
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: ExecutionflowMapETAToOrder, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.CommandHeader Header = 1; */
if (message.Header)
CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.EntityID ID = 2; */
if (message.ID)
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapETAToOrderPayload Payload = 3; */
if (message.Payload)
ExecutionflowMapETAToOrderPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapETAToOrderPayload EventPayload = 4; */
if (message.EventPayload)
ExecutionflowMapETAToOrderPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowMapETAToOrderPayload PreviousPayload = 5; */
if (message.PreviousPayload)
ExecutionflowMapETAToOrderPayload.internalBinaryWrite(message.PreviousPayload, writer.tag(5, 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.ExecutionflowMapETAToOrder
*/
export const ExecutionflowMapETAToOrder = new ExecutionflowMapETAToOrder$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowNotifyPartnerAppsPayload$Type extends MessageType<ExecutionflowNotifyPartnerAppsPayload> {
constructor() {
super("api.ExecutionflowNotifyPartnerAppsPayload", [
{ no: 1, name: "CreationDateTime", kind: "message", localName: "CreationDateTime", jsonName: "CreationDateTime", T: () => DateTime },
{ no: 2, name: "OrderID", kind: "scalar", localName: "OrderID", jsonName: "OrderID", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "MetaData", kind: "message", localName: "MetaData", jsonName: "MetaData", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)" }, "api.metadata": true, "api.aggKey": "Key", "api.transientRef": "Order,Payload.MetaData,hard" } },
{ no: 4, name: "ShipFrom", kind: "message", localName: "ShipFrom", jsonName: "ShipFrom", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where to ship the order from" } } },
{ no: 5, name: "ShipTo", kind: "message", localName: "ShipTo", jsonName: "ShipTo", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where to ship the order to" } } },
{ no: 6, name: "Carrier", kind: "message", localName: "Carrier", jsonName: "Carrier", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Definition of the order carrier" } } },
{ no: 7, name: "CarrierService", kind: "scalar", localName: "CarrierService", jsonName: "CarrierService", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Type of carrier service" } } },
{ no: 8, name: "RequestedMilestones", kind: "message", localName: "RequestedMilestones", jsonName: "RequestedMilestones", T: () => OrderRequestedMilestones },
{ no: 9, name: "Lines", kind: "message", localName: "Lines", jsonName: "Lines", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExeFlowLine, options: { "api.aggKey": "LineID" } },
{ no: 11, name: "Handlingunits", kind: "message", localName: "Handlingunits", jsonName: "Handlingunits", repeat: 2 /*RepeatType.UNPACKED*/, T: () => HandlingunitSummary, options: { "api.aggKey": "HandlingunitID" } },
{ no: 13, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => ExecutionflowStatusStruct },
{ no: 14, name: "ShipFromAcked", kind: "scalar", localName: "ShipFromAcked", jsonName: "ShipFromAcked", T: 8 /*ScalarType.BOOL*/ },
{ no: 15, name: "ShipToAcked", kind: "scalar", localName: "ShipToAcked", jsonName: "ShipToAcked", T: 8 /*ScalarType.BOOL*/ }
], { "api.messageType": "Command", "api.payload": true, "api.action": "NotifyPartnerApps" });
}
create(value?: PartialMessage<ExecutionflowNotifyPartnerAppsPayload>): ExecutionflowNotifyPartnerAppsPayload {
const message = globalThis.Object.create((this.messagePrototype!));
message.OrderID = "";
message.MetaData = [];
message.CarrierService = "";
message.Lines = [];
message.Handlingunits = [];
message.ShipFromAcked = false;
message.ShipToAcked = false;
if (value !== undefined)
reflectionMergePartial<ExecutionflowNotifyPartnerAppsPayload>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowNotifyPartnerAppsPayload): ExecutionflowNotifyPartnerAppsPayload {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.DateTime CreationDateTime */ 1:
message.CreationDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.CreationDateTime);
break;
case /* string OrderID */ 2:
message.OrderID = reader.string();
break;
case /* repeated api.MetadataElement MetaData */ 3:
message.MetaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.TradeTier ShipFrom */ 4:
message.ShipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.ShipFrom);
break;
case /* api.TradeTier ShipTo */ 5:
message.ShipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.ShipTo);
break;
case /* api.TradeTier Carrier */ 6:
message.Carrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.Carrier);
break;
case /* string CarrierService */ 7:
message.CarrierService = reader.string();
break;
case /* api.OrderRequestedMilestones RequestedMilestones */ 8:
message.RequestedMilestones = OrderRequestedMilestones.internalBinaryRead(reader, reader.uint32(), options, message.RequestedMilestones);
break;
case /* repeated api.ExeFlowLine Lines */ 9:
message.Lines.push(ExeFlowLine.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* repeated api.HandlingunitSummary Handlingunits */ 11:
message.Handlingunits.push(HandlingunitSummary.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.ExecutionflowStatusStruct Status */ 13:
message.Status = ExecutionflowStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status);
break;
case /* bool ShipFromAcked */ 14:
message.ShipFromAcked = reader.bool();
break;
case /* bool ShipToAcked */ 15:
message.ShipToAcked = reader.bool();
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: ExecutionflowNotifyPartnerAppsPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.DateTime CreationDateTime = 1; */
if (message.CreationDateTime)
DateTime.internalBinaryWrite(message.CreationDateTime, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string OrderID = 2; */
if (message.OrderID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.OrderID);
/* repeated api.MetadataElement MetaData = 3; */
for (let i = 0; i < message.MetaData.length; i++)
MetadataElement.internalBinaryWrite(message.MetaData[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier ShipFrom = 4; */
if (message.ShipFrom)
TradeTier.internalBinaryWrite(message.ShipFrom, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier ShipTo = 5; */
if (message.ShipTo)
TradeTier.internalBinaryWrite(message.ShipTo, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier Carrier = 6; */
if (message.Carrier)
TradeTier.internalBinaryWrite(message.Carrier, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* string CarrierService = 7; */
if (message.CarrierService !== "")
writer.tag(7, WireType.LengthDelimited).string(message.CarrierService);
/* api.OrderRequestedMilestones RequestedMilestones = 8; */
if (message.RequestedMilestones)
OrderRequestedMilestones.internalBinaryWrite(message.RequestedMilestones, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
/* repeated api.ExeFlowLine Lines = 9; */
for (let i = 0; i < message.Lines.length; i++)
ExeFlowLine.internalBinaryWrite(message.Lines[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
/* repeated api.HandlingunitSummary Handlingunits = 11; */
for (let i = 0; i < message.Handlingunits.length; i++)
HandlingunitSummary.internalBinaryWrite(message.Handlingunits[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowStatusStruct Status = 13; */
if (message.Status)
ExecutionflowStatusStruct.internalBinaryWrite(message.Status, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
/* bool ShipFromAcked = 14; */
if (message.ShipFromAcked !== false)
writer.tag(14, WireType.Varint).bool(message.ShipFromAcked);
/* bool ShipToAcked = 15; */
if (message.ShipToAcked !== false)
writer.tag(15, WireType.Varint).bool(message.ShipToAcked);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.ExecutionflowNotifyPartnerAppsPayload
*/
export const ExecutionflowNotifyPartnerAppsPayload = new ExecutionflowNotifyPartnerAppsPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowNotifyPartnerApps$Type extends MessageType<ExecutionflowNotifyPartnerApps> {
constructor() {
super("api.ExecutionflowNotifyPartnerApps", [
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader },
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => ExecutionflowNotifyPartnerAppsPayload },
{ no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => ExecutionflowNotifyPartnerAppsPayload },
{ no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => ExecutionflowNotifyPartnerAppsPayload }
], { "api.messageType": "Command", "api.action": "NotifyPartnerApps", "api.triggerEventFilters": "Detected,Created,Renotified", "api.triggerNotEventFilters": "Restored,ETAUpdated,HUETAUpdated" });
}
create(value?: PartialMessage<ExecutionflowNotifyPartnerApps>): ExecutionflowNotifyPartnerApps {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExecutionflowNotifyPartnerApps>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowNotifyPartnerApps): ExecutionflowNotifyPartnerApps {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.CommandHeader Header */ 1:
message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
break;
case /* api.EntityID ID */ 2:
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
break;
case /* api.ExecutionflowNotifyPartnerAppsPayload Payload */ 3:
message.Payload = ExecutionflowNotifyPartnerAppsPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
break;
case /* api.ExecutionflowNotifyPartnerAppsPayload EventPayload */ 4:
message.EventPayload = ExecutionflowNotifyPartnerAppsPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload);
break;
case /* api.ExecutionflowNotifyPartnerAppsPayload PreviousPayload */ 5:
message.PreviousPayload = ExecutionflowNotifyPartnerAppsPayload.internalBinaryRead(reader, reader.uint32(), options, message.PreviousPayload);
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: ExecutionflowNotifyPartnerApps, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.CommandHeader Header = 1; */
if (message.Header)
CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.EntityID ID = 2; */
if (message.ID)
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowNotifyPartnerAppsPayload Payload = 3; */
if (message.Payload)
ExecutionflowNotifyPartnerAppsPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowNotifyPartnerAppsPayload EventPayload = 4; */
if (message.EventPayload)
ExecutionflowNotifyPartnerAppsPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowNotifyPartnerAppsPayload PreviousPayload = 5; */
if (message.PreviousPayload)
ExecutionflowNotifyPartnerAppsPayload.internalBinaryWrite(message.PreviousPayload, writer.tag(5, 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.ExecutionflowNotifyPartnerApps
*/
export const ExecutionflowNotifyPartnerApps = new ExecutionflowNotifyPartnerApps$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowCreateDetectedOrderPayload$Type extends MessageType<ExecutionflowCreateDetectedOrderPayload> {
constructor() {
super("api.ExecutionflowCreateDetectedOrderPayload", [
{ no: 1, name: "CreationDateTime", kind: "message", localName: "CreationDateTime", jsonName: "CreationDateTime", T: () => DateTime },
{ no: 2, name: "OrderID", kind: "scalar", localName: "OrderID", jsonName: "OrderID", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "MetaData", kind: "message", localName: "MetaData", jsonName: "MetaData", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement },
{ no: 4, name: "ShipFrom", kind: "message", localName: "ShipFrom", jsonName: "ShipFrom", T: () => TradeTier },
{ no: 5, name: "ShipTo", kind: "message", localName: "ShipTo", jsonName: "ShipTo", T: () => TradeTier },
{ no: 6, name: "Carrier", kind: "message", localName: "Carrier", jsonName: "Carrier", T: () => TradeTier },
{ no: 7, name: "CarrierService", kind: "scalar", localName: "CarrierService", jsonName: "CarrierService", T: 9 /*ScalarType.STRING*/ },
{ no: 8, name: "RequestedMilestones", kind: "message", localName: "RequestedMilestones", jsonName: "RequestedMilestones", T: () => OrderRequestedMilestones },
{ no: 9, name: "Lines", kind: "message", localName: "Lines", jsonName: "Lines", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExeFlowLine, options: { "api.aggKey": "LineID" } },
{ no: 13, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => ExecutionflowStatusStruct }
], { "api.messageType": "Command", "api.payload": true, "api.action": "CreateDetectedOrder" });
}
create(value?: PartialMessage<ExecutionflowCreateDetectedOrderPayload>): ExecutionflowCreateDetectedOrderPayload {
const message = globalThis.Object.create((this.messagePrototype!));
message.OrderID = "";
message.MetaData = [];
message.CarrierService = "";
message.Lines = [];
if (value !== undefined)
reflectionMergePartial<ExecutionflowCreateDetectedOrderPayload>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowCreateDetectedOrderPayload): ExecutionflowCreateDetectedOrderPayload {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.DateTime CreationDateTime */ 1:
message.CreationDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.CreationDateTime);
break;
case /* string OrderID */ 2:
message.OrderID = reader.string();
break;
case /* repeated api.MetadataElement MetaData */ 3:
message.MetaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.TradeTier ShipFrom */ 4:
message.ShipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.ShipFrom);
break;
case /* api.TradeTier ShipTo */ 5:
message.ShipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.ShipTo);
break;
case /* api.TradeTier Carrier */ 6:
message.Carrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.Carrier);
break;
case /* string CarrierService */ 7:
message.CarrierService = reader.string();
break;
case /* api.OrderRequestedMilestones RequestedMilestones */ 8:
message.RequestedMilestones = OrderRequestedMilestones.internalBinaryRead(reader, reader.uint32(), options, message.RequestedMilestones);
break;
case /* repeated api.ExeFlowLine Lines */ 9:
message.Lines.push(ExeFlowLine.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* api.ExecutionflowStatusStruct Status */ 13:
message.Status = ExecutionflowStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status);
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: ExecutionflowCreateDetectedOrderPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.DateTime CreationDateTime = 1; */
if (message.CreationDateTime)
DateTime.internalBinaryWrite(message.CreationDateTime, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string OrderID = 2; */
if (message.OrderID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.OrderID);
/* repeated api.MetadataElement MetaData = 3; */
for (let i = 0; i < message.MetaData.length; i++)
MetadataElement.internalBinaryWrite(message.MetaData[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier ShipFrom = 4; */
if (message.ShipFrom)
TradeTier.internalBinaryWrite(message.ShipFrom, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier ShipTo = 5; */
if (message.ShipTo)
TradeTier.internalBinaryWrite(message.ShipTo, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier Carrier = 6; */
if (message.Carrier)
TradeTier.internalBinaryWrite(message.Carrier, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* string CarrierService = 7; */
if (message.CarrierService !== "")
writer.tag(7, WireType.LengthDelimited).string(message.CarrierService);
/* api.OrderRequestedMilestones RequestedMilestones = 8; */
if (message.RequestedMilestones)
OrderRequestedMilestones.internalBinaryWrite(message.RequestedMilestones, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
/* repeated api.ExeFlowLine Lines = 9; */
for (let i = 0; i < message.Lines.length; i++)
ExeFlowLine.internalBinaryWrite(message.Lines[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowStatusStruct Status = 13; */
if (message.Status)
ExecutionflowStatusStruct.internalBinaryWrite(message.Status, writer.tag(13, 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.ExecutionflowCreateDetectedOrderPayload
*/
export const ExecutionflowCreateDetectedOrderPayload = new ExecutionflowCreateDetectedOrderPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowCreateDetectedOrder$Type extends MessageType<ExecutionflowCreateDetectedOrder> {
constructor() {
super("api.ExecutionflowCreateDetectedOrder", [
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader },
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => ExecutionflowCreateDetectedOrderPayload },
{ no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => ExecutionflowCreateDetectedOrderPayload },
{ no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => ExecutionflowCreateDetectedOrderPayload }
], { "api.messageType": "Command", "api.action": "CreateDetectedOrder", "api.resultingEvent": "order.ExecutionflowDetected", "api.triggerEventFilters": "Detected,Redetected" });
}
create(value?: PartialMessage<ExecutionflowCreateDetectedOrder>): ExecutionflowCreateDetectedOrder {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExecutionflowCreateDetectedOrder>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowCreateDetectedOrder): ExecutionflowCreateDetectedOrder {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.CommandHeader Header */ 1:
message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
break;
case /* api.EntityID ID */ 2:
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
break;
case /* api.ExecutionflowCreateDetectedOrderPayload Payload */ 3:
message.Payload = ExecutionflowCreateDetectedOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
break;
case /* api.ExecutionflowCreateDetectedOrderPayload EventPayload */ 4:
message.EventPayload = ExecutionflowCreateDetectedOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload);
break;
case /* api.ExecutionflowCreateDetectedOrderPayload PreviousPayload */ 5:
message.PreviousPayload = ExecutionflowCreateDetectedOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.PreviousPayload);
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: ExecutionflowCreateDetectedOrder, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.CommandHeader Header = 1; */
if (message.Header)
CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.EntityID ID = 2; */
if (message.ID)
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowCreateDetectedOrderPayload Payload = 3; */
if (message.Payload)
ExecutionflowCreateDetectedOrderPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowCreateDetectedOrderPayload EventPayload = 4; */
if (message.EventPayload)
ExecutionflowCreateDetectedOrderPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowCreateDetectedOrderPayload PreviousPayload = 5; */
if (message.PreviousPayload)
ExecutionflowCreateDetectedOrderPayload.internalBinaryWrite(message.PreviousPayload, writer.tag(5, 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.ExecutionflowCreateDetectedOrder
*/
export const ExecutionflowCreateDetectedOrder = new ExecutionflowCreateDetectedOrder$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowPropagateLinesToOrderPayload$Type extends MessageType<ExecutionflowPropagateLinesToOrderPayload> {
constructor() {
super("api.ExecutionflowPropagateLinesToOrderPayload", [
{ no: 1, name: "Lines", kind: "message", localName: "Lines", jsonName: "Lines", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExeFlowLine, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Lines of the order" }, "api.aggKey": "LineID" } },
{ no: 2, name: "OrderID", kind: "scalar", localName: "OrderID", jsonName: "OrderID", T: 9 /*ScalarType.STRING*/ }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Propagates lines from Executionflow to Order" } }, "api.messageType": "Command", "api.payload": true, "api.action": "PropagateLinesToOrder" });
}
create(value?: PartialMessage<ExecutionflowPropagateLinesToOrderPayload>): ExecutionflowPropagateLinesToOrderPayload {
const message = globalThis.Object.create((this.messagePrototype!));
message.Lines = [];
message.OrderID = "";
if (value !== undefined)
reflectionMergePartial<ExecutionflowPropagateLinesToOrderPayload>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowPropagateLinesToOrderPayload): ExecutionflowPropagateLinesToOrderPayload {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated api.ExeFlowLine Lines */ 1:
message.Lines.push(ExeFlowLine.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* string OrderID */ 2:
message.OrderID = 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: ExecutionflowPropagateLinesToOrderPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated api.ExeFlowLine Lines = 1; */
for (let i = 0; i < message.Lines.length; i++)
ExeFlowLine.internalBinaryWrite(message.Lines[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string OrderID = 2; */
if (message.OrderID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.OrderID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.ExecutionflowPropagateLinesToOrderPayload
*/
export const ExecutionflowPropagateLinesToOrderPayload = new ExecutionflowPropagateLinesToOrderPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ExecutionflowPropagateLinesToOrder$Type extends MessageType<ExecutionflowPropagateLinesToOrder> {
constructor() {
super("api.ExecutionflowPropagateLinesToOrder", [
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader },
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => ExecutionflowPropagateLinesToOrderPayload },
{ no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => ExecutionflowPropagateLinesToOrderPayload },
{ no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => ExecutionflowPropagateLinesToOrderPayload }
], { "api.messageType": "Command", "api.action": "PropagateLinesToOrder", "api.resultingEvent": "order.LinesDetected", "api.triggerEventFilters": "LinesAdded" });
}
create(value?: PartialMessage<ExecutionflowPropagateLinesToOrder>): ExecutionflowPropagateLinesToOrder {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ExecutionflowPropagateLinesToOrder>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExecutionflowPropagateLinesToOrder): ExecutionflowPropagateLinesToOrder {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.CommandHeader Header */ 1:
message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
break;
case /* api.EntityID ID */ 2:
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
break;
case /* api.ExecutionflowPropagateLinesToOrderPayload Payload */ 3:
message.Payload = ExecutionflowPropagateLinesToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
break;
case /* api.ExecutionflowPropagateLinesToOrderPayload EventPayload */ 4:
message.EventPayload = ExecutionflowPropagateLinesToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload);
break;
case /* api.ExecutionflowPropagateLinesToOrderPayload PreviousPayload */ 5:
message.PreviousPayload = ExecutionflowPropagateLinesToOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.PreviousPayload);
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: ExecutionflowPropagateLinesToOrder, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.CommandHeader Header = 1; */
if (message.Header)
CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.EntityID ID = 2; */
if (message.ID)
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowPropagateLinesToOrderPayload Payload = 3; */
if (message.Payload)
ExecutionflowPropagateLinesToOrderPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowPropagateLinesToOrderPayload EventPayload = 4; */
if (message.EventPayload)
ExecutionflowPropagateLinesToOrderPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* api.ExecutionflowPropagateLinesToOrderPayload PreviousPayload = 5; */
if (message.PreviousPayload)
ExecutionflowPropagateLinesToOrderPayload.internalBinaryWrite(message.PreviousPayload, writer.tag(5, 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.ExecutionflowPropagateLinesToOrder
*/
export const ExecutionflowPropagateLinesToOrder = new ExecutionflowPropagateLinesToOrder$Type();