Files
npm-core-sdk/metadata_pb.ts
2025-03-17 09:56:44 +00:00

478 lines
14 KiB
TypeScript

// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file metadata.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 { DateTime, EntityID, EventHeader } from "./shared_pb.js";
/**
* @generated from enum api.MetadataType
*/
export enum MetadataType {
/**
* @generated from enum value: TYPE_UNKNOWN = 0;
*/
TYPE_UNKNOWN = 0,
/**
* @generated from enum value: TYPE_STRING = 1;
*/
TYPE_STRING = 1,
/**
* @generated from enum value: TYPE_INTEGER = 2;
*/
TYPE_INTEGER = 2,
/**
* @generated from enum value: TYPE_BOOLEAN = 3;
*/
TYPE_BOOLEAN = 3,
/**
* @generated from enum value: TYPE_FLOAT = 4;
*/
TYPE_FLOAT = 4,
/**
* @generated from enum value: TYPE_TIMESTAMP = 5;
*/
TYPE_TIMESTAMP = 5,
}
// Retrieve enum metadata with: proto3.getEnumType(MetadataType)
proto3.util.setEnumType(MetadataType, "api.MetadataType", [
{ no: 0, name: "TYPE_UNKNOWN" },
{ no: 1, name: "TYPE_STRING" },
{ no: 2, name: "TYPE_INTEGER" },
{ no: 3, name: "TYPE_BOOLEAN" },
{ no: 4, name: "TYPE_FLOAT" },
{ no: 5, name: "TYPE_TIMESTAMP" },
]);
/**
* @generated from enum api.MetadataDisplayType
*/
export enum MetadataDisplayType {
/**
* @generated from enum value: DISPLAY_UNKNOWN = 0;
*/
DISPLAY_UNKNOWN = 0,
/**
* @generated from enum value: DISPLAY_ALWAYS = 1;
*/
DISPLAY_ALWAYS = 1,
/**
* @generated from enum value: DISPLAY_NEVER = 2;
*/
DISPLAY_NEVER = 2,
}
// Retrieve enum metadata with: proto3.getEnumType(MetadataDisplayType)
proto3.util.setEnumType(MetadataDisplayType, "api.MetadataDisplayType", [
{ no: 0, name: "DISPLAY_UNKNOWN" },
{ no: 1, name: "DISPLAY_ALWAYS" },
{ no: 2, name: "DISPLAY_NEVER" },
]);
/**
*
* All statuses for Metadata entity
*
* @generated from enum api.MetadataStatusCode
*/
export enum MetadataStatusCode {
/**
* @generated from enum value: METADATA_0000_UNKNOWN = 0;
*/
METADATA_0000_UNKNOWN = 0,
/**
* @generated from enum value: METADATA_1000_ACTIVE = 1000;
*/
METADATA_1000_ACTIVE = 1000,
/**
* @generated from enum value: METADATA_9000_CANCELLED = 9000;
*/
METADATA_9000_CANCELLED = 9000,
}
// Retrieve enum metadata with: proto3.getEnumType(MetadataStatusCode)
proto3.util.setEnumType(MetadataStatusCode, "api.MetadataStatusCode", [
{ no: 0, name: "METADATA_0000_UNKNOWN" },
{ no: 1000, name: "METADATA_1000_ACTIVE" },
{ no: 9000, name: "METADATA_9000_CANCELLED" },
]);
/**
*
* Aggregation object message
*
* @generated from message api.Metadata
*/
export class Metadata extends Message<Metadata> {
/**
* @generated from field: api.EventHeader LastEventHeader = 1;
*/
LastEventHeader?: EventHeader;
/**
* @generated from field: api.EntityID ID = 2;
*/
ID?: EntityID;
/**
* @generated from field: api.MetadataPayload Payload = 3;
*/
Payload?: MetadataPayload;
constructor(data?: PartialMessage<Metadata>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "api.Metadata";
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: MetadataPayload },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Metadata {
return new Metadata().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Metadata {
return new Metadata().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Metadata {
return new Metadata().fromJsonString(jsonString, options);
}
static equals(a: Metadata | PlainMessage<Metadata> | undefined, b: Metadata | PlainMessage<Metadata> | undefined): boolean {
return proto3.util.equals(Metadata, a, b);
}
}
/**
* @generated from message api.MetadataPayload
*/
export class MetadataPayload extends Message<MetadataPayload> {
/**
* The segmentation keys are used to complete the segmentation criteria of the project stock. They also apply to order lines and stock movements
*
* @generated from field: bool IsSegmentationKey = 2;
*/
IsSegmentationKey = false;
/**
* @generated from field: string Domain = 3;
*/
Domain = "";
/**
* Entity where the metadata will be created. It can be \"executionflow\", \"handlingunit\", \"item\", \"order\", \"stock\"
*
* @generated from field: string Entity = 4;
*/
Entity = "";
/**
* Where the metadata is located, either \"Payload.Metadata\" or \"Payload.Goods.SegmentationKeys\"
*
* @generated from field: string Parent = 5;
*/
Parent = "";
/**
* @generated from field: string Name = 6;
*/
Name = "";
/**
* Type attached to the metadata, can be anything such as string, bool, enum...
*
* @generated from field: string Type = 7;
*/
Type = "";
/**
* @generated from field: bool IsMandatory = 8;
*/
IsMandatory = false;
/**
* @generated from field: string RegularExpression = 10;
*/
RegularExpression = "";
/**
* @generated from field: api.MetadataType Typology = 11;
*/
Typology = MetadataType.TYPE_UNKNOWN;
/**
* Customizable enumeration
*
* @generated from field: repeated string Enumeration = 12;
*/
Enumeration: string[] = [];
/**
* Status field is not accessible from APIs
*
* @generated from field: api.MetadataStatusStruct Status = 13;
*/
Status?: MetadataStatusStruct;
/**
* @generated from field: api.MetadataDisplayType ShowOnCreation = 14;
*/
ShowOnCreation = MetadataDisplayType.DISPLAY_UNKNOWN;
constructor(data?: PartialMessage<MetadataPayload>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "api.MetadataPayload";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 2, name: "IsSegmentationKey", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 3, name: "Domain", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Entity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "Parent", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 7, name: "Type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 8, name: "IsMandatory", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 10, name: "RegularExpression", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 11, name: "Typology", kind: "enum", T: proto3.getEnumType(MetadataType) },
{ no: 12, name: "Enumeration", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 13, name: "Status", kind: "message", T: MetadataStatusStruct },
{ no: 14, name: "ShowOnCreation", kind: "enum", T: proto3.getEnumType(MetadataDisplayType) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MetadataPayload {
return new MetadataPayload().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MetadataPayload {
return new MetadataPayload().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MetadataPayload {
return new MetadataPayload().fromJsonString(jsonString, options);
}
static equals(a: MetadataPayload | PlainMessage<MetadataPayload> | undefined, b: MetadataPayload | PlainMessage<MetadataPayload> | undefined): boolean {
return proto3.util.equals(MetadataPayload, a, b);
}
}
/**
*
* Metadata entity status structure
*
* @generated from message api.MetadataStatus
*/
export class MetadataStatus extends Message<MetadataStatus> {
/**
* @generated from field: api.MetadataStatusCode StatusCode = 1;
*/
StatusCode = MetadataStatusCode.METADATA_0000_UNKNOWN;
/**
* @generated from field: string Date = 2;
*/
Date = "";
/**
* Status effective date. Set by the event's RefDate that triggered the status change.
*
* @generated from field: api.DateTime ActualDate = 3;
*/
ActualDate?: DateTime;
constructor(data?: PartialMessage<MetadataStatus>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "api.MetadataStatus";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "StatusCode", kind: "enum", T: proto3.getEnumType(MetadataStatusCode) },
{ no: 2, name: "Date", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "ActualDate", kind: "message", T: DateTime },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MetadataStatus {
return new MetadataStatus().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MetadataStatus {
return new MetadataStatus().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MetadataStatus {
return new MetadataStatus().fromJsonString(jsonString, options);
}
static equals(a: MetadataStatus | PlainMessage<MetadataStatus> | undefined, b: MetadataStatus | PlainMessage<MetadataStatus> | undefined): boolean {
return proto3.util.equals(MetadataStatus, a, b);
}
}
/**
*
* MetadataStatusStruct statuses structure
*
* @generated from message api.MetadataStatusStruct
*/
export class MetadataStatusStruct extends Message<MetadataStatusStruct> {
/**
* Current status of the Metadata entity
*
* @generated from field: api.MetadataStatus Current = 1;
*/
Current?: MetadataStatus;
/**
* List of all status history of the Metadata entity
*
* @generated from field: repeated api.MetadataStatus History = 2;
*/
History: MetadataStatus[] = [];
/**
* @generated from field: string CreationDate = 3;
*/
CreationDate = "";
constructor(data?: PartialMessage<MetadataStatusStruct>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "api.MetadataStatusStruct";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Current", kind: "message", T: MetadataStatus },
{ no: 2, name: "History", kind: "message", T: MetadataStatus, repeated: true },
{ no: 3, name: "CreationDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MetadataStatusStruct {
return new MetadataStatusStruct().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MetadataStatusStruct {
return new MetadataStatusStruct().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MetadataStatusStruct {
return new MetadataStatusStruct().fromJsonString(jsonString, options);
}
static equals(a: MetadataStatusStruct | PlainMessage<MetadataStatusStruct> | undefined, b: MetadataStatusStruct | PlainMessage<MetadataStatusStruct> | undefined): boolean {
return proto3.util.equals(MetadataStatusStruct, a, b);
}
}
/**
* @generated from message api.MetadataTriplet
*/
export class MetadataTriplet extends Message<MetadataTriplet> {
/**
* @generated from field: api.Metadata Current = 1;
*/
Current?: Metadata;
/**
* @generated from field: api.Metadata Previous = 2;
*/
Previous?: Metadata;
/**
* @generated from field: api.Metadata LastEvent = 3;
*/
LastEvent?: Metadata;
constructor(data?: PartialMessage<MetadataTriplet>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "api.MetadataTriplet";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Current", kind: "message", T: Metadata },
{ no: 2, name: "Previous", kind: "message", T: Metadata },
{ no: 3, name: "LastEvent", kind: "message", T: Metadata },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MetadataTriplet {
return new MetadataTriplet().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MetadataTriplet {
return new MetadataTriplet().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MetadataTriplet {
return new MetadataTriplet().fromJsonString(jsonString, options);
}
static equals(a: MetadataTriplet | PlainMessage<MetadataTriplet> | undefined, b: MetadataTriplet | PlainMessage<MetadataTriplet> | undefined): boolean {
return proto3.util.equals(MetadataTriplet, a, b);
}
}
/**
* @generated from message api.MetadatasToApply
*/
export class MetadatasToApply extends Message<MetadatasToApply> {
/**
* @generated from field: string Parent = 1;
*/
Parent = "";
/**
* @generated from field: api.Metadata Metadata = 2;
*/
Metadata?: Metadata;
constructor(data?: PartialMessage<MetadatasToApply>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "api.MetadatasToApply";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Parent", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Metadata", kind: "message", T: Metadata },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MetadatasToApply {
return new MetadatasToApply().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MetadatasToApply {
return new MetadatasToApply().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MetadatasToApply {
return new MetadatasToApply().fromJsonString(jsonString, options);
}
static equals(a: MetadatasToApply | PlainMessage<MetadatasToApply> | undefined, b: MetadatasToApply | PlainMessage<MetadatasToApply> | undefined): boolean {
return proto3.util.equals(MetadatasToApply, a, b);
}
}