You've already forked npm-core-sdk
Latest generation
This commit is contained in:
92
item.ts
92
item.ts
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.10.0 with parameter use_proto_field_name
|
||||
// @generated by protobuf-ts 2.11.0 with parameter use_proto_field_name
|
||||
// @generated from protobuf file "item.proto" (package "api", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
@@ -26,15 +26,15 @@ import { EventHeader } from "./shared";
|
||||
*/
|
||||
export interface Item {
|
||||
/**
|
||||
* @generated from protobuf field: api.EventHeader LastEventHeader = 1 [json_name = "LastEventHeader"];
|
||||
* @generated from protobuf field: api.EventHeader LastEventHeader = 1
|
||||
*/
|
||||
LastEventHeader?: EventHeader;
|
||||
/**
|
||||
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
|
||||
* @generated from protobuf field: api.EntityID ID = 2
|
||||
*/
|
||||
ID?: EntityID;
|
||||
/**
|
||||
* @generated from protobuf field: api.ItemPayload Payload = 3 [json_name = "Payload"];
|
||||
* @generated from protobuf field: api.ItemPayload Payload = 3
|
||||
*/
|
||||
Payload?: ItemPayload;
|
||||
}
|
||||
@@ -45,41 +45,41 @@ export interface ItemPayload {
|
||||
/**
|
||||
* 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 = 1 [json_name = "MetaData"];
|
||||
* @generated from protobuf field: repeated api.MetadataElement MetaData = 1
|
||||
*/
|
||||
MetaData: MetadataElement[];
|
||||
/**
|
||||
* Item components
|
||||
*
|
||||
* @generated from protobuf field: api.ExpiryConstraint ExpiryConstraint = 6 [json_name = "ExpiryConstraint"];
|
||||
* @generated from protobuf field: api.ExpiryConstraint ExpiryConstraint = 6
|
||||
*/
|
||||
ExpiryConstraint?: ExpiryConstraint;
|
||||
/**
|
||||
* @generated from protobuf field: string PhotoURI = 7 [json_name = "PhotoURI"];
|
||||
* @generated from protobuf field: string PhotoURI = 7
|
||||
*/
|
||||
PhotoURI: string;
|
||||
/**
|
||||
* @generated from protobuf field: repeated api.TradeItemDescriptions DescriptionsByLanguage = 3 [json_name = "DescriptionsByLanguage"];
|
||||
* @generated from protobuf field: repeated api.TradeItemDescriptions DescriptionsByLanguage = 3
|
||||
*/
|
||||
DescriptionsByLanguage: TradeItemDescriptions[]; // @option language
|
||||
/**
|
||||
* @generated from protobuf field: repeated api.LogisticVariant LogisticVariants = 4 [json_name = "LogisticVariants"];
|
||||
* @generated from protobuf field: repeated api.LogisticVariant LogisticVariants = 4
|
||||
*/
|
||||
LogisticVariants: LogisticVariant[];
|
||||
/**
|
||||
* @generated from protobuf field: api.ItemStatusStruct Status = 5 [json_name = "Status"];
|
||||
* @generated from protobuf field: api.ItemStatusStruct Status = 5
|
||||
*/
|
||||
Status?: ItemStatusStruct; // Status field is not accessible from APIs
|
||||
/**
|
||||
* @generated from protobuf field: repeated api.AttachmentSummary Attachments = 8 [json_name = "Attachments"];
|
||||
* @generated from protobuf field: repeated api.AttachmentSummary Attachments = 8
|
||||
*/
|
||||
Attachments: AttachmentSummary[];
|
||||
/**
|
||||
* @generated from protobuf field: int32 AttachmentNumber = 9 [json_name = "AttachmentNumber"];
|
||||
* @generated from protobuf field: int32 AttachmentNumber = 9
|
||||
*/
|
||||
AttachmentNumber: number;
|
||||
/**
|
||||
* @generated from protobuf field: repeated string RemovedLogisticVariantIDs = 10 [json_name = "RemovedLogisticVariantIDs"];
|
||||
* @generated from protobuf field: repeated string RemovedLogisticVariantIDs = 10
|
||||
*/
|
||||
RemovedLogisticVariantIDs: string[];
|
||||
}
|
||||
@@ -88,15 +88,15 @@ export interface ItemPayload {
|
||||
*/
|
||||
export interface ItemTriplet {
|
||||
/**
|
||||
* @generated from protobuf field: api.Item Current = 1 [json_name = "Current"];
|
||||
* @generated from protobuf field: api.Item Current = 1
|
||||
*/
|
||||
Current?: Item;
|
||||
/**
|
||||
* @generated from protobuf field: api.Item Previous = 2 [json_name = "Previous"];
|
||||
* @generated from protobuf field: api.Item Previous = 2
|
||||
*/
|
||||
Previous?: Item;
|
||||
/**
|
||||
* @generated from protobuf field: api.Item LastEvent = 3 [json_name = "LastEvent"];
|
||||
* @generated from protobuf field: api.Item LastEvent = 3
|
||||
*/
|
||||
LastEvent?: Item;
|
||||
}
|
||||
@@ -120,13 +120,13 @@ class Item$Type extends MessageType<Item> {
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.EventHeader LastEventHeader = 1 [json_name = "LastEventHeader"];*/ 1:
|
||||
case /* api.EventHeader LastEventHeader */ 1:
|
||||
message.LastEventHeader = EventHeader.internalBinaryRead(reader, reader.uint32(), options, message.LastEventHeader);
|
||||
break;
|
||||
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
|
||||
case /* api.EntityID ID */ 2:
|
||||
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
|
||||
break;
|
||||
case /* api.ItemPayload Payload = 3 [json_name = "Payload"];*/ 3:
|
||||
case /* api.ItemPayload Payload */ 3:
|
||||
message.Payload = ItemPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
|
||||
break;
|
||||
default:
|
||||
@@ -141,13 +141,13 @@ class Item$Type extends MessageType<Item> {
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: Item, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.EventHeader LastEventHeader = 1 [json_name = "LastEventHeader"]; */
|
||||
/* api.EventHeader LastEventHeader = 1; */
|
||||
if (message.LastEventHeader)
|
||||
EventHeader.internalBinaryWrite(message.LastEventHeader, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.EntityID ID = 2 [json_name = "ID"]; */
|
||||
/* api.EntityID ID = 2; */
|
||||
if (message.ID)
|
||||
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.ItemPayload Payload = 3 [json_name = "Payload"]; */
|
||||
/* api.ItemPayload Payload = 3; */
|
||||
if (message.Payload)
|
||||
ItemPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
@@ -193,31 +193,31 @@ class ItemPayload$Type extends MessageType<ItemPayload> {
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* repeated api.MetadataElement MetaData = 1 [json_name = "MetaData"];*/ 1:
|
||||
case /* repeated api.MetadataElement MetaData */ 1:
|
||||
message.MetaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* api.ExpiryConstraint ExpiryConstraint = 6 [json_name = "ExpiryConstraint"];*/ 6:
|
||||
case /* api.ExpiryConstraint ExpiryConstraint */ 6:
|
||||
message.ExpiryConstraint = ExpiryConstraint.internalBinaryRead(reader, reader.uint32(), options, message.ExpiryConstraint);
|
||||
break;
|
||||
case /* string PhotoURI = 7 [json_name = "PhotoURI"];*/ 7:
|
||||
case /* string PhotoURI */ 7:
|
||||
message.PhotoURI = reader.string();
|
||||
break;
|
||||
case /* repeated api.TradeItemDescriptions DescriptionsByLanguage = 3 [json_name = "DescriptionsByLanguage"];*/ 3:
|
||||
case /* repeated api.TradeItemDescriptions DescriptionsByLanguage */ 3:
|
||||
message.DescriptionsByLanguage.push(TradeItemDescriptions.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* repeated api.LogisticVariant LogisticVariants = 4 [json_name = "LogisticVariants"];*/ 4:
|
||||
case /* repeated api.LogisticVariant LogisticVariants */ 4:
|
||||
message.LogisticVariants.push(LogisticVariant.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* api.ItemStatusStruct Status = 5 [json_name = "Status"];*/ 5:
|
||||
case /* api.ItemStatusStruct Status */ 5:
|
||||
message.Status = ItemStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status);
|
||||
break;
|
||||
case /* repeated api.AttachmentSummary Attachments = 8 [json_name = "Attachments"];*/ 8:
|
||||
case /* repeated api.AttachmentSummary Attachments */ 8:
|
||||
message.Attachments.push(AttachmentSummary.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* int32 AttachmentNumber = 9 [json_name = "AttachmentNumber"];*/ 9:
|
||||
case /* int32 AttachmentNumber */ 9:
|
||||
message.AttachmentNumber = reader.int32();
|
||||
break;
|
||||
case /* repeated string RemovedLogisticVariantIDs = 10 [json_name = "RemovedLogisticVariantIDs"];*/ 10:
|
||||
case /* repeated string RemovedLogisticVariantIDs */ 10:
|
||||
message.RemovedLogisticVariantIDs.push(reader.string());
|
||||
break;
|
||||
default:
|
||||
@@ -232,31 +232,31 @@ class ItemPayload$Type extends MessageType<ItemPayload> {
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: ItemPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* repeated api.MetadataElement MetaData = 1 [json_name = "MetaData"]; */
|
||||
/* repeated api.MetadataElement MetaData = 1; */
|
||||
for (let i = 0; i < message.MetaData.length; i++)
|
||||
MetadataElement.internalBinaryWrite(message.MetaData[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated api.TradeItemDescriptions DescriptionsByLanguage = 3 [json_name = "DescriptionsByLanguage"]; */
|
||||
/* repeated api.TradeItemDescriptions DescriptionsByLanguage = 3; */
|
||||
for (let i = 0; i < message.DescriptionsByLanguage.length; i++)
|
||||
TradeItemDescriptions.internalBinaryWrite(message.DescriptionsByLanguage[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated api.LogisticVariant LogisticVariants = 4 [json_name = "LogisticVariants"]; */
|
||||
/* repeated api.LogisticVariant LogisticVariants = 4; */
|
||||
for (let i = 0; i < message.LogisticVariants.length; i++)
|
||||
LogisticVariant.internalBinaryWrite(message.LogisticVariants[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.ItemStatusStruct Status = 5 [json_name = "Status"]; */
|
||||
/* api.ItemStatusStruct Status = 5; */
|
||||
if (message.Status)
|
||||
ItemStatusStruct.internalBinaryWrite(message.Status, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.ExpiryConstraint ExpiryConstraint = 6 [json_name = "ExpiryConstraint"]; */
|
||||
/* api.ExpiryConstraint ExpiryConstraint = 6; */
|
||||
if (message.ExpiryConstraint)
|
||||
ExpiryConstraint.internalBinaryWrite(message.ExpiryConstraint, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string PhotoURI = 7 [json_name = "PhotoURI"]; */
|
||||
/* string PhotoURI = 7; */
|
||||
if (message.PhotoURI !== "")
|
||||
writer.tag(7, WireType.LengthDelimited).string(message.PhotoURI);
|
||||
/* repeated api.AttachmentSummary Attachments = 8 [json_name = "Attachments"]; */
|
||||
/* repeated api.AttachmentSummary Attachments = 8; */
|
||||
for (let i = 0; i < message.Attachments.length; i++)
|
||||
AttachmentSummary.internalBinaryWrite(message.Attachments[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
||||
/* int32 AttachmentNumber = 9 [json_name = "AttachmentNumber"]; */
|
||||
/* int32 AttachmentNumber = 9; */
|
||||
if (message.AttachmentNumber !== 0)
|
||||
writer.tag(9, WireType.Varint).int32(message.AttachmentNumber);
|
||||
/* repeated string RemovedLogisticVariantIDs = 10 [json_name = "RemovedLogisticVariantIDs"]; */
|
||||
/* repeated string RemovedLogisticVariantIDs = 10; */
|
||||
for (let i = 0; i < message.RemovedLogisticVariantIDs.length; i++)
|
||||
writer.tag(10, WireType.LengthDelimited).string(message.RemovedLogisticVariantIDs[i]);
|
||||
let u = options.writeUnknownFields;
|
||||
@@ -289,13 +289,13 @@ class ItemTriplet$Type extends MessageType<ItemTriplet> {
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.Item Current = 1 [json_name = "Current"];*/ 1:
|
||||
case /* api.Item Current */ 1:
|
||||
message.Current = Item.internalBinaryRead(reader, reader.uint32(), options, message.Current);
|
||||
break;
|
||||
case /* api.Item Previous = 2 [json_name = "Previous"];*/ 2:
|
||||
case /* api.Item Previous */ 2:
|
||||
message.Previous = Item.internalBinaryRead(reader, reader.uint32(), options, message.Previous);
|
||||
break;
|
||||
case /* api.Item LastEvent = 3 [json_name = "LastEvent"];*/ 3:
|
||||
case /* api.Item LastEvent */ 3:
|
||||
message.LastEvent = Item.internalBinaryRead(reader, reader.uint32(), options, message.LastEvent);
|
||||
break;
|
||||
default:
|
||||
@@ -310,13 +310,13 @@ class ItemTriplet$Type extends MessageType<ItemTriplet> {
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: ItemTriplet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.Item Current = 1 [json_name = "Current"]; */
|
||||
/* api.Item Current = 1; */
|
||||
if (message.Current)
|
||||
Item.internalBinaryWrite(message.Current, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.Item Previous = 2 [json_name = "Previous"]; */
|
||||
/* api.Item Previous = 2; */
|
||||
if (message.Previous)
|
||||
Item.internalBinaryWrite(message.Previous, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.Item LastEvent = 3 [json_name = "LastEvent"]; */
|
||||
/* api.Item LastEvent = 3; */
|
||||
if (message.LastEvent)
|
||||
Item.internalBinaryWrite(message.LastEvent, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
|
||||
Reference in New Issue
Block a user