You've already forked npm-core-sdk
405 lines
12 KiB
TypeScript
405 lines
12 KiB
TypeScript
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
|
|
// @generated from file order.proto (package api, syntax proto3)
|
|
/* eslint-disable */
|
|
// @ts-nocheck
|
|
|
|
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
import { AttachmentSummary, ClaimSummary, DateTime, EntityID, EventHeader, MetadataElement } from "./shared_pb.js";
|
|
import { ETA, ETAbyExecutionflow, ExecutionflowSummary, OrderLine, OrderRequestedMilestones, OrderStatusStruct, ReferencedID, TradeTier } from "./tradeShared_pb.js";
|
|
import { ItemPayload } from "./item_pb.js";
|
|
import { ActorPayload } from "./actor_pb.js";
|
|
import { PartnerPayload } from "./partner_pb.js";
|
|
|
|
/**
|
|
* @generated from message api.OrderPayload
|
|
*/
|
|
export class OrderPayload extends Message<OrderPayload> {
|
|
/**
|
|
* @generated from field: api.DateTime CreationDateTime = 1;
|
|
*/
|
|
CreationDateTime?: DateTime;
|
|
|
|
/**
|
|
* In case the order is linked to a parent order
|
|
*
|
|
* @generated from field: api.ReferencedID ParentOrder = 2;
|
|
*/
|
|
ParentOrder?: ReferencedID;
|
|
|
|
/**
|
|
* @generated from field: string LanguageCodeISO6391 = 3;
|
|
*/
|
|
LanguageCodeISO6391 = "";
|
|
|
|
/**
|
|
* Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
|
|
*
|
|
* @generated from field: repeated api.MetadataElement MetaData = 4;
|
|
*/
|
|
MetaData: MetadataElement[] = [];
|
|
|
|
/**
|
|
* @generated from field: api.TradeTier Buyer = 5;
|
|
*/
|
|
Buyer?: TradeTier;
|
|
|
|
/**
|
|
* @generated from field: api.TradeTier Seller = 6;
|
|
*/
|
|
Seller?: TradeTier;
|
|
|
|
/**
|
|
* Where to ship the order from
|
|
*
|
|
* @generated from field: api.TradeTier ShipFrom = 7;
|
|
*/
|
|
ShipFrom?: TradeTier;
|
|
|
|
/**
|
|
* Where to ship the order to
|
|
*
|
|
* @generated from field: api.TradeTier ShipTo = 8;
|
|
*/
|
|
ShipTo?: TradeTier;
|
|
|
|
/**
|
|
* Definition of the order carrier
|
|
*
|
|
* @generated from field: api.TradeTier Carrier = 9;
|
|
*/
|
|
Carrier?: TradeTier;
|
|
|
|
/**
|
|
* Type of carrier service
|
|
*
|
|
* @generated from field: string CarrierService = 16;
|
|
*/
|
|
CarrierService = "";
|
|
|
|
/**
|
|
* @generated from field: api.OrderRequestedMilestones RequestedMilestones = 10;
|
|
*/
|
|
RequestedMilestones?: OrderRequestedMilestones;
|
|
|
|
/**
|
|
* Lines of the order
|
|
*
|
|
* @generated from field: repeated api.OrderLine Lines = 11;
|
|
*/
|
|
Lines: OrderLine[] = [];
|
|
|
|
/**
|
|
* @generated from field: api.ETA EstimatedTimeArrival = 12 [deprecated = true];
|
|
* @deprecated
|
|
*/
|
|
EstimatedTimeArrival?: ETA;
|
|
|
|
/**
|
|
* @generated from field: api.DateTime ActualCompletionDateTime = 13;
|
|
*/
|
|
ActualCompletionDateTime?: DateTime;
|
|
|
|
/**
|
|
* Summary describing how the order is executed by ExecutionFlow
|
|
*
|
|
* @generated from field: repeated api.ExecutionflowSummary ExecutionflowSummary = 14;
|
|
*/
|
|
ExecutionflowSummary: ExecutionflowSummary[] = [];
|
|
|
|
/**
|
|
* Status field is not accessible from APIs
|
|
*
|
|
* @generated from field: api.OrderStatusStruct Status = 17;
|
|
*/
|
|
Status?: OrderStatusStruct;
|
|
|
|
/**
|
|
* @generated from field: repeated api.AttachmentSummary Attachments = 18;
|
|
*/
|
|
Attachments: AttachmentSummary[] = [];
|
|
|
|
/**
|
|
* @generated from field: int32 AttachmentNumber = 19;
|
|
*/
|
|
AttachmentNumber = 0;
|
|
|
|
/**
|
|
* @generated from field: repeated api.ClaimSummary Claims = 20;
|
|
*/
|
|
Claims: ClaimSummary[] = [];
|
|
|
|
/**
|
|
* @generated from field: int32 ClaimNumber = 21;
|
|
*/
|
|
ClaimNumber = 0;
|
|
|
|
/**
|
|
* Estimated Time of Arrival for the ExecutionFlow(s) created for this order
|
|
*
|
|
* @generated from field: repeated api.ETAbyExecutionflow ExecutionflowETAs = 22;
|
|
*/
|
|
ExecutionflowETAs: ETAbyExecutionflow[] = [];
|
|
|
|
/**
|
|
* @generated from field: api.ETA OrderETA = 23;
|
|
*/
|
|
OrderETA?: ETA;
|
|
|
|
constructor(data?: PartialMessage<OrderPayload>) {
|
|
super();
|
|
proto3.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto3 = proto3;
|
|
static readonly typeName = "api.OrderPayload";
|
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
{ no: 1, name: "CreationDateTime", kind: "message", T: DateTime },
|
|
{ no: 2, name: "ParentOrder", kind: "message", T: ReferencedID },
|
|
{ no: 3, name: "LanguageCodeISO6391", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
{ no: 4, name: "MetaData", kind: "message", T: MetadataElement, repeated: true },
|
|
{ no: 5, name: "Buyer", kind: "message", T: TradeTier },
|
|
{ no: 6, name: "Seller", kind: "message", T: TradeTier },
|
|
{ no: 7, name: "ShipFrom", kind: "message", T: TradeTier },
|
|
{ no: 8, name: "ShipTo", kind: "message", T: TradeTier },
|
|
{ no: 9, name: "Carrier", kind: "message", T: TradeTier },
|
|
{ no: 16, name: "CarrierService", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
{ no: 10, name: "RequestedMilestones", kind: "message", T: OrderRequestedMilestones },
|
|
{ no: 11, name: "Lines", kind: "message", T: OrderLine, repeated: true },
|
|
{ no: 12, name: "EstimatedTimeArrival", kind: "message", T: ETA },
|
|
{ no: 13, name: "ActualCompletionDateTime", kind: "message", T: DateTime },
|
|
{ no: 14, name: "ExecutionflowSummary", kind: "message", T: ExecutionflowSummary, repeated: true },
|
|
{ no: 17, name: "Status", kind: "message", T: OrderStatusStruct },
|
|
{ no: 18, name: "Attachments", kind: "message", T: AttachmentSummary, repeated: true },
|
|
{ no: 19, name: "AttachmentNumber", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
{ no: 20, name: "Claims", kind: "message", T: ClaimSummary, repeated: true },
|
|
{ no: 21, name: "ClaimNumber", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
{ no: 22, name: "ExecutionflowETAs", kind: "message", T: ETAbyExecutionflow, repeated: true },
|
|
{ no: 23, name: "OrderETA", kind: "message", T: ETA },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OrderPayload {
|
|
return new OrderPayload().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OrderPayload {
|
|
return new OrderPayload().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OrderPayload {
|
|
return new OrderPayload().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: OrderPayload | PlainMessage<OrderPayload> | undefined, b: OrderPayload | PlainMessage<OrderPayload> | undefined): boolean {
|
|
return proto3.util.equals(OrderPayload, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Order entity
|
|
*
|
|
* @generated from message api.Order
|
|
*/
|
|
export class Order extends Message<Order> {
|
|
/**
|
|
* @generated from field: api.EventHeader LastEventHeader = 1;
|
|
*/
|
|
LastEventHeader?: EventHeader;
|
|
|
|
/**
|
|
* @generated from field: api.EntityID ID = 2;
|
|
*/
|
|
ID?: EntityID;
|
|
|
|
/**
|
|
* @generated from field: api.OrderPayload Payload = 3;
|
|
*/
|
|
Payload?: OrderPayload;
|
|
|
|
constructor(data?: PartialMessage<Order>) {
|
|
super();
|
|
proto3.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto3 = proto3;
|
|
static readonly typeName = "api.Order";
|
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
{ no: 1, name: "LastEventHeader", kind: "message", T: EventHeader },
|
|
{ no: 2, name: "ID", kind: "message", T: EntityID },
|
|
{ no: 3, name: "Payload", kind: "message", T: OrderPayload },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Order {
|
|
return new Order().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Order {
|
|
return new Order().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Order {
|
|
return new Order().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: Order | PlainMessage<Order> | undefined, b: Order | PlainMessage<Order> | undefined): boolean {
|
|
return proto3.util.equals(Order, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Order Enrichment
|
|
*
|
|
* @generated from message api.OrderEnrichment
|
|
*/
|
|
export class OrderEnrichment extends Message<OrderEnrichment> {
|
|
/**
|
|
* @generated from field: string ParentEventID = 1;
|
|
*/
|
|
ParentEventID = "";
|
|
|
|
/**
|
|
* @generated from field: string EntityName = 2;
|
|
*/
|
|
EntityName = "";
|
|
|
|
/**
|
|
* @generated from field: string EntityRefID = 3;
|
|
*/
|
|
EntityRefID = "";
|
|
|
|
/**
|
|
* @generated from field: string RefFilter = 4;
|
|
*/
|
|
RefFilter = "";
|
|
|
|
/**
|
|
* @generated from field: string MergePath = 5;
|
|
*/
|
|
MergePath = "";
|
|
|
|
/**
|
|
* @generated from oneof api.OrderEnrichment.Content
|
|
*/
|
|
Content: {
|
|
/**
|
|
* @generated from field: api.ItemPayload Item = 10;
|
|
*/
|
|
value: ItemPayload;
|
|
case: "Item";
|
|
} | {
|
|
/**
|
|
* @generated from field: api.ActorPayload Actor = 11;
|
|
*/
|
|
value: ActorPayload;
|
|
case: "Actor";
|
|
} | {
|
|
/**
|
|
* @generated from field: api.PartnerPayload Partner = 12;
|
|
*/
|
|
value: PartnerPayload;
|
|
case: "Partner";
|
|
} | { case: undefined; value?: undefined } = { case: undefined };
|
|
|
|
/**
|
|
* @generated from field: string Project = 6;
|
|
*/
|
|
Project = "";
|
|
|
|
/**
|
|
* @generated from field: string ParentEntityName = 7;
|
|
*/
|
|
ParentEntityName = "";
|
|
|
|
/**
|
|
* @generated from field: string ParentEntityID = 8;
|
|
*/
|
|
ParentEntityID = "";
|
|
|
|
constructor(data?: PartialMessage<OrderEnrichment>) {
|
|
super();
|
|
proto3.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto3 = proto3;
|
|
static readonly typeName = "api.OrderEnrichment";
|
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
{ no: 1, name: "ParentEventID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
{ no: 2, name: "EntityName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
{ no: 3, name: "EntityRefID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
{ no: 4, name: "RefFilter", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
{ no: 5, name: "MergePath", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
{ no: 10, name: "Item", kind: "message", T: ItemPayload, oneof: "Content" },
|
|
{ no: 11, name: "Actor", kind: "message", T: ActorPayload, oneof: "Content" },
|
|
{ no: 12, name: "Partner", kind: "message", T: PartnerPayload, oneof: "Content" },
|
|
{ no: 6, name: "Project", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
{ no: 7, name: "ParentEntityName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
{ no: 8, name: "ParentEntityID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OrderEnrichment {
|
|
return new OrderEnrichment().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OrderEnrichment {
|
|
return new OrderEnrichment().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OrderEnrichment {
|
|
return new OrderEnrichment().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: OrderEnrichment | PlainMessage<OrderEnrichment> | undefined, b: OrderEnrichment | PlainMessage<OrderEnrichment> | undefined): boolean {
|
|
return proto3.util.equals(OrderEnrichment, a, b);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @generated from message api.OrderTriplet
|
|
*/
|
|
export class OrderTriplet extends Message<OrderTriplet> {
|
|
/**
|
|
* @generated from field: api.Order Current = 1;
|
|
*/
|
|
Current?: Order;
|
|
|
|
/**
|
|
* @generated from field: api.Order Previous = 2;
|
|
*/
|
|
Previous?: Order;
|
|
|
|
/**
|
|
* @generated from field: api.Order LastEvent = 3;
|
|
*/
|
|
LastEvent?: Order;
|
|
|
|
constructor(data?: PartialMessage<OrderTriplet>) {
|
|
super();
|
|
proto3.util.initPartial(data, this);
|
|
}
|
|
|
|
static readonly runtime: typeof proto3 = proto3;
|
|
static readonly typeName = "api.OrderTriplet";
|
|
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
{ no: 1, name: "Current", kind: "message", T: Order },
|
|
{ no: 2, name: "Previous", kind: "message", T: Order },
|
|
{ no: 3, name: "LastEvent", kind: "message", T: Order },
|
|
]);
|
|
|
|
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OrderTriplet {
|
|
return new OrderTriplet().fromBinary(bytes, options);
|
|
}
|
|
|
|
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OrderTriplet {
|
|
return new OrderTriplet().fromJson(jsonValue, options);
|
|
}
|
|
|
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OrderTriplet {
|
|
return new OrderTriplet().fromJsonString(jsonString, options);
|
|
}
|
|
|
|
static equals(a: OrderTriplet | PlainMessage<OrderTriplet> | undefined, b: OrderTriplet | PlainMessage<OrderTriplet> | undefined): boolean {
|
|
return proto3.util.equals(OrderTriplet, a, b);
|
|
}
|
|
}
|
|
|