diff --git a/options.ts b/options.ts index 61916da..5633d1b 100644 --- a/options.ts +++ b/options.ts @@ -126,6 +126,28 @@ export interface FieldType { */ Type: string; // Type of the field } +/** + * @generated from protobuf message api.SkipMetadataValidations + */ +export interface SkipMetadataValidations { + /** + * @generated from protobuf field: repeated api.SkipMetadataValidation Skips = 1 + */ + Skips: SkipMetadataValidation[]; +} +/** + * @generated from protobuf message api.SkipMetadataValidation + */ +export interface SkipMetadataValidation { + /** + * @generated from protobuf field: string ParentEntity = 1 + */ + ParentEntity: string; // Entity on which the metadata is applied + /** + * @generated from protobuf field: string Path = 2 + */ + Path: string; // Path in the parent entity payload for which the metadata validation is skipped +} /** * @generated from protobuf enum api.KPIGroupType */ @@ -555,3 +577,105 @@ class FieldType$Type extends MessageType { * @generated MessageType for protobuf message api.FieldType */ export const FieldType = new FieldType$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SkipMetadataValidations$Type extends MessageType { + constructor() { + super("api.SkipMetadataValidations", [ + { no: 1, name: "Skips", kind: "message", localName: "Skips", jsonName: "Skips", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SkipMetadataValidation } + ]); + } + create(value?: PartialMessage): SkipMetadataValidations { + const message = globalThis.Object.create((this.messagePrototype!)); + message.Skips = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SkipMetadataValidations): SkipMetadataValidations { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated api.SkipMetadataValidation Skips */ 1: + message.Skips.push(SkipMetadataValidation.internalBinaryRead(reader, reader.uint32(), options)); + 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: SkipMetadataValidations, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated api.SkipMetadataValidation Skips = 1; */ + for (let i = 0; i < message.Skips.length; i++) + SkipMetadataValidation.internalBinaryWrite(message.Skips[i], writer.tag(1, 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.SkipMetadataValidations + */ +export const SkipMetadataValidations = new SkipMetadataValidations$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SkipMetadataValidation$Type extends MessageType { + constructor() { + super("api.SkipMetadataValidation", [ + { no: 1, name: "ParentEntity", kind: "scalar", localName: "ParentEntity", jsonName: "ParentEntity", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "Path", kind: "scalar", localName: "Path", jsonName: "Path", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): SkipMetadataValidation { + const message = globalThis.Object.create((this.messagePrototype!)); + message.ParentEntity = ""; + message.Path = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SkipMetadataValidation): SkipMetadataValidation { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string ParentEntity */ 1: + message.ParentEntity = reader.string(); + break; + case /* string Path */ 2: + message.Path = 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: SkipMetadataValidation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string ParentEntity = 1; */ + if (message.ParentEntity !== "") + writer.tag(1, WireType.LengthDelimited).string(message.ParentEntity); + /* string Path = 2; */ + if (message.Path !== "") + writer.tag(2, WireType.LengthDelimited).string(message.Path); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.SkipMetadataValidation + */ +export const SkipMetadataValidation = new SkipMetadataValidation$Type(); diff --git a/package.json b/package.json index 0eaa406..c876ec3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@reflex-platform/npm-core-sdk", - "version": "1.15.0-SNAPSHOT-260914091301", + "version": "1.15.0-SNAPSHOT-260914125805", "description": "npm libs from core model proto files", "homepage": "", "main": "index.ts", diff --git a/tradeShared.ts b/tradeShared.ts index ae3c3ca..481eec7 100644 --- a/tradeShared.ts +++ b/tradeShared.ts @@ -1084,7 +1084,7 @@ class TradeTier$Type extends MessageType { constructor() { super("api.TradeTier", [ { no: 2, name: "ActorID", kind: "scalar", localName: "ActorID", jsonName: "ActorID", T: 9 /*ScalarType.STRING*/, options: { "api.entityRef": "Actor", "api.dataRestrictionKey": "Movement,Stock,Executionflow,Handlingunit,Order,Tracking", "api.indexationType": { Types: [{ Context: "*", Type: "generatedText,keyword" }] }, "api.kpiItems": { Items: [{ Context: "Executionflow", Group: "executionflow", Queryable: true }, { Context: "Handlingunit", Group: "handlingunit", Queryable: true }, { Context: "Order", Group: "order", Queryable: true }, { Context: "Tracking", Group: "tracking", Queryable: true }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortKeyword" }] } } }, - { no: 4, name: "Actor", kind: "message", localName: "Actor", jsonName: "Actor", T: () => ActorPayload }, + { no: 4, name: "Actor", kind: "message", localName: "Actor", jsonName: "Actor", T: () => ActorPayload, options: { "api.skipMetadataValidations": { Skips: [{ ParentEntity: "Order", Path: "ShipTo" }] } } }, { no: 5, name: "Contact", kind: "message", localName: "Contact", jsonName: "Contact", T: () => Interlocutor }, { no: 6, name: "PartnerID", kind: "scalar", localName: "PartnerID", jsonName: "PartnerID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Must be an ID of an existing partner" }, "api.entityRef": "Partner", "api.dataRestrictionKey": "Movement,Stock,Executionflow,Handlingunit,Order,Tracking", "api.indexationType": { Types: [{ Context: "*", Type: "generatedText,keyword" }] }, "api.kpiItems": { Items: [{ Context: "Executionflow", Group: "executionflow", Queryable: true }, { Context: "Handlingunit", Group: "handlingunit", Queryable: true }, { Context: "Order", Group: "order", Queryable: true }, { Context: "Tracking", Group: "tracking", Queryable: true }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortKeyword" }] } } }, { no: 7, name: "Partner", kind: "message", localName: "Partner", jsonName: "Partner", T: () => PartnerPayload, options: { "n1validate.rules": { message: { unauthorized: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true } } }