You've already forked npm-core-sdk
3735 lines
189 KiB
TypeScript
3735 lines
189 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "ruleEngine_model.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 { MovementStatusCode } from "./warehousingShared";
|
|
import { StockStatusCode } from "./warehousingShared";
|
|
import { PartnerStatusCode } from "./repositoryShared";
|
|
import { ExecutionflowStatusCode } from "./tradeShared";
|
|
import { ItemStatusCode } from "./repositoryShared";
|
|
import { ActorStatusCode } from "./repositoryShared";
|
|
import { ClaimStatus } from "./shared";
|
|
import { AppointmentStatusCode } from "./shared";
|
|
import { HandlingunitStatusCode } from "./warehousingShared";
|
|
import { OrderStatusCode } from "./tradeShared";
|
|
import { WeekDay } from "./shared";
|
|
import { EntityType } from "./shared";
|
|
// ─── Rule ────────────────────────────────────────────────────────────────────
|
|
|
|
/**
|
|
* A rule ties together a target entity, a trigger, and a set of conditions.
|
|
* Actions are executed when all conditions are met; ElseActions are executed
|
|
* instead when at least one condition is not met (may be empty).
|
|
*
|
|
* @generated from protobuf message api.EngineRule
|
|
*/
|
|
export interface EngineRule {
|
|
/**
|
|
* @generated from protobuf field: string ProjectID = 10
|
|
*/
|
|
ProjectID: string;
|
|
/**
|
|
* @generated from protobuf field: string Code = 20
|
|
*/
|
|
Code: string; // Unique code for the rule, e.g. "ApplyFreeShipping".
|
|
/**
|
|
* @generated from protobuf field: string Label = 30
|
|
*/
|
|
Label: string; // Human-readable label of the rule's purpose.
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleValidityType ValidityType = 40
|
|
*/
|
|
ValidityType: EngineRuleValidityType; // Whether the rule is always valid or only valid between a start and end date.
|
|
/**
|
|
* @generated from protobuf field: string ValidFrom = 41
|
|
*/
|
|
ValidFrom: string; // Only meaningful when ValidityType = DATE_RANGE; ignored otherwise.
|
|
/**
|
|
* @generated from protobuf field: string ValidUntil = 42
|
|
*/
|
|
ValidUntil: string; // Only meaningful when ValidityType = DATE_RANGE; ignored otherwise.
|
|
/**
|
|
* @generated from protobuf field: api.EntityType Entity = 50
|
|
*/
|
|
Entity: EntityType; // Entity type this rule applies to (Order, HandlingUnit, etc.).
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleTriggerType TriggerType = 60
|
|
*/
|
|
TriggerType: EngineRuleTriggerType; // Type of trigger that will cause the rule to be evaluated.
|
|
/**
|
|
* What causes the rule to be evaluated.
|
|
*
|
|
* @generated from protobuf oneof: Trigger
|
|
*/
|
|
Trigger: {
|
|
oneofKind: "ScheduledTrigger";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleScheduledTrigger ScheduledTrigger = 70
|
|
*/
|
|
ScheduledTrigger: EngineRuleScheduledTrigger; // Triggered on a schedule defined by a partial RRule model.
|
|
} | {
|
|
oneofKind: "EventTrigger";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleEventTrigger EventTrigger = 71
|
|
*/
|
|
EventTrigger: EngineRuleEventTrigger; // Triggered when the entity is created, deleted, or changes status.
|
|
} | {
|
|
oneofKind: "MilestoneTrigger";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleMilestoneTrigger MilestoneTrigger = 72
|
|
*/
|
|
MilestoneTrigger: EngineRuleMilestoneTrigger; // Triggered when a logistics milestone is reached.
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
/**
|
|
* @generated from protobuf field: repeated api.EngineRuleCondition Conditions = 80
|
|
*/
|
|
Conditions: EngineRuleCondition[]; // All conditions evaluated with AND semantics; no conditions = unconditional trigger.
|
|
/**
|
|
* @generated from protobuf field: repeated api.EngineRuleAction Actions = 90
|
|
*/
|
|
Actions: EngineRuleAction[]; // Actions to execute when the rule is triggered and all conditions are met.
|
|
/**
|
|
* @generated from protobuf field: repeated api.EngineRuleAction ElseActions = 91
|
|
*/
|
|
ElseActions: EngineRuleAction[]; // Actions to execute when the rule is triggered but at least one condition is not met (Else branch); may be empty.
|
|
/**
|
|
* @generated from protobuf field: int32 Version = 100
|
|
*/
|
|
Version: number; // incremented on each update.
|
|
/**
|
|
* @generated from protobuf field: string CreatedBy = 110
|
|
*/
|
|
CreatedBy: string;
|
|
/**
|
|
* @generated from protobuf field: string CreatedAt = 120
|
|
*/
|
|
CreatedAt: string;
|
|
/**
|
|
* @generated from protobuf field: string UpdatedAt = 130
|
|
*/
|
|
UpdatedAt: string;
|
|
/**
|
|
* @generated from protobuf field: bool IsActive = 140
|
|
*/
|
|
IsActive: boolean; // Whether the rule is currently active, independent of its ValidityType and ValidFrom/ValidUntil dates.
|
|
}
|
|
// ─── Trigger ──────────────────────────────────────────────────────────────────
|
|
// What causes the rule to be evaluated : a schedule, a status change, or a milestone.
|
|
|
|
/**
|
|
* Triggered based on a partial RRule model. (recurrence rules commonly used for calendar events)
|
|
*
|
|
* @generated from protobuf message api.EngineRuleScheduledTrigger
|
|
*/
|
|
export interface EngineRuleScheduledTrigger {
|
|
/**
|
|
* @generated from protobuf field: api.RuleRecurrenceFrequency Frequency = 1
|
|
*/
|
|
Frequency: RuleRecurrenceFrequency;
|
|
/**
|
|
* @generated from protobuf field: int32 Interval = 2
|
|
*/
|
|
Interval: number; // e.g. Frequency = MINUTELY, Interval = 10 -> every 10 minutes; defaults to 1 at application layer.
|
|
/**
|
|
* @generated from protobuf field: repeated api.WeekDay ByDay = 3
|
|
*/
|
|
ByDay: WeekDay[]; // Only meaningful when Frequency = WEEKLY; ignored otherwise.
|
|
/**
|
|
* @generated from protobuf field: string StartDate = 4
|
|
*/
|
|
StartDate: string;
|
|
/**
|
|
* Time of day the rule fires, e.g. "23:59:00"; only meaningful when Frequency = DAILY/WEEKLY/MONTHLY/YEARLY. Not meaningful when Frequency
|
|
* = MINUTELY (the rule fires repeatedly all day); structurally required by this schema but ignored by the application layer in that case.
|
|
*
|
|
* @generated from protobuf field: string AtTime = 5
|
|
*/
|
|
AtTime: string;
|
|
}
|
|
/**
|
|
* Triggered when an entity reaches a specific status.
|
|
* The status code type is determined by the EngineRule.Entity field.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleEventTrigger
|
|
*/
|
|
export interface EngineRuleEventTrigger {
|
|
/**
|
|
* @generated from protobuf oneof: Event
|
|
*/
|
|
Event: {
|
|
oneofKind: "Creation";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleEventTriggerCreation Creation = 1
|
|
*/
|
|
Creation: EngineRuleEventTriggerCreation; // Triggered when the entity is created.
|
|
} | {
|
|
oneofKind: "Deletion";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleEventTriggerDeletion Deletion = 2
|
|
*/
|
|
Deletion: EngineRuleEventTriggerDeletion; // Triggered when the entity is deleted.
|
|
} | {
|
|
oneofKind: "StatusChange";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleEventTriggerStatusChange StatusChange = 3
|
|
*/
|
|
StatusChange: EngineRuleEventTriggerStatusChange; // Triggered when the entity changes status.
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.EngineRuleEventTriggerCreation
|
|
*/
|
|
export interface EngineRuleEventTriggerCreation {
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.EngineRuleEventTriggerDeletion
|
|
*/
|
|
export interface EngineRuleEventTriggerDeletion {
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.EngineRuleEventTriggerStatusChange
|
|
*/
|
|
export interface EngineRuleEventTriggerStatusChange {
|
|
/**
|
|
* The status code has to match the entity type of the rule (e.g. OrderStatusCode for an Order rule, HandlingunitStatusCode for a HandlingUnit rule, etc.)
|
|
*
|
|
* @generated from protobuf oneof: StatusCode
|
|
*/
|
|
StatusCode: {
|
|
oneofKind: "OrderStatus";
|
|
/**
|
|
* @generated from protobuf field: api.OrderStatusCode OrderStatus = 1
|
|
*/
|
|
OrderStatus: OrderStatusCode;
|
|
} | {
|
|
oneofKind: "HandlingunitStatus";
|
|
/**
|
|
* @generated from protobuf field: api.HandlingunitStatusCode HandlingunitStatus = 2
|
|
*/
|
|
HandlingunitStatus: HandlingunitStatusCode;
|
|
} | {
|
|
oneofKind: "AppointmentStatus";
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentStatusCode AppointmentStatus = 3
|
|
*/
|
|
AppointmentStatus: AppointmentStatusCode;
|
|
} | {
|
|
oneofKind: "ClaimStatus";
|
|
/**
|
|
* @generated from protobuf field: api.ClaimStatus ClaimStatus = 4
|
|
*/
|
|
ClaimStatus: ClaimStatus;
|
|
} | {
|
|
oneofKind: "ActorStatus";
|
|
/**
|
|
* @generated from protobuf field: api.ActorStatusCode ActorStatus = 5
|
|
*/
|
|
ActorStatus: ActorStatusCode;
|
|
} | {
|
|
oneofKind: "ItemStatus";
|
|
/**
|
|
* @generated from protobuf field: api.ItemStatusCode ItemStatus = 6
|
|
*/
|
|
ItemStatus: ItemStatusCode;
|
|
} | {
|
|
oneofKind: "ExecutionflowStatus";
|
|
/**
|
|
* @generated from protobuf field: api.ExecutionflowStatusCode ExecutionflowStatus = 7
|
|
*/
|
|
ExecutionflowStatus: ExecutionflowStatusCode;
|
|
} | {
|
|
oneofKind: "PartnerStatus";
|
|
/**
|
|
* @generated from protobuf field: api.PartnerStatusCode PartnerStatus = 8
|
|
*/
|
|
PartnerStatus: PartnerStatusCode;
|
|
} | {
|
|
oneofKind: "StockStatus";
|
|
/**
|
|
* @generated from protobuf field: api.StockStatusCode StockStatus = 9
|
|
*/
|
|
StockStatus: StockStatusCode;
|
|
} | {
|
|
oneofKind: "MovementStatus";
|
|
/**
|
|
* @generated from protobuf field: api.MovementStatusCode MovementStatus = 10
|
|
*/
|
|
MovementStatus: MovementStatusCode;
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
}
|
|
/**
|
|
* Triggered when a logistics milestone is reached.
|
|
* Milestones are fields which are either part of the fixed model or user-defined Metadata
|
|
* known at the model level -- unlike EngineRuleEventTriggerStatusChange's
|
|
* StatusCode, which is a closed set of enums. MilestoneField therefore
|
|
* references the metadata by its field path, the same way EngineRuleCondition
|
|
* references fields, e.g. "Order.RequestedMilestones.ContractualLogisticsDate".
|
|
*
|
|
* @generated from protobuf message api.EngineRuleMilestoneTrigger
|
|
*/
|
|
export interface EngineRuleMilestoneTrigger {
|
|
/**
|
|
* @generated from protobuf field: string MilestoneField = 1
|
|
*/
|
|
MilestoneField: string; // path to the Milestone field, e.g. "Order.RequestedMilestones.ContractualLogisticsDate" or "Order.MetaData.PickupRequested".
|
|
}
|
|
// ─── Conditions ───────────────────────────────────────────────────────────────
|
|
|
|
/**
|
|
* A single predicate: Criteria <Operator> Value.
|
|
* All conditions on a rule are evaluated with AND semantics.
|
|
* No conditions means the rule will trigger unconditionally when the trigger
|
|
* event occurs.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleCondition
|
|
*/
|
|
export interface EngineRuleCondition {
|
|
/**
|
|
* The left-hand side of a condition: a direct field, a collection with a quantifier, or an aggregate over the whole entity population.
|
|
*
|
|
* @generated from protobuf oneof: Criteria
|
|
*/
|
|
Criteria: {
|
|
oneofKind: "Field";
|
|
/**
|
|
* e.g. "Order.TotalAmount". When Trigger = ScheduledTrigger, acts as a filter over the whole population (evaluated per-instance, ANDed with sibling conditions) instead of
|
|
* a predicate on a single "current" instance.
|
|
*
|
|
* @generated from protobuf field: string Field = 10
|
|
*/
|
|
Field: string;
|
|
} | {
|
|
oneofKind: "Collection";
|
|
/**
|
|
* Quantifier (ALL/ANY/NONE) over a collection nested INSIDE one entity instance,
|
|
* e.g. "Order.Lines". Same population-filter semantics as Field above when Trigger = ScheduledTrigger.
|
|
*
|
|
* @generated from protobuf field: api.EngineRuleConditionCollectionCriteria Collection = 11
|
|
*/
|
|
Collection: EngineRuleConditionCollectionCriteria;
|
|
} | {
|
|
oneofKind: "Aggregate";
|
|
/**
|
|
* Aggregate function (SUM/COUNT/...) computed over the whole population, filtered by the sibling Field/Collection conditions of the same
|
|
* rule if any -- only valid when Trigger = ScheduledTrigger.
|
|
*
|
|
* @generated from protobuf field: api.EngineRuleConditionAggregateCriteria Aggregate = 12
|
|
*/
|
|
Aggregate: EngineRuleConditionAggregateCriteria;
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleConditionOperator Operator = 20
|
|
*/
|
|
Operator: EngineRuleConditionOperator;
|
|
/**
|
|
* The right-hand side of a condition: a literal, a field reference, a computed value, or a mapping lookup.
|
|
*
|
|
* @generated from protobuf oneof: Value
|
|
*/
|
|
Value: {
|
|
oneofKind: "LiteralValue";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleLiteral LiteralValue = 31
|
|
*/
|
|
LiteralValue: EngineRuleLiteral;
|
|
} | {
|
|
oneofKind: "LiteralListValue";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleLiteralList LiteralListValue = 32
|
|
*/
|
|
LiteralListValue: EngineRuleLiteralList; // For IN operator.
|
|
} | {
|
|
oneofKind: "FieldRefValue";
|
|
/**
|
|
* FieldRefValue, ComputedValue and MappingValue below all resolve
|
|
* against a single "current" entity instance (a field path, a
|
|
* Computation.Entity, or the entity passed to a MappingTable at
|
|
* runtime, respectively). They are therefore only meaningful when
|
|
* Criteria != Aggregate (i.e. NOT for a ScheduledTrigger's HAVING-like
|
|
* condition, which has no single current instance to resolve them
|
|
* against) -- only LiteralValue/LiteralListValue make sense there.
|
|
*
|
|
* @generated from protobuf field: api.EngineRuleFieldRef FieldRefValue = 33
|
|
*/
|
|
FieldRefValue: EngineRuleFieldRef;
|
|
} | {
|
|
oneofKind: "ComputedValue";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleComputedRef ComputedValue = 34
|
|
*/
|
|
ComputedValue: EngineRuleComputedRef;
|
|
} | {
|
|
oneofKind: "MappingValue";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleMappingRef MappingValue = 35
|
|
*/
|
|
MappingValue: EngineRuleMappingRef; // Reference to a reusable lookup table, e.g. compare Order.TotalAmount against a threshold that depends on Order.Priority.
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
}
|
|
/**
|
|
* Applies a quantifier over a collection field.
|
|
* e.g. ALL Order.Lines where Quantity == 0
|
|
*
|
|
* @generated from protobuf message api.EngineRuleConditionCollectionCriteria
|
|
*/
|
|
export interface EngineRuleConditionCollectionCriteria {
|
|
/**
|
|
* @generated from protobuf field: string CollectionPath = 1
|
|
*/
|
|
CollectionPath: string; // path to the collection, e.g. "Order.Lines".
|
|
/**
|
|
* @generated from protobuf field: string ElementField = 2
|
|
*/
|
|
ElementField: string; // field on each element, e.g. "Quantity".
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleConditionQuantifier Quantifier = 3
|
|
*/
|
|
Quantifier: EngineRuleConditionQuantifier;
|
|
}
|
|
/**
|
|
* Applies an aggregate function over ALL instances of the rule's Entity (not a
|
|
* collection nested in a single instance, see
|
|
* EngineRuleConditionCollectionCriteria for that case). Only valid when
|
|
* EngineRule.Trigger = ScheduledTrigger (a ScheduledTrigger rule is always
|
|
* evaluated "set-based", see Trigger comment).
|
|
*
|
|
* The subset to aggregate over is NOT declared here: it is defined by the
|
|
* OTHER conditions in the same EngineRule.Conditions list. In a ScheduledTrigger
|
|
* rule, any Field/Collection condition acts as a filter over the whole
|
|
* population (a "WHERE"), evaluated per-instance and ANDed together like any
|
|
* other condition; the Aggregate condition(s) are then computed over that
|
|
* common filtered subset (a "HAVING"). All Aggregate conditions in the same
|
|
* rule share that same filtered subset.
|
|
*
|
|
* Example: on Stock, every 10 minutes, IF Périmé == true (plain Field
|
|
* condition, acts as filter) AND SUM(Valeur) >= 1500 (Aggregate condition:
|
|
* Field = "Valeur", AggregateFunction = SUM, compared via
|
|
* EngineRuleCondition.Operator/Value) THEN CreateAlert. That's TWO top-level
|
|
* EngineRuleCondition entries in EngineRule.Conditions, ANDed together.
|
|
*
|
|
* The Value compared against an Aggregate condition should be a
|
|
* LiteralValue/LiteralListValue (see EngineRuleCondition.Value comment) --
|
|
* FieldRefValue/ComputedValue/MappingValue don't make sense here since they
|
|
* resolve against a single current entity instance, which doesn't exist in
|
|
* this mode.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleConditionAggregateCriteria
|
|
*/
|
|
export interface EngineRuleConditionAggregateCriteria {
|
|
/**
|
|
* Field to aggregate over the population (filtered by the rule's other conditions, if any), e.g. "Amount". Required for SUM/AVG/MIN/MAX; ignored (and may be left empty) for
|
|
* COUNT, which just counts matching instances.
|
|
*
|
|
* @generated from protobuf field: string Field = 1
|
|
*/
|
|
Field: string;
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleConditionAggregateFunction AggregateFunction = 2
|
|
*/
|
|
AggregateFunction: EngineRuleConditionAggregateFunction;
|
|
}
|
|
// ─── Shared Value Types ───────────────────────────────────────────────────────
|
|
// Reused by both conditions (EngineRuleCondition) and actions (EngineRuleActionAttributeValue).
|
|
|
|
/**
|
|
* A hardcoded typed value.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleLiteral
|
|
*/
|
|
export interface EngineRuleLiteral {
|
|
/**
|
|
* @generated from protobuf oneof: Literal
|
|
*/
|
|
Literal: {
|
|
oneofKind: "Integer";
|
|
/**
|
|
* @generated from protobuf field: int64 Integer = 1
|
|
*/
|
|
Integer: bigint;
|
|
} | {
|
|
oneofKind: "Decimal";
|
|
/**
|
|
* @generated from protobuf field: float Decimal = 2
|
|
*/
|
|
Decimal: number;
|
|
} | {
|
|
oneofKind: "String";
|
|
/**
|
|
* @generated from protobuf field: string String = 3
|
|
*/
|
|
String: string;
|
|
} | {
|
|
oneofKind: "Boolean";
|
|
/**
|
|
* @generated from protobuf field: bool Boolean = 4
|
|
*/
|
|
Boolean: boolean;
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
}
|
|
/**
|
|
* A list of hardcoded typed values, used for IN operator conditions.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleLiteralList
|
|
*/
|
|
export interface EngineRuleLiteralList {
|
|
/**
|
|
* @generated from protobuf field: repeated api.EngineRuleLiteral Items = 1
|
|
*/
|
|
Items: EngineRuleLiteral[]; // Must contain at least one value.
|
|
}
|
|
/**
|
|
* A reference to another field, either from the root entity or relative to the
|
|
* current collection element.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleFieldRef
|
|
*/
|
|
export interface EngineRuleFieldRef {
|
|
/**
|
|
* @generated from protobuf field: string Path = 1
|
|
*/
|
|
Path: string; // e.g. "PreparedQuantity" or "Order.TotalAmount".
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleFieldRefScope Scope = 2
|
|
*/
|
|
Scope: EngineRuleFieldRefScope; // Whether the path is absolute (from the root entity) or relative to the current collection element (if any).
|
|
}
|
|
/**
|
|
* A value computed by a runtime function ; definition intentionally deferred.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleComputedRef
|
|
*/
|
|
export interface EngineRuleComputedRef {
|
|
/**
|
|
* @generated from protobuf field: string ComputationID = 1
|
|
*/
|
|
ComputationID: string; // Reference to a predefined computation strategy, e.g. "ComputeDaysSinceOrderCreated".
|
|
}
|
|
/**
|
|
* Reference to an externally managed lookup table, shared across rules.
|
|
* The entity in context is passed to the table at runtime; the table's InputFields define which fields are extracted.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleMappingRef
|
|
*/
|
|
export interface EngineRuleMappingRef {
|
|
/**
|
|
* @generated from protobuf field: string MappingID = 1
|
|
*/
|
|
MappingID: string; // Unique code identifying the lookup table.
|
|
}
|
|
// ─── Actions ──────────────────────────────────────────────────────────────────
|
|
|
|
/**
|
|
* An action to execute when a rule is triggered and all conditions are met.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleAction
|
|
*/
|
|
export interface EngineRuleAction {
|
|
/**
|
|
* @generated from protobuf oneof: Action
|
|
*/
|
|
Action: {
|
|
oneofKind: "CreateClaim";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleActionCreateClaim CreateClaim = 1
|
|
*/
|
|
CreateClaim: EngineRuleActionCreateClaim; // Requires a single target entity instance -- invalid for a set-based rule.
|
|
} | {
|
|
oneofKind: "UpdateMetadata";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleActionUpdateMetadata UpdateMetadata = 2
|
|
*/
|
|
UpdateMetadata: EngineRuleActionUpdateMetadata; // Requires a single target entity instance -- invalid for a set-based rule.
|
|
} | {
|
|
oneofKind: "CreateAlert";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleActionCreateAlert CreateAlert = 3
|
|
*/
|
|
CreateAlert: EngineRuleActionCreateAlert; // Global alert, not tied to any single entity instance -- the ONLY valid action for a set-based rule; also usable for a regular per-instance rule.
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
}
|
|
/**
|
|
* Creates a claim of the specified type on the target entity.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleActionCreateClaim
|
|
*/
|
|
export interface EngineRuleActionCreateClaim {
|
|
/**
|
|
* @generated from protobuf field: string ClaimTypeID = 1
|
|
*/
|
|
ClaimTypeID: string;
|
|
}
|
|
/**
|
|
* Updates a single field on the target entity.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleActionUpdateMetadata
|
|
*/
|
|
export interface EngineRuleActionUpdateMetadata {
|
|
/**
|
|
* @generated from protobuf field: string Field = 1
|
|
*/
|
|
Field: string; // Path to the field to update, e.g. "Status" or "Lines.PreparedQuantity".
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleActionAttributeValue Value = 2
|
|
*/
|
|
Value?: EngineRuleActionAttributeValue;
|
|
}
|
|
/**
|
|
* Creates an alert, independent of any single target entity instance.
|
|
* Definition intentionally minimal for now (label only); severity, recipients,
|
|
* or templating may be added later.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleActionCreateAlert
|
|
*/
|
|
export interface EngineRuleActionCreateAlert {
|
|
/**
|
|
* @generated from protobuf field: string Label = 1
|
|
*/
|
|
Label: string; // Human-readable alert message, e.g. "Stock périmé : valeur cumulée supérieure à 1500€".
|
|
}
|
|
/**
|
|
* The value to assign : either a literal, a computed function, or a mapping table.
|
|
*
|
|
* @generated from protobuf message api.EngineRuleActionAttributeValue
|
|
*/
|
|
export interface EngineRuleActionAttributeValue {
|
|
/**
|
|
* @generated from protobuf oneof: Value
|
|
*/
|
|
Value: {
|
|
oneofKind: "LiteralValue";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleLiteral LiteralValue = 1
|
|
*/
|
|
LiteralValue: EngineRuleLiteral; // Hardcoded typed value.
|
|
} | {
|
|
oneofKind: "ComputedValue";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleComputedRef ComputedValue = 2
|
|
*/
|
|
ComputedValue: EngineRuleComputedRef; // Runtime function (deferred).
|
|
} | {
|
|
oneofKind: "MappingValue";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleMappingRef MappingValue = 3
|
|
*/
|
|
MappingValue: EngineRuleMappingRef; // Reference to a reusable lookup table.
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
}
|
|
// ─── Compute ─────────────────────────────────────────────────────────────────
|
|
// Computations define reusable value-resolution strategies used in rule actions.
|
|
// They are referenced via EngineRuleComputedRef once that definition is finalized.
|
|
|
|
/**
|
|
* @generated from protobuf message api.Computation
|
|
*/
|
|
export interface Computation {
|
|
/**
|
|
* @generated from protobuf field: string ProjectID = 10
|
|
*/
|
|
ProjectID: string;
|
|
/**
|
|
* @generated from protobuf field: string ID = 20
|
|
*/
|
|
ID: string;
|
|
/**
|
|
* @generated from protobuf field: string Label = 30
|
|
*/
|
|
Label: string; // Human-readable label for the computation, e.g. "Compute Discount".
|
|
/**
|
|
* @generated from protobuf field: api.EntityType Entity = 40
|
|
*/
|
|
Entity: EntityType; // Entity type this computation applies to (Order, HandlingUnit, etc.).
|
|
/**
|
|
* The computation strategy to apply.
|
|
*
|
|
* @generated from protobuf oneof: Type
|
|
*/
|
|
Type: {
|
|
oneofKind: "DateDuration";
|
|
/**
|
|
* @generated from protobuf field: api.ComputationDateDuration DateDuration = 50
|
|
*/
|
|
DateDuration: ComputationDateDuration; // computes the duration between two date fields.
|
|
} | {
|
|
oneofKind: "DueDate";
|
|
/**
|
|
* @generated from protobuf field: api.ComputationDueDate DueDate = 51
|
|
*/
|
|
DueDate: ComputationDueDate; // computes a due date from a reference date and a duration.
|
|
} | {
|
|
oneofKind: "StatusDuration";
|
|
/**
|
|
* @generated from protobuf field: api.ComputationStatusDuration StatusDuration = 52
|
|
*/
|
|
StatusDuration: ComputationStatusDuration; // computes the cumulated duration spent in a set of statuses.
|
|
} | {
|
|
oneofKind: "CustomFunction";
|
|
/**
|
|
* @generated from protobuf field: api.ComputationCustomFunction CustomFunction = 53
|
|
*/
|
|
CustomFunction: ComputationCustomFunction; // applies an arithmetic operator between two fields.
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
}
|
|
/**
|
|
* Computes the duration between two date fields on the entity.
|
|
* Example: on Order, compute how many working days elapsed between creation
|
|
* and shipment:
|
|
* - StartDateField = "Order.CreatedAt"
|
|
* - EndDateField = "Order.ShippedAt"
|
|
* - DurationFormat = {Format: WORKING_DAYS, CalendarID:"FR_STANDARD", Rounding: UP}
|
|
* The result (a WORKING_DAYS duration) can then be referenced elsewhere
|
|
* via EngineRuleComputedRef pointing to this Computation's ID.
|
|
*
|
|
* @generated from protobuf message api.ComputationDateDuration
|
|
*/
|
|
export interface ComputationDateDuration {
|
|
/**
|
|
* @generated from protobuf field: string StartDateField = 1
|
|
*/
|
|
StartDateField: string; // e.g. "Order.CreatedAt".
|
|
/**
|
|
* @generated from protobuf field: string EndDateField = 2
|
|
*/
|
|
EndDateField: string; // e.g. "Order.ShippedAt".
|
|
/**
|
|
* @generated from protobuf field: api.ComputationDurationFormat DurationFormat = 3
|
|
*/
|
|
DurationFormat?: ComputationDurationFormat; // How to express the resulting duration.
|
|
}
|
|
/**
|
|
* Computes a due date by adding or subtracting a duration (fixed or looked up) to a reference date field.
|
|
* Example: on Order, compute a contractual delivery due date as "3 working days after order creation":
|
|
* - ReferenceDateField = "Order.CreatedAt"
|
|
* - ComputationType = ADD
|
|
* - Value = {Duration: 3}
|
|
* - DurationFormat = {Format: WORKING_DAYS, CalendarID: "FR_STANDARD", Rounding: UP}
|
|
* Example with a mapping-driven duration instead of a fixed one: "due date =
|
|
* order creation + N days, where N depends on Order.Priority"
|
|
* - ReferenceDateField = "Order.CreatedAt"
|
|
* - ComputationType = ADD
|
|
* - Value = {MappingValue: {MappingID: "DeliveryLeadTimeByPriority"}} (the mapping table's Entries resolve Order.Priority -> a number of days)
|
|
* - DurationFormat = {Format: DAYS, Rounding: UP}.
|
|
*
|
|
* @generated from protobuf message api.ComputationDueDate
|
|
*/
|
|
export interface ComputationDueDate {
|
|
/**
|
|
* @generated from protobuf field: string ReferenceDateField = 10
|
|
*/
|
|
ReferenceDateField: string; // e.g. "Order.CreatedAt".
|
|
/**
|
|
* @generated from protobuf field: api.ComputationDueDateComputationType ComputationType = 20
|
|
*/
|
|
ComputationType: ComputationDueDateComputationType; // Whether to add or subtract the duration.
|
|
/**
|
|
* The duration to apply: either a fixed date offset or a mapping-driven value.
|
|
*
|
|
* @generated from protobuf oneof: Value
|
|
*/
|
|
Value: {
|
|
oneofKind: "Duration";
|
|
/**
|
|
* @generated from protobuf field: uint32 Duration = 31
|
|
*/
|
|
Duration: number; // Duration which format is defined by DurationFormat, e.g. "3" with DurationFormat = DAYS means a 3-day duration.
|
|
} | {
|
|
oneofKind: "MappingValue";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleMappingRef MappingValue = 32
|
|
*/
|
|
MappingValue: EngineRuleMappingRef; // Lookup table resolving a duration from the entity's fields, e.g. Order.Priority → days.
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
/**
|
|
* @generated from protobuf field: api.ComputationDurationFormat DurationFormat = 40
|
|
*/
|
|
DurationFormat?: ComputationDurationFormat; // How to express and round the resulting duration.
|
|
}
|
|
/**
|
|
* Computes the cumulated duration the entity spent across a set of statuses.
|
|
*
|
|
* @generated from protobuf message api.ComputationStatusDuration
|
|
*/
|
|
export interface ComputationStatusDuration {
|
|
/**
|
|
* @generated from protobuf field: repeated string StatusCodes = 1
|
|
*/
|
|
StatusCodes: string[]; // Status codes to accumulate duration for, e.g. ["ORDER_STATUS_SHIPPED", "ORDER_STATUS_DELIVERED"].
|
|
/**
|
|
* @generated from protobuf field: api.ComputationDurationFormat DurationFormat = 2
|
|
*/
|
|
DurationFormat?: ComputationDurationFormat; // How to express the resulting duration.
|
|
}
|
|
/**
|
|
* Defines how a duration is expressed and optionally rounded.
|
|
* Example: {Format: WORKING_HOURS, CalendarID: "FR_STANDARD", Rounding:
|
|
* FIXED_HOUR, RoundingValue: "8:00:00"} expresses a duration in working hours
|
|
* (excluding non-working time per the "FR_STANDARD" calendar) and rounds it to
|
|
* the nearest 8-hour increment (e.g. a computed 10h30 duration becomes 16h).
|
|
* CalendarID is only meaningful for the WORKING_* Format values (ignored for
|
|
* plain MINUTES/HOURS/DAYS)
|
|
* RoundingValue is only meaningful when Rounding = FIXED_HOUR (ignored for UP/DOWN).
|
|
*
|
|
* @generated from protobuf message api.ComputationDurationFormat
|
|
*/
|
|
export interface ComputationDurationFormat {
|
|
/**
|
|
* @generated from protobuf field: api.DurationFormat Format = 1
|
|
*/
|
|
Format: DurationFormat; // How to express the resulting duration (plain minutes/hours/days, or working-time equivalents).
|
|
/**
|
|
* @generated from protobuf field: string CalendarID = 2
|
|
*/
|
|
CalendarID: string; // Calendar to use for working-time calculations; only meaningful for WORKING_* formats.
|
|
/**
|
|
* @generated from protobuf field: api.DurationRounding Rounding = 3
|
|
*/
|
|
Rounding: DurationRounding; // How to round the resulting duration.
|
|
/**
|
|
* @generated from protobuf field: string RoundingValue = 4
|
|
*/
|
|
RoundingValue: string; // If Rounding = FIXED_HOUR, the value to round to, e.g. "8:00:00" for an 8-hour rounding; ignored otherwise (must be in HH:MM:SS format).
|
|
}
|
|
/**
|
|
* Applies an arithmetic operator between two entity fields and formats the result.
|
|
*
|
|
* @generated from protobuf message api.ComputationCustomFunction
|
|
*/
|
|
export interface ComputationCustomFunction {
|
|
/**
|
|
* @generated from protobuf field: string LeftField = 1
|
|
*/
|
|
LeftField: string; // Left operand field path, e.g. "Order.TotalAmount".
|
|
/**
|
|
* @generated from protobuf field: api.ComputationCustomFunctionOperator Operator = 2
|
|
*/
|
|
Operator: ComputationCustomFunctionOperator;
|
|
/**
|
|
* @generated from protobuf field: string RightField = 3
|
|
*/
|
|
RightField: string; // Right operand field path, e.g. "Order.DiscountAmount".
|
|
/**
|
|
* @generated from protobuf field: api.ComputationCustomFunctionFormat Format = 4
|
|
*/
|
|
Format?: ComputationCustomFunctionFormat; // How to interpret and round the computed result.
|
|
}
|
|
/**
|
|
* Defines how the result of a custom function is typed and rounded.
|
|
*
|
|
* @generated from protobuf message api.ComputationCustomFunctionFormat
|
|
*/
|
|
export interface ComputationCustomFunctionFormat {
|
|
/**
|
|
* @generated from protobuf field: api.CustomFunctionFormat Format = 1
|
|
*/
|
|
Format: CustomFunctionFormat;
|
|
/**
|
|
* @generated from protobuf field: uint32 Precision = 2
|
|
*/
|
|
Precision: number; // Number of decimal places to round to.
|
|
/**
|
|
* @generated from protobuf field: api.CustomFunctionRounding Rounding = 3
|
|
*/
|
|
Rounding: CustomFunctionRounding;
|
|
}
|
|
// ─── Mapping Tables ───────────────────────────────────────────────────────────
|
|
// Externally managed tables mapping multiple input values to an output value, referenced in conditions and actions via EngineRuleMappingRef.
|
|
|
|
/**
|
|
* @generated from protobuf message api.MappingTable
|
|
*/
|
|
export interface MappingTable {
|
|
/**
|
|
* @generated from protobuf field: string ProjectID = 10
|
|
*/
|
|
ProjectID: string;
|
|
/**
|
|
* @generated from protobuf field: string ID = 20
|
|
*/
|
|
ID: string; // Unique identifier for the mapping table, used in EngineRuleMappingRef.
|
|
/**
|
|
* @generated from protobuf field: string Label = 30
|
|
*/
|
|
Label: string; // Human-readable label for the mapping table, e.g. "Shipping Cost by Priority".
|
|
/**
|
|
* @generated from protobuf field: api.EntityType Entity = 40
|
|
*/
|
|
Entity: EntityType; // Entity type this mapping applies to (Order, HandlingUnit, etc.).
|
|
/**
|
|
* @generated from protobuf field: repeated api.MappingTableInputDescription InputFields = 50
|
|
*/
|
|
InputFields: MappingTableInputDescription[]; // Declarative schema: fields the table reads from the entity, e.g. ["Order.Priority", "Order.DestinationZone"]; application layer must ensure entries only reference fields listed here.
|
|
/**
|
|
* @generated from protobuf field: api.MappingTableOutputField OutputField = 60
|
|
*/
|
|
OutputField?: MappingTableOutputField; // Field resulting from the lookup, e.g. "Shipping cost".
|
|
/**
|
|
* @generated from protobuf field: repeated api.MappingTableEntry Entries = 70
|
|
*/
|
|
Entries: MappingTableEntry[]; // Mapping entries; must contain at least one entry.
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.MappingTableInputDescription
|
|
*/
|
|
export interface MappingTableInputDescription {
|
|
/**
|
|
* @generated from protobuf field: string Field = 1
|
|
*/
|
|
Field: string; // Field whose value is an input to the mapping table, e.g. "Order.Priority".
|
|
/**
|
|
* Reserved for date fields to indicate whether the mapping table expects full timestamps or truncated values (e.g. just date or just hour) and should apply appropriate transformations at
|
|
* runtime
|
|
*
|
|
* @generated from protobuf field: api.MappingTableInputDescriptionGranularity Granularity = 2
|
|
*/
|
|
Granularity: MappingTableInputDescriptionGranularity;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.MappingTableEntry
|
|
*/
|
|
export interface MappingTableEntry {
|
|
/**
|
|
* @generated from protobuf field: repeated api.MappingTableInput Inputs = 1
|
|
*/
|
|
Inputs: MappingTableInput[]; // input values driving the lookup, e.g. Order.Priority = "HIGH".
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleLiteral OutputValue = 2
|
|
*/
|
|
OutputValue?: EngineRuleLiteral; // output value resulting from the lookup, e.g. ShippingCost = 25.00.
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.MappingTableInput
|
|
*/
|
|
export interface MappingTableInput {
|
|
/**
|
|
* @generated from protobuf field: string Field = 10
|
|
*/
|
|
Field: string; // Field whose value is matched, must correspond to a field declared in MappingTable.InputFields, e.g. "Order.Priority".
|
|
/**
|
|
* @generated from protobuf oneof: Value
|
|
*/
|
|
Value: {
|
|
oneofKind: "Literal";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleLiteral Literal = 20
|
|
*/
|
|
Literal: EngineRuleLiteral; // Value to match on the input field, e.g. "HIGH".
|
|
} | {
|
|
oneofKind: "LiteralList";
|
|
/**
|
|
* @generated from protobuf field: api.EngineRuleLiteralList LiteralList = 22
|
|
*/
|
|
LiteralList: EngineRuleLiteralList; // Matches if the input field's value equals any one of these, e.g. ["HIGH", "URGENT"]; only meaningful with Operator = EQUALS.
|
|
} | {
|
|
oneofKind: "AllValuesMatch";
|
|
/**
|
|
* @generated from protobuf field: bool AllValuesMatch = 21
|
|
*/
|
|
AllValuesMatch: boolean; // If true, the entry matches any value for the input field (wildcard); mutually exclusive with EngineRuleLiteral/LiteralList.
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
/**
|
|
* @generated from protobuf field: api.MappingTableInputOperator Operator = 30
|
|
*/
|
|
Operator: MappingTableInputOperator; // Operator to apply when matching the entry's input values to the entity's fields; defaults to EQUALS for exact match.
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.MappingTableOutputField
|
|
*/
|
|
export interface MappingTableOutputField {
|
|
/**
|
|
* @generated from protobuf field: string Label = 1
|
|
*/
|
|
Label: string; // Human-readable label for the output field, e.g. "Shipping Cost".
|
|
/**
|
|
* @generated from protobuf field: api.MappingTableOutputFieldType Type = 2
|
|
*/
|
|
Type: MappingTableOutputFieldType;
|
|
}
|
|
// ─── Validity ─────────────────────────────────────────────────────────────────
|
|
|
|
/**
|
|
* @generated from protobuf enum api.EngineRuleValidityType
|
|
*/
|
|
export enum EngineRuleValidityType {
|
|
/**
|
|
* @generated from protobuf enum value: ENGINE_RULE_VALIDITY_TYPE_UNKNOWN = 0;
|
|
*/
|
|
ENGINE_RULE_VALIDITY_TYPE_UNKNOWN = 0,
|
|
/**
|
|
* rule is always valid.
|
|
*
|
|
* @generated from protobuf enum value: ENGINE_RULE_VALIDITY_TYPE_INDEFINITE = 1;
|
|
*/
|
|
ENGINE_RULE_VALIDITY_TYPE_INDEFINITE = 1,
|
|
/**
|
|
* rule is valid between a start and end date.
|
|
*
|
|
* @generated from protobuf enum value: ENGINE_RULE_VALIDITY_TYPE_DATE_RANGE = 2;
|
|
*/
|
|
ENGINE_RULE_VALIDITY_TYPE_DATE_RANGE = 2
|
|
}
|
|
/**
|
|
* Note ByDay + AtTime combine to express things like "every Monday and
|
|
* Tuesday at 23:59:00": Frequency = WEEKLY, ByDay = [MONDAY, TUESDAY],
|
|
* AtTime = "23:59:00". This is already supported by the fields above.
|
|
*
|
|
* @generated from protobuf enum api.RuleRecurrenceFrequency
|
|
*/
|
|
export enum RuleRecurrenceFrequency {
|
|
/**
|
|
* @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_UNKNOWN = 0;
|
|
*/
|
|
RULE_RECURRENCE_FREQUENCY_UNKNOWN = 0,
|
|
/**
|
|
* Fires every Interval minutes, all day, every day starting at StartDate; AtTime/ByDay are ignored.
|
|
*
|
|
* @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_MINUTELY = 5;
|
|
*/
|
|
RULE_RECURRENCE_FREQUENCY_MINUTELY = 5,
|
|
/**
|
|
* @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_DAILY = 1;
|
|
*/
|
|
RULE_RECURRENCE_FREQUENCY_DAILY = 1,
|
|
/**
|
|
* Combine with ByDay to restrict to specific weekdays, e.g. Monday and Tuesday only.
|
|
*
|
|
* @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_WEEKLY = 2;
|
|
*/
|
|
RULE_RECURRENCE_FREQUENCY_WEEKLY = 2,
|
|
/**
|
|
* @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_MONTHLY = 3;
|
|
*/
|
|
RULE_RECURRENCE_FREQUENCY_MONTHLY = 3,
|
|
/**
|
|
* @generated from protobuf enum value: RULE_RECURRENCE_FREQUENCY_YEARLY = 4;
|
|
*/
|
|
RULE_RECURRENCE_FREQUENCY_YEARLY = 4
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.EngineRuleTriggerType
|
|
*/
|
|
export enum EngineRuleTriggerType {
|
|
/**
|
|
* @generated from protobuf enum value: ENGINE_RULE_TRIGGER_TYPE_UNKNOWN = 0;
|
|
*/
|
|
ENGINE_RULE_TRIGGER_TYPE_UNKNOWN = 0,
|
|
/**
|
|
* @generated from protobuf enum value: ENGINE_RULE_TRIGGER_TYPE_SCHEDULED = 1;
|
|
*/
|
|
ENGINE_RULE_TRIGGER_TYPE_SCHEDULED = 1,
|
|
/**
|
|
* @generated from protobuf enum value: ENGINE_RULE_TRIGGER_TYPE_EVENT = 2;
|
|
*/
|
|
ENGINE_RULE_TRIGGER_TYPE_EVENT = 2,
|
|
/**
|
|
* @generated from protobuf enum value: ENGINE_RULE_TRIGGER_TYPE_MILESTONE = 3;
|
|
*/
|
|
ENGINE_RULE_TRIGGER_TYPE_MILESTONE = 3
|
|
}
|
|
/**
|
|
* Logical quantifiers for collection conditions.
|
|
*
|
|
* @generated from protobuf enum api.EngineRuleConditionQuantifier
|
|
*/
|
|
export enum EngineRuleConditionQuantifier {
|
|
/**
|
|
* @generated from protobuf enum value: RULE_CONDITION_QUANTIFIER_UNKNOWN = 0;
|
|
*/
|
|
RULE_CONDITION_QUANTIFIER_UNKNOWN = 0,
|
|
/**
|
|
* ∀ every element must satisfy the condition.
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_QUANTIFIER_ALL = 1;
|
|
*/
|
|
RULE_CONDITION_QUANTIFIER_ALL = 1,
|
|
/**
|
|
* ∃ at least one element must satisfy the condition.
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_QUANTIFIER_ANY = 2;
|
|
*/
|
|
RULE_CONDITION_QUANTIFIER_ANY = 2,
|
|
/**
|
|
* ∄ no element must satisfy the condition.
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_QUANTIFIER_NONE = 3;
|
|
*/
|
|
RULE_CONDITION_QUANTIFIER_NONE = 3
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.EngineRuleConditionAggregateFunction
|
|
*/
|
|
export enum EngineRuleConditionAggregateFunction {
|
|
/**
|
|
* @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_UNKNOWN = 0;
|
|
*/
|
|
RULE_CONDITION_AGGREGATE_FUNCTION_UNKNOWN = 0,
|
|
/**
|
|
* Sum of Field across the filtered subset.
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_SUM = 1;
|
|
*/
|
|
RULE_CONDITION_AGGREGATE_FUNCTION_SUM = 1,
|
|
/**
|
|
* Number of instances in the filtered subset (Field is ignored).
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_COUNT = 2;
|
|
*/
|
|
RULE_CONDITION_AGGREGATE_FUNCTION_COUNT = 2,
|
|
/**
|
|
* Average of Field across the filtered subset.
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_AVG = 3;
|
|
*/
|
|
RULE_CONDITION_AGGREGATE_FUNCTION_AVG = 3,
|
|
/**
|
|
* Minimum value of Field across the filtered subset.
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_MIN = 4;
|
|
*/
|
|
RULE_CONDITION_AGGREGATE_FUNCTION_MIN = 4,
|
|
/**
|
|
* Maximum value of Field across the filtered subset.
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_AGGREGATE_FUNCTION_MAX = 5;
|
|
*/
|
|
RULE_CONDITION_AGGREGATE_FUNCTION_MAX = 5
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.EngineRuleConditionOperator
|
|
*/
|
|
export enum EngineRuleConditionOperator {
|
|
/**
|
|
* @generated from protobuf enum value: RULE_CONDITION_OPERATOR_UNKNOWN = 0;
|
|
*/
|
|
RULE_CONDITION_OPERATOR_UNKNOWN = 0,
|
|
/**
|
|
* ==
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_OPERATOR_EQUALS = 1;
|
|
*/
|
|
RULE_CONDITION_OPERATOR_EQUALS = 1,
|
|
/**
|
|
* !=
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_OPERATOR_NOT_EQUALS = 2;
|
|
*/
|
|
RULE_CONDITION_OPERATOR_NOT_EQUALS = 2,
|
|
/**
|
|
* >
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_OPERATOR_GREATER_THAN = 3;
|
|
*/
|
|
RULE_CONDITION_OPERATOR_GREATER_THAN = 3,
|
|
/**
|
|
* <
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_OPERATOR_LESS_THAN = 4;
|
|
*/
|
|
RULE_CONDITION_OPERATOR_LESS_THAN = 4,
|
|
/**
|
|
* >=
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_OPERATOR_GREATER_OR_EQUALS = 5;
|
|
*/
|
|
RULE_CONDITION_OPERATOR_GREATER_OR_EQUALS = 5,
|
|
/**
|
|
* <=
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_OPERATOR_LESS_OR_EQUALS = 6;
|
|
*/
|
|
RULE_CONDITION_OPERATOR_LESS_OR_EQUALS = 6,
|
|
/**
|
|
* Value is in a list of literals.
|
|
*
|
|
* @generated from protobuf enum value: RULE_CONDITION_OPERATOR_IN = 7;
|
|
*/
|
|
RULE_CONDITION_OPERATOR_IN = 7
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.EngineRuleFieldRefScope
|
|
*/
|
|
export enum EngineRuleFieldRefScope {
|
|
/**
|
|
* @generated from protobuf enum value: ENGINE_RULE_FIELD_REF_SCOPE_UNKNOWN = 0;
|
|
*/
|
|
ENGINE_RULE_FIELD_REF_SCOPE_UNKNOWN = 0,
|
|
/**
|
|
* Path from root entity.
|
|
*
|
|
* @generated from protobuf enum value: ENGINE_RULE_FIELD_REF_SCOPE_ABSOLUTE = 1;
|
|
*/
|
|
ENGINE_RULE_FIELD_REF_SCOPE_ABSOLUTE = 1,
|
|
/**
|
|
* Path relative to current collection element.
|
|
*
|
|
* @generated from protobuf enum value: ENGINE_RULE_FIELD_REF_SCOPE_ELEMENT = 2;
|
|
*/
|
|
ENGINE_RULE_FIELD_REF_SCOPE_ELEMENT = 2
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.ComputationDueDateComputationType
|
|
*/
|
|
export enum ComputationDueDateComputationType {
|
|
/**
|
|
* @generated from protobuf enum value: COMPUTATION_DUE_DATE_COMPUTATION_TYPE_UNKNOWN = 0;
|
|
*/
|
|
COMPUTATION_DUE_DATE_COMPUTATION_TYPE_UNKNOWN = 0,
|
|
/**
|
|
* DueDate = ReferenceDate + ComputedDuration.
|
|
*
|
|
* @generated from protobuf enum value: COMPUTATION_DUE_DATE_COMPUTATION_TYPE_ADD = 1;
|
|
*/
|
|
COMPUTATION_DUE_DATE_COMPUTATION_TYPE_ADD = 1,
|
|
/**
|
|
* DueDate = ReferenceDate - ComputedDuration.
|
|
*
|
|
* @generated from protobuf enum value: COMPUTATION_DUE_DATE_COMPUTATION_TYPE_SUBTRACT = 2;
|
|
*/
|
|
COMPUTATION_DUE_DATE_COMPUTATION_TYPE_SUBTRACT = 2
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.DurationFormat
|
|
*/
|
|
export enum DurationFormat {
|
|
/**
|
|
* @generated from protobuf enum value: DURATION_FORMAT_UNKNOWN = 0;
|
|
*/
|
|
DURATION_FORMAT_UNKNOWN = 0,
|
|
/**
|
|
* @generated from protobuf enum value: DURATION_FORMAT_MINUTES = 10;
|
|
*/
|
|
DURATION_FORMAT_MINUTES = 10,
|
|
/**
|
|
* Excludes non-working time based on CalendarID.
|
|
*
|
|
* @generated from protobuf enum value: DURATION_FORMAT_WORKING_MINUTES = 11;
|
|
*/
|
|
DURATION_FORMAT_WORKING_MINUTES = 11,
|
|
/**
|
|
* @generated from protobuf enum value: DURATION_FORMAT_HOURS = 20;
|
|
*/
|
|
DURATION_FORMAT_HOURS = 20,
|
|
/**
|
|
* Excludes non-working time based on CalendarID.
|
|
*
|
|
* @generated from protobuf enum value: DURATION_FORMAT_WORKING_HOURS = 21;
|
|
*/
|
|
DURATION_FORMAT_WORKING_HOURS = 21,
|
|
/**
|
|
* @generated from protobuf enum value: DURATION_FORMAT_DAYS = 30;
|
|
*/
|
|
DURATION_FORMAT_DAYS = 30,
|
|
/**
|
|
* Excludes non-working time based on CalendarID.
|
|
*
|
|
* @generated from protobuf enum value: DURATION_FORMAT_WORKING_DAYS = 31;
|
|
*/
|
|
DURATION_FORMAT_WORKING_DAYS = 31
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.DurationRounding
|
|
*/
|
|
export enum DurationRounding {
|
|
/**
|
|
* @generated from protobuf enum value: DURATION_ROUNDING_UNKNOWN = 0;
|
|
*/
|
|
DURATION_ROUNDING_UNKNOWN = 0,
|
|
/**
|
|
* round up to the next whole unit (e.g. 1h20m → 2h).
|
|
*
|
|
* @generated from protobuf enum value: DURATION_ROUNDING_UP = 1;
|
|
*/
|
|
DURATION_ROUNDING_UP = 1,
|
|
/**
|
|
* round down to the previous whole unit (e.g. 1h20m → 1h).
|
|
*
|
|
* @generated from protobuf enum value: DURATION_ROUNDING_DOWN = 2;
|
|
*/
|
|
DURATION_ROUNDING_DOWN = 2,
|
|
/**
|
|
* round to the specified value (e.g 8h: 1h20m → 8h).
|
|
*
|
|
* @generated from protobuf enum value: DURATION_ROUNDING_FIXED_HOUR = 3;
|
|
*/
|
|
DURATION_ROUNDING_FIXED_HOUR = 3
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.ComputationCustomFunctionOperator
|
|
*/
|
|
export enum ComputationCustomFunctionOperator {
|
|
/**
|
|
* @generated from protobuf enum value: COMPUTATION_CUSTOM_FUNCTION_OPERATOR_UNKNOWN = 0;
|
|
*/
|
|
COMPUTATION_CUSTOM_FUNCTION_OPERATOR_UNKNOWN = 0,
|
|
/**
|
|
* +
|
|
*
|
|
* @generated from protobuf enum value: COMPUTATION_CUSTOM_FUNCTION_OPERATOR_ADD = 1;
|
|
*/
|
|
COMPUTATION_CUSTOM_FUNCTION_OPERATOR_ADD = 1,
|
|
/**
|
|
* -
|
|
*
|
|
* @generated from protobuf enum value: COMPUTATION_CUSTOM_FUNCTION_OPERATOR_SUBTRACT = 2;
|
|
*/
|
|
COMPUTATION_CUSTOM_FUNCTION_OPERATOR_SUBTRACT = 2,
|
|
/**
|
|
* *
|
|
*
|
|
* @generated from protobuf enum value: COMPUTATION_CUSTOM_FUNCTION_OPERATOR_MULTIPLY = 3;
|
|
*/
|
|
COMPUTATION_CUSTOM_FUNCTION_OPERATOR_MULTIPLY = 3,
|
|
/**
|
|
* /
|
|
*
|
|
* @generated from protobuf enum value: COMPUTATION_CUSTOM_FUNCTION_OPERATOR_DIVIDE = 4;
|
|
*/
|
|
COMPUTATION_CUSTOM_FUNCTION_OPERATOR_DIVIDE = 4
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.CustomFunctionFormat
|
|
*/
|
|
export enum CustomFunctionFormat {
|
|
/**
|
|
* @generated from protobuf enum value: CUSTOM_FUNCTION_FORMAT_UNKNOWN = 0;
|
|
*/
|
|
CUSTOM_FUNCTION_FORMAT_UNKNOWN = 0,
|
|
/**
|
|
* e.g. 12.3456.
|
|
*
|
|
* @generated from protobuf enum value: CUSTOM_FUNCTION_FORMAT_NUMERIC = 1;
|
|
*/
|
|
CUSTOM_FUNCTION_FORMAT_NUMERIC = 1,
|
|
/**
|
|
* e.g. 12.34%.
|
|
*
|
|
* @generated from protobuf enum value: CUSTOM_FUNCTION_FORMAT_PERCENTAGE = 2;
|
|
*/
|
|
CUSTOM_FUNCTION_FORMAT_PERCENTAGE = 2
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.CustomFunctionRounding
|
|
*/
|
|
export enum CustomFunctionRounding {
|
|
/**
|
|
* @generated from protobuf enum value: CUSTOM_FUNCTION_ROUNDING_UNKNOWN = 0;
|
|
*/
|
|
CUSTOM_FUNCTION_ROUNDING_UNKNOWN = 0,
|
|
/**
|
|
* Round up to the next whole unit (e.g. 1.2 → 2).
|
|
*
|
|
* @generated from protobuf enum value: CUSTOM_FUNCTION_ROUNDING_UP = 1;
|
|
*/
|
|
CUSTOM_FUNCTION_ROUNDING_UP = 1,
|
|
/**
|
|
* Round down to the previous whole unit (e.g. 1.2 → 1).
|
|
*
|
|
* @generated from protobuf enum value: CUSTOM_FUNCTION_ROUNDING_DOWN = 2;
|
|
*/
|
|
CUSTOM_FUNCTION_ROUNDING_DOWN = 2
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.MappingTableInputDescriptionGranularity
|
|
*/
|
|
export enum MappingTableInputDescriptionGranularity {
|
|
/**
|
|
* @generated from protobuf enum value: MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_UNKNOWN = 0;
|
|
*/
|
|
MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_UNKNOWN = 0,
|
|
/**
|
|
* @generated from protobuf enum value: MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_HOUR = 1;
|
|
*/
|
|
MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_HOUR = 1,
|
|
/**
|
|
* @generated from protobuf enum value: MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_DATE = 2;
|
|
*/
|
|
MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_DATE = 2,
|
|
/**
|
|
* @generated from protobuf enum value: MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_HOUR_AND_DATE = 3;
|
|
*/
|
|
MAPPING_TABLE_INPUT_DESCRIPTION_GRANULARITY_HOUR_AND_DATE = 3
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.MappingTableInputOperator
|
|
*/
|
|
export enum MappingTableInputOperator {
|
|
/**
|
|
* @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_UNKNOWN = 0;
|
|
*/
|
|
MAPPING_TABLE_INPUT_OPERATOR_UNKNOWN = 0,
|
|
/**
|
|
* Exact match of the timestamp.
|
|
*
|
|
* @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_EQUALS = 1;
|
|
*/
|
|
MAPPING_TABLE_INPUT_OPERATOR_EQUALS = 1,
|
|
/**
|
|
* Does not match the timestamp.
|
|
*
|
|
* @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_NOT_EQUALS = 2;
|
|
*/
|
|
MAPPING_TABLE_INPUT_OPERATOR_NOT_EQUALS = 2,
|
|
/**
|
|
* Matches if the entity timestamp is before the input value.
|
|
*
|
|
* @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_LESS_THAN = 3;
|
|
*/
|
|
MAPPING_TABLE_INPUT_OPERATOR_LESS_THAN = 3,
|
|
/**
|
|
* Matches if the entity timestamp is before or equal to the input value.
|
|
*
|
|
* @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_LESS_OR_EQUALS = 4;
|
|
*/
|
|
MAPPING_TABLE_INPUT_OPERATOR_LESS_OR_EQUALS = 4,
|
|
/**
|
|
* Matches if the entity timestamp is after the input value.
|
|
*
|
|
* @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_GREATER_THAN = 5;
|
|
*/
|
|
MAPPING_TABLE_INPUT_OPERATOR_GREATER_THAN = 5,
|
|
/**
|
|
* Matches if the entity timestamp is after or equal to the input value.
|
|
*
|
|
* @generated from protobuf enum value: MAPPING_TABLE_INPUT_OPERATOR_GREATER_OR_EQUALS = 6;
|
|
*/
|
|
MAPPING_TABLE_INPUT_OPERATOR_GREATER_OR_EQUALS = 6
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.MappingTableOutputFieldType
|
|
*/
|
|
export enum MappingTableOutputFieldType {
|
|
/**
|
|
* @generated from protobuf enum value: MAPPING_TABLE_OUTPUT_FIELD_TYPE_UNKNOWN = 0;
|
|
*/
|
|
MAPPING_TABLE_OUTPUT_FIELD_TYPE_UNKNOWN = 0,
|
|
/**
|
|
* @generated from protobuf enum value: MAPPING_TABLE_OUTPUT_FIELD_TYPE_INTEGER = 1;
|
|
*/
|
|
MAPPING_TABLE_OUTPUT_FIELD_TYPE_INTEGER = 1,
|
|
/**
|
|
* @generated from protobuf enum value: MAPPING_TABLE_OUTPUT_FIELD_TYPE_STRING = 2;
|
|
*/
|
|
MAPPING_TABLE_OUTPUT_FIELD_TYPE_STRING = 2,
|
|
/**
|
|
* @generated from protobuf enum value: MAPPING_TABLE_OUTPUT_FIELD_TYPE_BOOLEAN = 3;
|
|
*/
|
|
MAPPING_TABLE_OUTPUT_FIELD_TYPE_BOOLEAN = 3
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRule$Type extends MessageType<EngineRule> {
|
|
constructor() {
|
|
super("api.EngineRule", [
|
|
{ no: 10, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 20, name: "Code", kind: "scalar", localName: "Code", jsonName: "Code", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { pattern: "^[A-Za-z0-9_]+$" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { pattern: "^[A-Za-z0-9_]+$" } } },
|
|
{ no: 30, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 40, name: "ValidityType", kind: "enum", localName: "ValidityType", jsonName: "ValidityType", T: () => ["api.EngineRuleValidityType", EngineRuleValidityType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } },
|
|
{ no: 41, name: "ValidFrom", kind: "scalar", localName: "ValidFrom", jsonName: "ValidFrom", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true, ignoreEmpty: true } } } },
|
|
{ no: 42, name: "ValidUntil", kind: "scalar", localName: "ValidUntil", jsonName: "ValidUntil", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true, ignoreEmpty: true } } } },
|
|
{ no: 50, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType] },
|
|
{ no: 60, name: "TriggerType", kind: "enum", localName: "TriggerType", jsonName: "TriggerType", T: () => ["api.EngineRuleTriggerType", EngineRuleTriggerType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } },
|
|
{ no: 70, name: "ScheduledTrigger", kind: "message", localName: "ScheduledTrigger", jsonName: "ScheduledTrigger", oneof: "Trigger", T: () => EngineRuleScheduledTrigger },
|
|
{ no: 71, name: "EventTrigger", kind: "message", localName: "EventTrigger", jsonName: "EventTrigger", oneof: "Trigger", T: () => EngineRuleEventTrigger },
|
|
{ no: 72, name: "MilestoneTrigger", kind: "message", localName: "MilestoneTrigger", jsonName: "MilestoneTrigger", oneof: "Trigger", T: () => EngineRuleMilestoneTrigger },
|
|
{ no: 80, name: "Conditions", kind: "message", localName: "Conditions", jsonName: "Conditions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EngineRuleCondition },
|
|
{ no: 90, name: "Actions", kind: "message", localName: "Actions", jsonName: "Actions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EngineRuleAction, options: { "n1validate.rules": { repeated: { minItems: "1" } } } },
|
|
{ no: 91, name: "ElseActions", kind: "message", localName: "ElseActions", jsonName: "ElseActions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EngineRuleAction },
|
|
{ no: 100, name: "Version", kind: "scalar", localName: "Version", jsonName: "Version", T: 5 /*ScalarType.INT32*/ },
|
|
{ no: 110, name: "CreatedBy", kind: "scalar", localName: "CreatedBy", jsonName: "CreatedBy", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 120, name: "CreatedAt", kind: "scalar", localName: "CreatedAt", jsonName: "CreatedAt", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true } } } },
|
|
{ no: 130, name: "UpdatedAt", kind: "scalar", localName: "UpdatedAt", jsonName: "UpdatedAt", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true } } } },
|
|
{ no: 140, name: "IsActive", kind: "scalar", localName: "IsActive", jsonName: "IsActive", T: 8 /*ScalarType.BOOL*/ }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Code", "Actions", "Trigger"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRule>): EngineRule {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ProjectID = "";
|
|
message.Code = "";
|
|
message.Label = "";
|
|
message.ValidityType = 0;
|
|
message.ValidFrom = "";
|
|
message.ValidUntil = "";
|
|
message.Entity = 0;
|
|
message.TriggerType = 0;
|
|
message.Trigger = { oneofKind: undefined };
|
|
message.Conditions = [];
|
|
message.Actions = [];
|
|
message.ElseActions = [];
|
|
message.Version = 0;
|
|
message.CreatedBy = "";
|
|
message.CreatedAt = "";
|
|
message.UpdatedAt = "";
|
|
message.IsActive = false;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRule>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRule): EngineRule {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ProjectID */ 10:
|
|
message.ProjectID = reader.string();
|
|
break;
|
|
case /* string Code */ 20:
|
|
message.Code = reader.string();
|
|
break;
|
|
case /* string Label */ 30:
|
|
message.Label = reader.string();
|
|
break;
|
|
case /* api.EngineRuleValidityType ValidityType */ 40:
|
|
message.ValidityType = reader.int32();
|
|
break;
|
|
case /* string ValidFrom */ 41:
|
|
message.ValidFrom = reader.string();
|
|
break;
|
|
case /* string ValidUntil */ 42:
|
|
message.ValidUntil = reader.string();
|
|
break;
|
|
case /* api.EntityType Entity */ 50:
|
|
message.Entity = reader.int32();
|
|
break;
|
|
case /* api.EngineRuleTriggerType TriggerType */ 60:
|
|
message.TriggerType = reader.int32();
|
|
break;
|
|
case /* api.EngineRuleScheduledTrigger ScheduledTrigger */ 70:
|
|
message.Trigger = {
|
|
oneofKind: "ScheduledTrigger",
|
|
ScheduledTrigger: EngineRuleScheduledTrigger.internalBinaryRead(reader, reader.uint32(), options, (message.Trigger as any).ScheduledTrigger)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleEventTrigger EventTrigger */ 71:
|
|
message.Trigger = {
|
|
oneofKind: "EventTrigger",
|
|
EventTrigger: EngineRuleEventTrigger.internalBinaryRead(reader, reader.uint32(), options, (message.Trigger as any).EventTrigger)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleMilestoneTrigger MilestoneTrigger */ 72:
|
|
message.Trigger = {
|
|
oneofKind: "MilestoneTrigger",
|
|
MilestoneTrigger: EngineRuleMilestoneTrigger.internalBinaryRead(reader, reader.uint32(), options, (message.Trigger as any).MilestoneTrigger)
|
|
};
|
|
break;
|
|
case /* repeated api.EngineRuleCondition Conditions */ 80:
|
|
message.Conditions.push(EngineRuleCondition.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.EngineRuleAction Actions */ 90:
|
|
message.Actions.push(EngineRuleAction.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.EngineRuleAction ElseActions */ 91:
|
|
message.ElseActions.push(EngineRuleAction.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* int32 Version */ 100:
|
|
message.Version = reader.int32();
|
|
break;
|
|
case /* string CreatedBy */ 110:
|
|
message.CreatedBy = reader.string();
|
|
break;
|
|
case /* string CreatedAt */ 120:
|
|
message.CreatedAt = reader.string();
|
|
break;
|
|
case /* string UpdatedAt */ 130:
|
|
message.UpdatedAt = reader.string();
|
|
break;
|
|
case /* bool IsActive */ 140:
|
|
message.IsActive = 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: EngineRule, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ProjectID = 10; */
|
|
if (message.ProjectID !== "")
|
|
writer.tag(10, WireType.LengthDelimited).string(message.ProjectID);
|
|
/* string Code = 20; */
|
|
if (message.Code !== "")
|
|
writer.tag(20, WireType.LengthDelimited).string(message.Code);
|
|
/* string Label = 30; */
|
|
if (message.Label !== "")
|
|
writer.tag(30, WireType.LengthDelimited).string(message.Label);
|
|
/* api.EngineRuleValidityType ValidityType = 40; */
|
|
if (message.ValidityType !== 0)
|
|
writer.tag(40, WireType.Varint).int32(message.ValidityType);
|
|
/* string ValidFrom = 41; */
|
|
if (message.ValidFrom !== "")
|
|
writer.tag(41, WireType.LengthDelimited).string(message.ValidFrom);
|
|
/* string ValidUntil = 42; */
|
|
if (message.ValidUntil !== "")
|
|
writer.tag(42, WireType.LengthDelimited).string(message.ValidUntil);
|
|
/* api.EntityType Entity = 50; */
|
|
if (message.Entity !== 0)
|
|
writer.tag(50, WireType.Varint).int32(message.Entity);
|
|
/* api.EngineRuleTriggerType TriggerType = 60; */
|
|
if (message.TriggerType !== 0)
|
|
writer.tag(60, WireType.Varint).int32(message.TriggerType);
|
|
/* api.EngineRuleScheduledTrigger ScheduledTrigger = 70; */
|
|
if (message.Trigger.oneofKind === "ScheduledTrigger")
|
|
EngineRuleScheduledTrigger.internalBinaryWrite(message.Trigger.ScheduledTrigger, writer.tag(70, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleEventTrigger EventTrigger = 71; */
|
|
if (message.Trigger.oneofKind === "EventTrigger")
|
|
EngineRuleEventTrigger.internalBinaryWrite(message.Trigger.EventTrigger, writer.tag(71, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleMilestoneTrigger MilestoneTrigger = 72; */
|
|
if (message.Trigger.oneofKind === "MilestoneTrigger")
|
|
EngineRuleMilestoneTrigger.internalBinaryWrite(message.Trigger.MilestoneTrigger, writer.tag(72, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.EngineRuleCondition Conditions = 80; */
|
|
for (let i = 0; i < message.Conditions.length; i++)
|
|
EngineRuleCondition.internalBinaryWrite(message.Conditions[i], writer.tag(80, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.EngineRuleAction Actions = 90; */
|
|
for (let i = 0; i < message.Actions.length; i++)
|
|
EngineRuleAction.internalBinaryWrite(message.Actions[i], writer.tag(90, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.EngineRuleAction ElseActions = 91; */
|
|
for (let i = 0; i < message.ElseActions.length; i++)
|
|
EngineRuleAction.internalBinaryWrite(message.ElseActions[i], writer.tag(91, WireType.LengthDelimited).fork(), options).join();
|
|
/* int32 Version = 100; */
|
|
if (message.Version !== 0)
|
|
writer.tag(100, WireType.Varint).int32(message.Version);
|
|
/* string CreatedBy = 110; */
|
|
if (message.CreatedBy !== "")
|
|
writer.tag(110, WireType.LengthDelimited).string(message.CreatedBy);
|
|
/* string CreatedAt = 120; */
|
|
if (message.CreatedAt !== "")
|
|
writer.tag(120, WireType.LengthDelimited).string(message.CreatedAt);
|
|
/* string UpdatedAt = 130; */
|
|
if (message.UpdatedAt !== "")
|
|
writer.tag(130, WireType.LengthDelimited).string(message.UpdatedAt);
|
|
/* bool IsActive = 140; */
|
|
if (message.IsActive !== false)
|
|
writer.tag(140, WireType.Varint).bool(message.IsActive);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRule
|
|
*/
|
|
export const EngineRule = new EngineRule$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleScheduledTrigger$Type extends MessageType<EngineRuleScheduledTrigger> {
|
|
constructor() {
|
|
super("api.EngineRuleScheduledTrigger", [
|
|
{ no: 1, name: "Frequency", kind: "enum", localName: "Frequency", jsonName: "Frequency", T: () => ["api.RuleRecurrenceFrequency", RuleRecurrenceFrequency], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } },
|
|
{ no: 2, name: "Interval", kind: "scalar", localName: "Interval", jsonName: "Interval", T: 5 /*ScalarType.INT32*/, options: { "n1validate.rules": { int32: { gt: 0 } } } },
|
|
{ no: 3, name: "ByDay", kind: "enum", localName: "ByDay", jsonName: "ByDay", repeat: 1 /*RepeatType.PACKED*/, T: () => ["api.WeekDay", WeekDay], options: { "n1validate.rules": { repeated: { items: { enum: { definedOnly: true } } } } } },
|
|
{ no: 4, name: "StartDate", kind: "scalar", localName: "StartDate", jsonName: "StartDate", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { dateIso8601: true } } } },
|
|
{ no: 5, name: "AtTime", kind: "scalar", localName: "AtTime", jsonName: "AtTime", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { pattern: "^([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)$" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Frequency", "Interval", "StartDate", "AtTime"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleScheduledTrigger>): EngineRuleScheduledTrigger {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Frequency = 0;
|
|
message.Interval = 0;
|
|
message.ByDay = [];
|
|
message.StartDate = "";
|
|
message.AtTime = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleScheduledTrigger>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleScheduledTrigger): EngineRuleScheduledTrigger {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RuleRecurrenceFrequency Frequency */ 1:
|
|
message.Frequency = reader.int32();
|
|
break;
|
|
case /* int32 Interval */ 2:
|
|
message.Interval = reader.int32();
|
|
break;
|
|
case /* repeated api.WeekDay ByDay */ 3:
|
|
if (wireType === WireType.LengthDelimited)
|
|
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
message.ByDay.push(reader.int32());
|
|
else
|
|
message.ByDay.push(reader.int32());
|
|
break;
|
|
case /* string StartDate */ 4:
|
|
message.StartDate = reader.string();
|
|
break;
|
|
case /* string AtTime */ 5:
|
|
message.AtTime = 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: EngineRuleScheduledTrigger, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RuleRecurrenceFrequency Frequency = 1; */
|
|
if (message.Frequency !== 0)
|
|
writer.tag(1, WireType.Varint).int32(message.Frequency);
|
|
/* int32 Interval = 2; */
|
|
if (message.Interval !== 0)
|
|
writer.tag(2, WireType.Varint).int32(message.Interval);
|
|
/* repeated api.WeekDay ByDay = 3; */
|
|
if (message.ByDay.length) {
|
|
writer.tag(3, WireType.LengthDelimited).fork();
|
|
for (let i = 0; i < message.ByDay.length; i++)
|
|
writer.int32(message.ByDay[i]);
|
|
writer.join();
|
|
}
|
|
/* string StartDate = 4; */
|
|
if (message.StartDate !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.StartDate);
|
|
/* string AtTime = 5; */
|
|
if (message.AtTime !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.AtTime);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleScheduledTrigger
|
|
*/
|
|
export const EngineRuleScheduledTrigger = new EngineRuleScheduledTrigger$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleEventTrigger$Type extends MessageType<EngineRuleEventTrigger> {
|
|
constructor() {
|
|
super("api.EngineRuleEventTrigger", [
|
|
{ no: 1, name: "Creation", kind: "message", localName: "Creation", jsonName: "Creation", oneof: "Event", T: () => EngineRuleEventTriggerCreation },
|
|
{ no: 2, name: "Deletion", kind: "message", localName: "Deletion", jsonName: "Deletion", oneof: "Event", T: () => EngineRuleEventTriggerDeletion },
|
|
{ no: 3, name: "StatusChange", kind: "message", localName: "StatusChange", jsonName: "StatusChange", oneof: "Event", T: () => EngineRuleEventTriggerStatusChange }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Event"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleEventTrigger>): EngineRuleEventTrigger {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Event = { oneofKind: undefined };
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleEventTrigger>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleEventTrigger): EngineRuleEventTrigger {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.EngineRuleEventTriggerCreation Creation */ 1:
|
|
message.Event = {
|
|
oneofKind: "Creation",
|
|
Creation: EngineRuleEventTriggerCreation.internalBinaryRead(reader, reader.uint32(), options, (message.Event as any).Creation)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleEventTriggerDeletion Deletion */ 2:
|
|
message.Event = {
|
|
oneofKind: "Deletion",
|
|
Deletion: EngineRuleEventTriggerDeletion.internalBinaryRead(reader, reader.uint32(), options, (message.Event as any).Deletion)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleEventTriggerStatusChange StatusChange */ 3:
|
|
message.Event = {
|
|
oneofKind: "StatusChange",
|
|
StatusChange: EngineRuleEventTriggerStatusChange.internalBinaryRead(reader, reader.uint32(), options, (message.Event as any).StatusChange)
|
|
};
|
|
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: EngineRuleEventTrigger, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.EngineRuleEventTriggerCreation Creation = 1; */
|
|
if (message.Event.oneofKind === "Creation")
|
|
EngineRuleEventTriggerCreation.internalBinaryWrite(message.Event.Creation, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleEventTriggerDeletion Deletion = 2; */
|
|
if (message.Event.oneofKind === "Deletion")
|
|
EngineRuleEventTriggerDeletion.internalBinaryWrite(message.Event.Deletion, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleEventTriggerStatusChange StatusChange = 3; */
|
|
if (message.Event.oneofKind === "StatusChange")
|
|
EngineRuleEventTriggerStatusChange.internalBinaryWrite(message.Event.StatusChange, writer.tag(3, 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.EngineRuleEventTrigger
|
|
*/
|
|
export const EngineRuleEventTrigger = new EngineRuleEventTrigger$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleEventTriggerCreation$Type extends MessageType<EngineRuleEventTriggerCreation> {
|
|
constructor() {
|
|
super("api.EngineRuleEventTriggerCreation", []);
|
|
}
|
|
create(value?: PartialMessage<EngineRuleEventTriggerCreation>): EngineRuleEventTriggerCreation {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleEventTriggerCreation>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleEventTriggerCreation): EngineRuleEventTriggerCreation {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
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: EngineRuleEventTriggerCreation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleEventTriggerCreation
|
|
*/
|
|
export const EngineRuleEventTriggerCreation = new EngineRuleEventTriggerCreation$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleEventTriggerDeletion$Type extends MessageType<EngineRuleEventTriggerDeletion> {
|
|
constructor() {
|
|
super("api.EngineRuleEventTriggerDeletion", []);
|
|
}
|
|
create(value?: PartialMessage<EngineRuleEventTriggerDeletion>): EngineRuleEventTriggerDeletion {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleEventTriggerDeletion>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleEventTriggerDeletion): EngineRuleEventTriggerDeletion {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
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: EngineRuleEventTriggerDeletion, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleEventTriggerDeletion
|
|
*/
|
|
export const EngineRuleEventTriggerDeletion = new EngineRuleEventTriggerDeletion$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleEventTriggerStatusChange$Type extends MessageType<EngineRuleEventTriggerStatusChange> {
|
|
constructor() {
|
|
super("api.EngineRuleEventTriggerStatusChange", [
|
|
{ no: 1, name: "OrderStatus", kind: "enum", localName: "OrderStatus", jsonName: "OrderStatus", oneof: "StatusCode", T: () => ["api.OrderStatusCode", OrderStatusCode] },
|
|
{ no: 2, name: "HandlingunitStatus", kind: "enum", localName: "HandlingunitStatus", jsonName: "HandlingunitStatus", oneof: "StatusCode", T: () => ["api.HandlingunitStatusCode", HandlingunitStatusCode] },
|
|
{ no: 3, name: "AppointmentStatus", kind: "enum", localName: "AppointmentStatus", jsonName: "AppointmentStatus", oneof: "StatusCode", T: () => ["api.AppointmentStatusCode", AppointmentStatusCode] },
|
|
{ no: 4, name: "ClaimStatus", kind: "enum", localName: "ClaimStatus", jsonName: "ClaimStatus", oneof: "StatusCode", T: () => ["api.ClaimStatus", ClaimStatus] },
|
|
{ no: 5, name: "ActorStatus", kind: "enum", localName: "ActorStatus", jsonName: "ActorStatus", oneof: "StatusCode", T: () => ["api.ActorStatusCode", ActorStatusCode] },
|
|
{ no: 6, name: "ItemStatus", kind: "enum", localName: "ItemStatus", jsonName: "ItemStatus", oneof: "StatusCode", T: () => ["api.ItemStatusCode", ItemStatusCode] },
|
|
{ no: 7, name: "ExecutionflowStatus", kind: "enum", localName: "ExecutionflowStatus", jsonName: "ExecutionflowStatus", oneof: "StatusCode", T: () => ["api.ExecutionflowStatusCode", ExecutionflowStatusCode] },
|
|
{ no: 8, name: "PartnerStatus", kind: "enum", localName: "PartnerStatus", jsonName: "PartnerStatus", oneof: "StatusCode", T: () => ["api.PartnerStatusCode", PartnerStatusCode] },
|
|
{ no: 9, name: "StockStatus", kind: "enum", localName: "StockStatus", jsonName: "StockStatus", oneof: "StatusCode", T: () => ["api.StockStatusCode", StockStatusCode] },
|
|
{ no: 10, name: "MovementStatus", kind: "enum", localName: "MovementStatus", jsonName: "MovementStatus", oneof: "StatusCode", T: () => ["api.MovementStatusCode", MovementStatusCode] }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["StatusCode"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleEventTriggerStatusChange>): EngineRuleEventTriggerStatusChange {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.StatusCode = { oneofKind: undefined };
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleEventTriggerStatusChange>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleEventTriggerStatusChange): EngineRuleEventTriggerStatusChange {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.OrderStatusCode OrderStatus */ 1:
|
|
message.StatusCode = {
|
|
oneofKind: "OrderStatus",
|
|
OrderStatus: reader.int32()
|
|
};
|
|
break;
|
|
case /* api.HandlingunitStatusCode HandlingunitStatus */ 2:
|
|
message.StatusCode = {
|
|
oneofKind: "HandlingunitStatus",
|
|
HandlingunitStatus: reader.int32()
|
|
};
|
|
break;
|
|
case /* api.AppointmentStatusCode AppointmentStatus */ 3:
|
|
message.StatusCode = {
|
|
oneofKind: "AppointmentStatus",
|
|
AppointmentStatus: reader.int32()
|
|
};
|
|
break;
|
|
case /* api.ClaimStatus ClaimStatus */ 4:
|
|
message.StatusCode = {
|
|
oneofKind: "ClaimStatus",
|
|
ClaimStatus: reader.int32()
|
|
};
|
|
break;
|
|
case /* api.ActorStatusCode ActorStatus */ 5:
|
|
message.StatusCode = {
|
|
oneofKind: "ActorStatus",
|
|
ActorStatus: reader.int32()
|
|
};
|
|
break;
|
|
case /* api.ItemStatusCode ItemStatus */ 6:
|
|
message.StatusCode = {
|
|
oneofKind: "ItemStatus",
|
|
ItemStatus: reader.int32()
|
|
};
|
|
break;
|
|
case /* api.ExecutionflowStatusCode ExecutionflowStatus */ 7:
|
|
message.StatusCode = {
|
|
oneofKind: "ExecutionflowStatus",
|
|
ExecutionflowStatus: reader.int32()
|
|
};
|
|
break;
|
|
case /* api.PartnerStatusCode PartnerStatus */ 8:
|
|
message.StatusCode = {
|
|
oneofKind: "PartnerStatus",
|
|
PartnerStatus: reader.int32()
|
|
};
|
|
break;
|
|
case /* api.StockStatusCode StockStatus */ 9:
|
|
message.StatusCode = {
|
|
oneofKind: "StockStatus",
|
|
StockStatus: reader.int32()
|
|
};
|
|
break;
|
|
case /* api.MovementStatusCode MovementStatus */ 10:
|
|
message.StatusCode = {
|
|
oneofKind: "MovementStatus",
|
|
MovementStatus: 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: EngineRuleEventTriggerStatusChange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.OrderStatusCode OrderStatus = 1; */
|
|
if (message.StatusCode.oneofKind === "OrderStatus")
|
|
writer.tag(1, WireType.Varint).int32(message.StatusCode.OrderStatus);
|
|
/* api.HandlingunitStatusCode HandlingunitStatus = 2; */
|
|
if (message.StatusCode.oneofKind === "HandlingunitStatus")
|
|
writer.tag(2, WireType.Varint).int32(message.StatusCode.HandlingunitStatus);
|
|
/* api.AppointmentStatusCode AppointmentStatus = 3; */
|
|
if (message.StatusCode.oneofKind === "AppointmentStatus")
|
|
writer.tag(3, WireType.Varint).int32(message.StatusCode.AppointmentStatus);
|
|
/* api.ClaimStatus ClaimStatus = 4; */
|
|
if (message.StatusCode.oneofKind === "ClaimStatus")
|
|
writer.tag(4, WireType.Varint).int32(message.StatusCode.ClaimStatus);
|
|
/* api.ActorStatusCode ActorStatus = 5; */
|
|
if (message.StatusCode.oneofKind === "ActorStatus")
|
|
writer.tag(5, WireType.Varint).int32(message.StatusCode.ActorStatus);
|
|
/* api.ItemStatusCode ItemStatus = 6; */
|
|
if (message.StatusCode.oneofKind === "ItemStatus")
|
|
writer.tag(6, WireType.Varint).int32(message.StatusCode.ItemStatus);
|
|
/* api.ExecutionflowStatusCode ExecutionflowStatus = 7; */
|
|
if (message.StatusCode.oneofKind === "ExecutionflowStatus")
|
|
writer.tag(7, WireType.Varint).int32(message.StatusCode.ExecutionflowStatus);
|
|
/* api.PartnerStatusCode PartnerStatus = 8; */
|
|
if (message.StatusCode.oneofKind === "PartnerStatus")
|
|
writer.tag(8, WireType.Varint).int32(message.StatusCode.PartnerStatus);
|
|
/* api.StockStatusCode StockStatus = 9; */
|
|
if (message.StatusCode.oneofKind === "StockStatus")
|
|
writer.tag(9, WireType.Varint).int32(message.StatusCode.StockStatus);
|
|
/* api.MovementStatusCode MovementStatus = 10; */
|
|
if (message.StatusCode.oneofKind === "MovementStatus")
|
|
writer.tag(10, WireType.Varint).int32(message.StatusCode.MovementStatus);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleEventTriggerStatusChange
|
|
*/
|
|
export const EngineRuleEventTriggerStatusChange = new EngineRuleEventTriggerStatusChange$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleMilestoneTrigger$Type extends MessageType<EngineRuleMilestoneTrigger> {
|
|
constructor() {
|
|
super("api.EngineRuleMilestoneTrigger", [
|
|
{ no: 1, name: "MilestoneField", kind: "scalar", localName: "MilestoneField", jsonName: "MilestoneField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["MilestoneField"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleMilestoneTrigger>): EngineRuleMilestoneTrigger {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.MilestoneField = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleMilestoneTrigger>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleMilestoneTrigger): EngineRuleMilestoneTrigger {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string MilestoneField */ 1:
|
|
message.MilestoneField = 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: EngineRuleMilestoneTrigger, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string MilestoneField = 1; */
|
|
if (message.MilestoneField !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.MilestoneField);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleMilestoneTrigger
|
|
*/
|
|
export const EngineRuleMilestoneTrigger = new EngineRuleMilestoneTrigger$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleCondition$Type extends MessageType<EngineRuleCondition> {
|
|
constructor() {
|
|
super("api.EngineRuleCondition", [
|
|
{ no: 10, name: "Field", kind: "scalar", localName: "Field", jsonName: "Field", oneof: "Criteria", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 11, name: "Collection", kind: "message", localName: "Collection", jsonName: "Collection", oneof: "Criteria", T: () => EngineRuleConditionCollectionCriteria },
|
|
{ no: 12, name: "Aggregate", kind: "message", localName: "Aggregate", jsonName: "Aggregate", oneof: "Criteria", T: () => EngineRuleConditionAggregateCriteria },
|
|
{ no: 20, name: "Operator", kind: "enum", localName: "Operator", jsonName: "Operator", T: () => ["api.EngineRuleConditionOperator", EngineRuleConditionOperator], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } },
|
|
{ no: 31, name: "LiteralValue", kind: "message", localName: "LiteralValue", jsonName: "LiteralValue", oneof: "Value", T: () => EngineRuleLiteral },
|
|
{ no: 32, name: "LiteralListValue", kind: "message", localName: "LiteralListValue", jsonName: "LiteralListValue", oneof: "Value", T: () => EngineRuleLiteralList },
|
|
{ no: 33, name: "FieldRefValue", kind: "message", localName: "FieldRefValue", jsonName: "FieldRefValue", oneof: "Value", T: () => EngineRuleFieldRef },
|
|
{ no: 34, name: "ComputedValue", kind: "message", localName: "ComputedValue", jsonName: "ComputedValue", oneof: "Value", T: () => EngineRuleComputedRef },
|
|
{ no: 35, name: "MappingValue", kind: "message", localName: "MappingValue", jsonName: "MappingValue", oneof: "Value", T: () => EngineRuleMappingRef }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Operator", "Criteria", "Value"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleCondition>): EngineRuleCondition {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Criteria = { oneofKind: undefined };
|
|
message.Operator = 0;
|
|
message.Value = { oneofKind: undefined };
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleCondition>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleCondition): EngineRuleCondition {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Field */ 10:
|
|
message.Criteria = {
|
|
oneofKind: "Field",
|
|
Field: reader.string()
|
|
};
|
|
break;
|
|
case /* api.EngineRuleConditionCollectionCriteria Collection */ 11:
|
|
message.Criteria = {
|
|
oneofKind: "Collection",
|
|
Collection: EngineRuleConditionCollectionCriteria.internalBinaryRead(reader, reader.uint32(), options, (message.Criteria as any).Collection)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleConditionAggregateCriteria Aggregate */ 12:
|
|
message.Criteria = {
|
|
oneofKind: "Aggregate",
|
|
Aggregate: EngineRuleConditionAggregateCriteria.internalBinaryRead(reader, reader.uint32(), options, (message.Criteria as any).Aggregate)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleConditionOperator Operator */ 20:
|
|
message.Operator = reader.int32();
|
|
break;
|
|
case /* api.EngineRuleLiteral LiteralValue */ 31:
|
|
message.Value = {
|
|
oneofKind: "LiteralValue",
|
|
LiteralValue: EngineRuleLiteral.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).LiteralValue)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleLiteralList LiteralListValue */ 32:
|
|
message.Value = {
|
|
oneofKind: "LiteralListValue",
|
|
LiteralListValue: EngineRuleLiteralList.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).LiteralListValue)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleFieldRef FieldRefValue */ 33:
|
|
message.Value = {
|
|
oneofKind: "FieldRefValue",
|
|
FieldRefValue: EngineRuleFieldRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).FieldRefValue)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleComputedRef ComputedValue */ 34:
|
|
message.Value = {
|
|
oneofKind: "ComputedValue",
|
|
ComputedValue: EngineRuleComputedRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).ComputedValue)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleMappingRef MappingValue */ 35:
|
|
message.Value = {
|
|
oneofKind: "MappingValue",
|
|
MappingValue: EngineRuleMappingRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).MappingValue)
|
|
};
|
|
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: EngineRuleCondition, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Field = 10; */
|
|
if (message.Criteria.oneofKind === "Field")
|
|
writer.tag(10, WireType.LengthDelimited).string(message.Criteria.Field);
|
|
/* api.EngineRuleConditionCollectionCriteria Collection = 11; */
|
|
if (message.Criteria.oneofKind === "Collection")
|
|
EngineRuleConditionCollectionCriteria.internalBinaryWrite(message.Criteria.Collection, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleConditionAggregateCriteria Aggregate = 12; */
|
|
if (message.Criteria.oneofKind === "Aggregate")
|
|
EngineRuleConditionAggregateCriteria.internalBinaryWrite(message.Criteria.Aggregate, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleConditionOperator Operator = 20; */
|
|
if (message.Operator !== 0)
|
|
writer.tag(20, WireType.Varint).int32(message.Operator);
|
|
/* api.EngineRuleLiteral LiteralValue = 31; */
|
|
if (message.Value.oneofKind === "LiteralValue")
|
|
EngineRuleLiteral.internalBinaryWrite(message.Value.LiteralValue, writer.tag(31, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleLiteralList LiteralListValue = 32; */
|
|
if (message.Value.oneofKind === "LiteralListValue")
|
|
EngineRuleLiteralList.internalBinaryWrite(message.Value.LiteralListValue, writer.tag(32, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleFieldRef FieldRefValue = 33; */
|
|
if (message.Value.oneofKind === "FieldRefValue")
|
|
EngineRuleFieldRef.internalBinaryWrite(message.Value.FieldRefValue, writer.tag(33, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleComputedRef ComputedValue = 34; */
|
|
if (message.Value.oneofKind === "ComputedValue")
|
|
EngineRuleComputedRef.internalBinaryWrite(message.Value.ComputedValue, writer.tag(34, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleMappingRef MappingValue = 35; */
|
|
if (message.Value.oneofKind === "MappingValue")
|
|
EngineRuleMappingRef.internalBinaryWrite(message.Value.MappingValue, writer.tag(35, 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.EngineRuleCondition
|
|
*/
|
|
export const EngineRuleCondition = new EngineRuleCondition$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleConditionCollectionCriteria$Type extends MessageType<EngineRuleConditionCollectionCriteria> {
|
|
constructor() {
|
|
super("api.EngineRuleConditionCollectionCriteria", [
|
|
{ no: 1, name: "CollectionPath", kind: "scalar", localName: "CollectionPath", jsonName: "CollectionPath", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 2, name: "ElementField", kind: "scalar", localName: "ElementField", jsonName: "ElementField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "Quantifier", kind: "enum", localName: "Quantifier", jsonName: "Quantifier", T: () => ["api.EngineRuleConditionQuantifier", EngineRuleConditionQuantifier], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["CollectionPath", "ElementField", "Quantifier"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleConditionCollectionCriteria>): EngineRuleConditionCollectionCriteria {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.CollectionPath = "";
|
|
message.ElementField = "";
|
|
message.Quantifier = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleConditionCollectionCriteria>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleConditionCollectionCriteria): EngineRuleConditionCollectionCriteria {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string CollectionPath */ 1:
|
|
message.CollectionPath = reader.string();
|
|
break;
|
|
case /* string ElementField */ 2:
|
|
message.ElementField = reader.string();
|
|
break;
|
|
case /* api.EngineRuleConditionQuantifier Quantifier */ 3:
|
|
message.Quantifier = 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: EngineRuleConditionCollectionCriteria, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string CollectionPath = 1; */
|
|
if (message.CollectionPath !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.CollectionPath);
|
|
/* string ElementField = 2; */
|
|
if (message.ElementField !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.ElementField);
|
|
/* api.EngineRuleConditionQuantifier Quantifier = 3; */
|
|
if (message.Quantifier !== 0)
|
|
writer.tag(3, WireType.Varint).int32(message.Quantifier);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleConditionCollectionCriteria
|
|
*/
|
|
export const EngineRuleConditionCollectionCriteria = new EngineRuleConditionCollectionCriteria$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleConditionAggregateCriteria$Type extends MessageType<EngineRuleConditionAggregateCriteria> {
|
|
constructor() {
|
|
super("api.EngineRuleConditionAggregateCriteria", [
|
|
{ no: 1, name: "Field", kind: "scalar", localName: "Field", jsonName: "Field", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "AggregateFunction", kind: "enum", localName: "AggregateFunction", jsonName: "AggregateFunction", T: () => ["api.EngineRuleConditionAggregateFunction", EngineRuleConditionAggregateFunction], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["AggregateFunction"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleConditionAggregateCriteria>): EngineRuleConditionAggregateCriteria {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Field = "";
|
|
message.AggregateFunction = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleConditionAggregateCriteria>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleConditionAggregateCriteria): EngineRuleConditionAggregateCriteria {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Field */ 1:
|
|
message.Field = reader.string();
|
|
break;
|
|
case /* api.EngineRuleConditionAggregateFunction AggregateFunction */ 2:
|
|
message.AggregateFunction = 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: EngineRuleConditionAggregateCriteria, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Field = 1; */
|
|
if (message.Field !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Field);
|
|
/* api.EngineRuleConditionAggregateFunction AggregateFunction = 2; */
|
|
if (message.AggregateFunction !== 0)
|
|
writer.tag(2, WireType.Varint).int32(message.AggregateFunction);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleConditionAggregateCriteria
|
|
*/
|
|
export const EngineRuleConditionAggregateCriteria = new EngineRuleConditionAggregateCriteria$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleLiteral$Type extends MessageType<EngineRuleLiteral> {
|
|
constructor() {
|
|
super("api.EngineRuleLiteral", [
|
|
{ no: 1, name: "Integer", kind: "scalar", localName: "Integer", jsonName: "Integer", oneof: "Literal", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
{ no: 2, name: "Decimal", kind: "scalar", localName: "Decimal", jsonName: "Decimal", oneof: "Literal", T: 2 /*ScalarType.FLOAT*/ },
|
|
{ no: 3, name: "String", kind: "scalar", localName: "String", jsonName: "String", oneof: "Literal", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 4, name: "Boolean", kind: "scalar", localName: "Boolean", jsonName: "Boolean", oneof: "Literal", T: 8 /*ScalarType.BOOL*/ }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Literal"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleLiteral>): EngineRuleLiteral {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Literal = { oneofKind: undefined };
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleLiteral>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleLiteral): EngineRuleLiteral {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* int64 Integer */ 1:
|
|
message.Literal = {
|
|
oneofKind: "Integer",
|
|
Integer: reader.int64().toBigInt()
|
|
};
|
|
break;
|
|
case /* float Decimal */ 2:
|
|
message.Literal = {
|
|
oneofKind: "Decimal",
|
|
Decimal: reader.float()
|
|
};
|
|
break;
|
|
case /* string String */ 3:
|
|
message.Literal = {
|
|
oneofKind: "String",
|
|
String: reader.string()
|
|
};
|
|
break;
|
|
case /* bool Boolean */ 4:
|
|
message.Literal = {
|
|
oneofKind: "Boolean",
|
|
Boolean: 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: EngineRuleLiteral, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* int64 Integer = 1; */
|
|
if (message.Literal.oneofKind === "Integer")
|
|
writer.tag(1, WireType.Varint).int64(message.Literal.Integer);
|
|
/* float Decimal = 2; */
|
|
if (message.Literal.oneofKind === "Decimal")
|
|
writer.tag(2, WireType.Bit32).float(message.Literal.Decimal);
|
|
/* string String = 3; */
|
|
if (message.Literal.oneofKind === "String")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.Literal.String);
|
|
/* bool Boolean = 4; */
|
|
if (message.Literal.oneofKind === "Boolean")
|
|
writer.tag(4, WireType.Varint).bool(message.Literal.Boolean);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleLiteral
|
|
*/
|
|
export const EngineRuleLiteral = new EngineRuleLiteral$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleLiteralList$Type extends MessageType<EngineRuleLiteralList> {
|
|
constructor() {
|
|
super("api.EngineRuleLiteralList", [
|
|
{ no: 1, name: "Items", kind: "message", localName: "Items", jsonName: "Items", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EngineRuleLiteral, options: { "n1validate.rules": { repeated: { minItems: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Items"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleLiteralList>): EngineRuleLiteralList {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Items = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleLiteralList>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleLiteralList): EngineRuleLiteralList {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated api.EngineRuleLiteral Items */ 1:
|
|
message.Items.push(EngineRuleLiteral.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: EngineRuleLiteralList, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated api.EngineRuleLiteral Items = 1; */
|
|
for (let i = 0; i < message.Items.length; i++)
|
|
EngineRuleLiteral.internalBinaryWrite(message.Items[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.EngineRuleLiteralList
|
|
*/
|
|
export const EngineRuleLiteralList = new EngineRuleLiteralList$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleFieldRef$Type extends MessageType<EngineRuleFieldRef> {
|
|
constructor() {
|
|
super("api.EngineRuleFieldRef", [
|
|
{ no: 1, name: "Path", kind: "scalar", localName: "Path", jsonName: "Path", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 2, name: "Scope", kind: "enum", localName: "Scope", jsonName: "Scope", T: () => ["api.EngineRuleFieldRefScope", EngineRuleFieldRefScope], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Path", "Scope"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleFieldRef>): EngineRuleFieldRef {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Path = "";
|
|
message.Scope = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleFieldRef>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleFieldRef): EngineRuleFieldRef {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Path */ 1:
|
|
message.Path = reader.string();
|
|
break;
|
|
case /* api.EngineRuleFieldRefScope Scope */ 2:
|
|
message.Scope = 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: EngineRuleFieldRef, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Path = 1; */
|
|
if (message.Path !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Path);
|
|
/* api.EngineRuleFieldRefScope Scope = 2; */
|
|
if (message.Scope !== 0)
|
|
writer.tag(2, WireType.Varint).int32(message.Scope);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleFieldRef
|
|
*/
|
|
export const EngineRuleFieldRef = new EngineRuleFieldRef$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleComputedRef$Type extends MessageType<EngineRuleComputedRef> {
|
|
constructor() {
|
|
super("api.EngineRuleComputedRef", [
|
|
{ no: 1, name: "ComputationID", kind: "scalar", localName: "ComputationID", jsonName: "ComputationID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ComputationID"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleComputedRef>): EngineRuleComputedRef {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ComputationID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleComputedRef>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleComputedRef): EngineRuleComputedRef {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ComputationID */ 1:
|
|
message.ComputationID = 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: EngineRuleComputedRef, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ComputationID = 1; */
|
|
if (message.ComputationID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.ComputationID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleComputedRef
|
|
*/
|
|
export const EngineRuleComputedRef = new EngineRuleComputedRef$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleMappingRef$Type extends MessageType<EngineRuleMappingRef> {
|
|
constructor() {
|
|
super("api.EngineRuleMappingRef", [
|
|
{ no: 1, name: "MappingID", kind: "scalar", localName: "MappingID", jsonName: "MappingID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["MappingID"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleMappingRef>): EngineRuleMappingRef {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.MappingID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleMappingRef>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleMappingRef): EngineRuleMappingRef {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string MappingID */ 1:
|
|
message.MappingID = 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: EngineRuleMappingRef, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string MappingID = 1; */
|
|
if (message.MappingID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.MappingID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleMappingRef
|
|
*/
|
|
export const EngineRuleMappingRef = new EngineRuleMappingRef$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleAction$Type extends MessageType<EngineRuleAction> {
|
|
constructor() {
|
|
super("api.EngineRuleAction", [
|
|
{ no: 1, name: "CreateClaim", kind: "message", localName: "CreateClaim", jsonName: "CreateClaim", oneof: "Action", T: () => EngineRuleActionCreateClaim },
|
|
{ no: 2, name: "UpdateMetadata", kind: "message", localName: "UpdateMetadata", jsonName: "UpdateMetadata", oneof: "Action", T: () => EngineRuleActionUpdateMetadata },
|
|
{ no: 3, name: "CreateAlert", kind: "message", localName: "CreateAlert", jsonName: "CreateAlert", oneof: "Action", T: () => EngineRuleActionCreateAlert }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Action"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleAction>): EngineRuleAction {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Action = { oneofKind: undefined };
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleAction>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleAction): EngineRuleAction {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.EngineRuleActionCreateClaim CreateClaim */ 1:
|
|
message.Action = {
|
|
oneofKind: "CreateClaim",
|
|
CreateClaim: EngineRuleActionCreateClaim.internalBinaryRead(reader, reader.uint32(), options, (message.Action as any).CreateClaim)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleActionUpdateMetadata UpdateMetadata */ 2:
|
|
message.Action = {
|
|
oneofKind: "UpdateMetadata",
|
|
UpdateMetadata: EngineRuleActionUpdateMetadata.internalBinaryRead(reader, reader.uint32(), options, (message.Action as any).UpdateMetadata)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleActionCreateAlert CreateAlert */ 3:
|
|
message.Action = {
|
|
oneofKind: "CreateAlert",
|
|
CreateAlert: EngineRuleActionCreateAlert.internalBinaryRead(reader, reader.uint32(), options, (message.Action as any).CreateAlert)
|
|
};
|
|
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: EngineRuleAction, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.EngineRuleActionCreateClaim CreateClaim = 1; */
|
|
if (message.Action.oneofKind === "CreateClaim")
|
|
EngineRuleActionCreateClaim.internalBinaryWrite(message.Action.CreateClaim, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleActionUpdateMetadata UpdateMetadata = 2; */
|
|
if (message.Action.oneofKind === "UpdateMetadata")
|
|
EngineRuleActionUpdateMetadata.internalBinaryWrite(message.Action.UpdateMetadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleActionCreateAlert CreateAlert = 3; */
|
|
if (message.Action.oneofKind === "CreateAlert")
|
|
EngineRuleActionCreateAlert.internalBinaryWrite(message.Action.CreateAlert, writer.tag(3, 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.EngineRuleAction
|
|
*/
|
|
export const EngineRuleAction = new EngineRuleAction$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleActionCreateClaim$Type extends MessageType<EngineRuleActionCreateClaim> {
|
|
constructor() {
|
|
super("api.EngineRuleActionCreateClaim", [
|
|
{ no: 1, name: "ClaimTypeID", kind: "scalar", localName: "ClaimTypeID", jsonName: "ClaimTypeID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ClaimTypeID"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleActionCreateClaim>): EngineRuleActionCreateClaim {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ClaimTypeID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleActionCreateClaim>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleActionCreateClaim): EngineRuleActionCreateClaim {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ClaimTypeID */ 1:
|
|
message.ClaimTypeID = 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: EngineRuleActionCreateClaim, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ClaimTypeID = 1; */
|
|
if (message.ClaimTypeID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.ClaimTypeID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleActionCreateClaim
|
|
*/
|
|
export const EngineRuleActionCreateClaim = new EngineRuleActionCreateClaim$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleActionUpdateMetadata$Type extends MessageType<EngineRuleActionUpdateMetadata> {
|
|
constructor() {
|
|
super("api.EngineRuleActionUpdateMetadata", [
|
|
{ no: 1, name: "Field", kind: "scalar", localName: "Field", jsonName: "Field", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 2, name: "Value", kind: "message", localName: "Value", jsonName: "Value", T: () => EngineRuleActionAttributeValue, options: { "n1validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Field", "Value"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleActionUpdateMetadata>): EngineRuleActionUpdateMetadata {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Field = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleActionUpdateMetadata>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleActionUpdateMetadata): EngineRuleActionUpdateMetadata {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Field */ 1:
|
|
message.Field = reader.string();
|
|
break;
|
|
case /* api.EngineRuleActionAttributeValue Value */ 2:
|
|
message.Value = EngineRuleActionAttributeValue.internalBinaryRead(reader, reader.uint32(), options, message.Value);
|
|
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: EngineRuleActionUpdateMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Field = 1; */
|
|
if (message.Field !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Field);
|
|
/* api.EngineRuleActionAttributeValue Value = 2; */
|
|
if (message.Value)
|
|
EngineRuleActionAttributeValue.internalBinaryWrite(message.Value, writer.tag(2, 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.EngineRuleActionUpdateMetadata
|
|
*/
|
|
export const EngineRuleActionUpdateMetadata = new EngineRuleActionUpdateMetadata$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleActionCreateAlert$Type extends MessageType<EngineRuleActionCreateAlert> {
|
|
constructor() {
|
|
super("api.EngineRuleActionCreateAlert", [
|
|
{ no: 1, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Label"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleActionCreateAlert>): EngineRuleActionCreateAlert {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Label = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleActionCreateAlert>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleActionCreateAlert): EngineRuleActionCreateAlert {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Label */ 1:
|
|
message.Label = 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: EngineRuleActionCreateAlert, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Label = 1; */
|
|
if (message.Label !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Label);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.EngineRuleActionCreateAlert
|
|
*/
|
|
export const EngineRuleActionCreateAlert = new EngineRuleActionCreateAlert$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class EngineRuleActionAttributeValue$Type extends MessageType<EngineRuleActionAttributeValue> {
|
|
constructor() {
|
|
super("api.EngineRuleActionAttributeValue", [
|
|
{ no: 1, name: "LiteralValue", kind: "message", localName: "LiteralValue", jsonName: "LiteralValue", oneof: "Value", T: () => EngineRuleLiteral },
|
|
{ no: 2, name: "ComputedValue", kind: "message", localName: "ComputedValue", jsonName: "ComputedValue", oneof: "Value", T: () => EngineRuleComputedRef },
|
|
{ no: 3, name: "MappingValue", kind: "message", localName: "MappingValue", jsonName: "MappingValue", oneof: "Value", T: () => EngineRuleMappingRef }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Value"] } } });
|
|
}
|
|
create(value?: PartialMessage<EngineRuleActionAttributeValue>): EngineRuleActionAttributeValue {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Value = { oneofKind: undefined };
|
|
if (value !== undefined)
|
|
reflectionMergePartial<EngineRuleActionAttributeValue>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EngineRuleActionAttributeValue): EngineRuleActionAttributeValue {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.EngineRuleLiteral LiteralValue */ 1:
|
|
message.Value = {
|
|
oneofKind: "LiteralValue",
|
|
LiteralValue: EngineRuleLiteral.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).LiteralValue)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleComputedRef ComputedValue */ 2:
|
|
message.Value = {
|
|
oneofKind: "ComputedValue",
|
|
ComputedValue: EngineRuleComputedRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).ComputedValue)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleMappingRef MappingValue */ 3:
|
|
message.Value = {
|
|
oneofKind: "MappingValue",
|
|
MappingValue: EngineRuleMappingRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).MappingValue)
|
|
};
|
|
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: EngineRuleActionAttributeValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.EngineRuleLiteral LiteralValue = 1; */
|
|
if (message.Value.oneofKind === "LiteralValue")
|
|
EngineRuleLiteral.internalBinaryWrite(message.Value.LiteralValue, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleComputedRef ComputedValue = 2; */
|
|
if (message.Value.oneofKind === "ComputedValue")
|
|
EngineRuleComputedRef.internalBinaryWrite(message.Value.ComputedValue, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleMappingRef MappingValue = 3; */
|
|
if (message.Value.oneofKind === "MappingValue")
|
|
EngineRuleMappingRef.internalBinaryWrite(message.Value.MappingValue, writer.tag(3, 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.EngineRuleActionAttributeValue
|
|
*/
|
|
export const EngineRuleActionAttributeValue = new EngineRuleActionAttributeValue$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class Computation$Type extends MessageType<Computation> {
|
|
constructor() {
|
|
super("api.Computation", [
|
|
{ no: 10, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 20, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 30, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 40, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } },
|
|
{ no: 50, name: "DateDuration", kind: "message", localName: "DateDuration", jsonName: "DateDuration", oneof: "Type", T: () => ComputationDateDuration },
|
|
{ no: 51, name: "DueDate", kind: "message", localName: "DueDate", jsonName: "DueDate", oneof: "Type", T: () => ComputationDueDate },
|
|
{ no: 52, name: "StatusDuration", kind: "message", localName: "StatusDuration", jsonName: "StatusDuration", oneof: "Type", T: () => ComputationStatusDuration },
|
|
{ no: 53, name: "CustomFunction", kind: "message", localName: "CustomFunction", jsonName: "CustomFunction", oneof: "Type", T: () => ComputationCustomFunction }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Label", "Entity", "Type"] } } });
|
|
}
|
|
create(value?: PartialMessage<Computation>): Computation {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ProjectID = "";
|
|
message.ID = "";
|
|
message.Label = "";
|
|
message.Entity = 0;
|
|
message.Type = { oneofKind: undefined };
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Computation>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Computation): Computation {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ProjectID */ 10:
|
|
message.ProjectID = reader.string();
|
|
break;
|
|
case /* string ID */ 20:
|
|
message.ID = reader.string();
|
|
break;
|
|
case /* string Label */ 30:
|
|
message.Label = reader.string();
|
|
break;
|
|
case /* api.EntityType Entity */ 40:
|
|
message.Entity = reader.int32();
|
|
break;
|
|
case /* api.ComputationDateDuration DateDuration */ 50:
|
|
message.Type = {
|
|
oneofKind: "DateDuration",
|
|
DateDuration: ComputationDateDuration.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).DateDuration)
|
|
};
|
|
break;
|
|
case /* api.ComputationDueDate DueDate */ 51:
|
|
message.Type = {
|
|
oneofKind: "DueDate",
|
|
DueDate: ComputationDueDate.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).DueDate)
|
|
};
|
|
break;
|
|
case /* api.ComputationStatusDuration StatusDuration */ 52:
|
|
message.Type = {
|
|
oneofKind: "StatusDuration",
|
|
StatusDuration: ComputationStatusDuration.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).StatusDuration)
|
|
};
|
|
break;
|
|
case /* api.ComputationCustomFunction CustomFunction */ 53:
|
|
message.Type = {
|
|
oneofKind: "CustomFunction",
|
|
CustomFunction: ComputationCustomFunction.internalBinaryRead(reader, reader.uint32(), options, (message.Type as any).CustomFunction)
|
|
};
|
|
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: Computation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ProjectID = 10; */
|
|
if (message.ProjectID !== "")
|
|
writer.tag(10, WireType.LengthDelimited).string(message.ProjectID);
|
|
/* string ID = 20; */
|
|
if (message.ID !== "")
|
|
writer.tag(20, WireType.LengthDelimited).string(message.ID);
|
|
/* string Label = 30; */
|
|
if (message.Label !== "")
|
|
writer.tag(30, WireType.LengthDelimited).string(message.Label);
|
|
/* api.EntityType Entity = 40; */
|
|
if (message.Entity !== 0)
|
|
writer.tag(40, WireType.Varint).int32(message.Entity);
|
|
/* api.ComputationDateDuration DateDuration = 50; */
|
|
if (message.Type.oneofKind === "DateDuration")
|
|
ComputationDateDuration.internalBinaryWrite(message.Type.DateDuration, writer.tag(50, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.ComputationDueDate DueDate = 51; */
|
|
if (message.Type.oneofKind === "DueDate")
|
|
ComputationDueDate.internalBinaryWrite(message.Type.DueDate, writer.tag(51, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.ComputationStatusDuration StatusDuration = 52; */
|
|
if (message.Type.oneofKind === "StatusDuration")
|
|
ComputationStatusDuration.internalBinaryWrite(message.Type.StatusDuration, writer.tag(52, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.ComputationCustomFunction CustomFunction = 53; */
|
|
if (message.Type.oneofKind === "CustomFunction")
|
|
ComputationCustomFunction.internalBinaryWrite(message.Type.CustomFunction, writer.tag(53, 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.Computation
|
|
*/
|
|
export const Computation = new Computation$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ComputationDateDuration$Type extends MessageType<ComputationDateDuration> {
|
|
constructor() {
|
|
super("api.ComputationDateDuration", [
|
|
{ no: 1, name: "StartDateField", kind: "scalar", localName: "StartDateField", jsonName: "StartDateField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 2, name: "EndDateField", kind: "scalar", localName: "EndDateField", jsonName: "EndDateField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "DurationFormat", kind: "message", localName: "DurationFormat", jsonName: "DurationFormat", T: () => ComputationDurationFormat, options: { "n1validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["StartDateField", "EndDateField", "DurationFormat"] } } });
|
|
}
|
|
create(value?: PartialMessage<ComputationDateDuration>): ComputationDateDuration {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.StartDateField = "";
|
|
message.EndDateField = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ComputationDateDuration>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationDateDuration): ComputationDateDuration {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string StartDateField */ 1:
|
|
message.StartDateField = reader.string();
|
|
break;
|
|
case /* string EndDateField */ 2:
|
|
message.EndDateField = reader.string();
|
|
break;
|
|
case /* api.ComputationDurationFormat DurationFormat */ 3:
|
|
message.DurationFormat = ComputationDurationFormat.internalBinaryRead(reader, reader.uint32(), options, message.DurationFormat);
|
|
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: ComputationDateDuration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string StartDateField = 1; */
|
|
if (message.StartDateField !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.StartDateField);
|
|
/* string EndDateField = 2; */
|
|
if (message.EndDateField !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.EndDateField);
|
|
/* api.ComputationDurationFormat DurationFormat = 3; */
|
|
if (message.DurationFormat)
|
|
ComputationDurationFormat.internalBinaryWrite(message.DurationFormat, writer.tag(3, 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.ComputationDateDuration
|
|
*/
|
|
export const ComputationDateDuration = new ComputationDateDuration$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ComputationDueDate$Type extends MessageType<ComputationDueDate> {
|
|
constructor() {
|
|
super("api.ComputationDueDate", [
|
|
{ no: 10, name: "ReferenceDateField", kind: "scalar", localName: "ReferenceDateField", jsonName: "ReferenceDateField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 20, name: "ComputationType", kind: "enum", localName: "ComputationType", jsonName: "ComputationType", T: () => ["api.ComputationDueDateComputationType", ComputationDueDateComputationType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } },
|
|
{ no: 31, name: "Duration", kind: "scalar", localName: "Duration", jsonName: "Duration", oneof: "Value", T: 13 /*ScalarType.UINT32*/ },
|
|
{ no: 32, name: "MappingValue", kind: "message", localName: "MappingValue", jsonName: "MappingValue", oneof: "Value", T: () => EngineRuleMappingRef },
|
|
{ no: 40, name: "DurationFormat", kind: "message", localName: "DurationFormat", jsonName: "DurationFormat", T: () => ComputationDurationFormat, options: { "n1validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ReferenceDateField", "ComputationType", "Value", "DurationFormat"] } } });
|
|
}
|
|
create(value?: PartialMessage<ComputationDueDate>): ComputationDueDate {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ReferenceDateField = "";
|
|
message.ComputationType = 0;
|
|
message.Value = { oneofKind: undefined };
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ComputationDueDate>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationDueDate): ComputationDueDate {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ReferenceDateField */ 10:
|
|
message.ReferenceDateField = reader.string();
|
|
break;
|
|
case /* api.ComputationDueDateComputationType ComputationType */ 20:
|
|
message.ComputationType = reader.int32();
|
|
break;
|
|
case /* uint32 Duration */ 31:
|
|
message.Value = {
|
|
oneofKind: "Duration",
|
|
Duration: reader.uint32()
|
|
};
|
|
break;
|
|
case /* api.EngineRuleMappingRef MappingValue */ 32:
|
|
message.Value = {
|
|
oneofKind: "MappingValue",
|
|
MappingValue: EngineRuleMappingRef.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).MappingValue)
|
|
};
|
|
break;
|
|
case /* api.ComputationDurationFormat DurationFormat */ 40:
|
|
message.DurationFormat = ComputationDurationFormat.internalBinaryRead(reader, reader.uint32(), options, message.DurationFormat);
|
|
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: ComputationDueDate, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ReferenceDateField = 10; */
|
|
if (message.ReferenceDateField !== "")
|
|
writer.tag(10, WireType.LengthDelimited).string(message.ReferenceDateField);
|
|
/* api.ComputationDueDateComputationType ComputationType = 20; */
|
|
if (message.ComputationType !== 0)
|
|
writer.tag(20, WireType.Varint).int32(message.ComputationType);
|
|
/* uint32 Duration = 31; */
|
|
if (message.Value.oneofKind === "Duration")
|
|
writer.tag(31, WireType.Varint).uint32(message.Value.Duration);
|
|
/* api.EngineRuleMappingRef MappingValue = 32; */
|
|
if (message.Value.oneofKind === "MappingValue")
|
|
EngineRuleMappingRef.internalBinaryWrite(message.Value.MappingValue, writer.tag(32, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.ComputationDurationFormat DurationFormat = 40; */
|
|
if (message.DurationFormat)
|
|
ComputationDurationFormat.internalBinaryWrite(message.DurationFormat, writer.tag(40, 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.ComputationDueDate
|
|
*/
|
|
export const ComputationDueDate = new ComputationDueDate$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ComputationStatusDuration$Type extends MessageType<ComputationStatusDuration> {
|
|
constructor() {
|
|
super("api.ComputationStatusDuration", [
|
|
{ no: 1, name: "StatusCodes", kind: "scalar", localName: "StatusCodes", jsonName: "StatusCodes", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { repeated: { minItems: "1" } } } },
|
|
{ no: 2, name: "DurationFormat", kind: "message", localName: "DurationFormat", jsonName: "DurationFormat", T: () => ComputationDurationFormat, options: { "n1validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["StatusCodes", "DurationFormat"] } } });
|
|
}
|
|
create(value?: PartialMessage<ComputationStatusDuration>): ComputationStatusDuration {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.StatusCodes = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ComputationStatusDuration>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationStatusDuration): ComputationStatusDuration {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated string StatusCodes */ 1:
|
|
message.StatusCodes.push(reader.string());
|
|
break;
|
|
case /* api.ComputationDurationFormat DurationFormat */ 2:
|
|
message.DurationFormat = ComputationDurationFormat.internalBinaryRead(reader, reader.uint32(), options, message.DurationFormat);
|
|
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: ComputationStatusDuration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated string StatusCodes = 1; */
|
|
for (let i = 0; i < message.StatusCodes.length; i++)
|
|
writer.tag(1, WireType.LengthDelimited).string(message.StatusCodes[i]);
|
|
/* api.ComputationDurationFormat DurationFormat = 2; */
|
|
if (message.DurationFormat)
|
|
ComputationDurationFormat.internalBinaryWrite(message.DurationFormat, writer.tag(2, 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.ComputationStatusDuration
|
|
*/
|
|
export const ComputationStatusDuration = new ComputationStatusDuration$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ComputationDurationFormat$Type extends MessageType<ComputationDurationFormat> {
|
|
constructor() {
|
|
super("api.ComputationDurationFormat", [
|
|
{ no: 1, name: "Format", kind: "enum", localName: "Format", jsonName: "Format", T: () => ["api.DurationFormat", DurationFormat], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } },
|
|
{ no: 2, name: "CalendarID", kind: "scalar", localName: "CalendarID", jsonName: "CalendarID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "Rounding", kind: "enum", localName: "Rounding", jsonName: "Rounding", T: () => ["api.DurationRounding", DurationRounding], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } },
|
|
{ no: 4, name: "RoundingValue", kind: "scalar", localName: "RoundingValue", jsonName: "RoundingValue", T: 9 /*ScalarType.STRING*/ }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Format", "Rounding", "CalendarID"] } } });
|
|
}
|
|
create(value?: PartialMessage<ComputationDurationFormat>): ComputationDurationFormat {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Format = 0;
|
|
message.CalendarID = "";
|
|
message.Rounding = 0;
|
|
message.RoundingValue = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ComputationDurationFormat>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationDurationFormat): ComputationDurationFormat {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.DurationFormat Format */ 1:
|
|
message.Format = reader.int32();
|
|
break;
|
|
case /* string CalendarID */ 2:
|
|
message.CalendarID = reader.string();
|
|
break;
|
|
case /* api.DurationRounding Rounding */ 3:
|
|
message.Rounding = reader.int32();
|
|
break;
|
|
case /* string RoundingValue */ 4:
|
|
message.RoundingValue = 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: ComputationDurationFormat, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.DurationFormat Format = 1; */
|
|
if (message.Format !== 0)
|
|
writer.tag(1, WireType.Varint).int32(message.Format);
|
|
/* string CalendarID = 2; */
|
|
if (message.CalendarID !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.CalendarID);
|
|
/* api.DurationRounding Rounding = 3; */
|
|
if (message.Rounding !== 0)
|
|
writer.tag(3, WireType.Varint).int32(message.Rounding);
|
|
/* string RoundingValue = 4; */
|
|
if (message.RoundingValue !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.RoundingValue);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.ComputationDurationFormat
|
|
*/
|
|
export const ComputationDurationFormat = new ComputationDurationFormat$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ComputationCustomFunction$Type extends MessageType<ComputationCustomFunction> {
|
|
constructor() {
|
|
super("api.ComputationCustomFunction", [
|
|
{ no: 1, name: "LeftField", kind: "scalar", localName: "LeftField", jsonName: "LeftField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 2, name: "Operator", kind: "enum", localName: "Operator", jsonName: "Operator", T: () => ["api.ComputationCustomFunctionOperator", ComputationCustomFunctionOperator], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } },
|
|
{ no: 3, name: "RightField", kind: "scalar", localName: "RightField", jsonName: "RightField", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 4, name: "Format", kind: "message", localName: "Format", jsonName: "Format", T: () => ComputationCustomFunctionFormat, options: { "n1validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["LeftField", "Operator", "RightField", "Format"] } } });
|
|
}
|
|
create(value?: PartialMessage<ComputationCustomFunction>): ComputationCustomFunction {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.LeftField = "";
|
|
message.Operator = 0;
|
|
message.RightField = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ComputationCustomFunction>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationCustomFunction): ComputationCustomFunction {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string LeftField */ 1:
|
|
message.LeftField = reader.string();
|
|
break;
|
|
case /* api.ComputationCustomFunctionOperator Operator */ 2:
|
|
message.Operator = reader.int32();
|
|
break;
|
|
case /* string RightField */ 3:
|
|
message.RightField = reader.string();
|
|
break;
|
|
case /* api.ComputationCustomFunctionFormat Format */ 4:
|
|
message.Format = ComputationCustomFunctionFormat.internalBinaryRead(reader, reader.uint32(), options, message.Format);
|
|
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: ComputationCustomFunction, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string LeftField = 1; */
|
|
if (message.LeftField !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.LeftField);
|
|
/* api.ComputationCustomFunctionOperator Operator = 2; */
|
|
if (message.Operator !== 0)
|
|
writer.tag(2, WireType.Varint).int32(message.Operator);
|
|
/* string RightField = 3; */
|
|
if (message.RightField !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.RightField);
|
|
/* api.ComputationCustomFunctionFormat Format = 4; */
|
|
if (message.Format)
|
|
ComputationCustomFunctionFormat.internalBinaryWrite(message.Format, writer.tag(4, 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.ComputationCustomFunction
|
|
*/
|
|
export const ComputationCustomFunction = new ComputationCustomFunction$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ComputationCustomFunctionFormat$Type extends MessageType<ComputationCustomFunctionFormat> {
|
|
constructor() {
|
|
super("api.ComputationCustomFunctionFormat", [
|
|
{ no: 1, name: "Format", kind: "enum", localName: "Format", jsonName: "Format", T: () => ["api.CustomFunctionFormat", CustomFunctionFormat], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } },
|
|
{ no: 2, name: "Precision", kind: "scalar", localName: "Precision", jsonName: "Precision", T: 13 /*ScalarType.UINT32*/, options: { "n1validate.rules": { uint32: { gte: 0 } } } },
|
|
{ no: 3, name: "Rounding", kind: "enum", localName: "Rounding", jsonName: "Rounding", T: () => ["api.CustomFunctionRounding", CustomFunctionRounding], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Format", "Rounding", "Precision"] } } });
|
|
}
|
|
create(value?: PartialMessage<ComputationCustomFunctionFormat>): ComputationCustomFunctionFormat {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Format = 0;
|
|
message.Precision = 0;
|
|
message.Rounding = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ComputationCustomFunctionFormat>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputationCustomFunctionFormat): ComputationCustomFunctionFormat {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.CustomFunctionFormat Format */ 1:
|
|
message.Format = reader.int32();
|
|
break;
|
|
case /* uint32 Precision */ 2:
|
|
message.Precision = reader.uint32();
|
|
break;
|
|
case /* api.CustomFunctionRounding Rounding */ 3:
|
|
message.Rounding = 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: ComputationCustomFunctionFormat, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.CustomFunctionFormat Format = 1; */
|
|
if (message.Format !== 0)
|
|
writer.tag(1, WireType.Varint).int32(message.Format);
|
|
/* uint32 Precision = 2; */
|
|
if (message.Precision !== 0)
|
|
writer.tag(2, WireType.Varint).uint32(message.Precision);
|
|
/* api.CustomFunctionRounding Rounding = 3; */
|
|
if (message.Rounding !== 0)
|
|
writer.tag(3, WireType.Varint).int32(message.Rounding);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.ComputationCustomFunctionFormat
|
|
*/
|
|
export const ComputationCustomFunctionFormat = new ComputationCustomFunctionFormat$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MappingTable$Type extends MessageType<MappingTable> {
|
|
constructor() {
|
|
super("api.MappingTable", [
|
|
{ no: 10, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 20, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 30, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 40, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } },
|
|
{ no: 50, name: "InputFields", kind: "message", localName: "InputFields", jsonName: "InputFields", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MappingTableInputDescription, options: { "n1validate.rules": { repeated: { minItems: "1" } } } },
|
|
{ no: 60, name: "OutputField", kind: "message", localName: "OutputField", jsonName: "OutputField", T: () => MappingTableOutputField, options: { "n1validate.rules": { message: { required: true } } } },
|
|
{ no: 70, name: "Entries", kind: "message", localName: "Entries", jsonName: "Entries", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MappingTableEntry, options: { "n1validate.rules": { repeated: { minItems: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Label", "InputFields", "OutputField", "Entries", "Entity"] } } });
|
|
}
|
|
create(value?: PartialMessage<MappingTable>): MappingTable {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ProjectID = "";
|
|
message.ID = "";
|
|
message.Label = "";
|
|
message.Entity = 0;
|
|
message.InputFields = [];
|
|
message.Entries = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MappingTable>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MappingTable): MappingTable {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ProjectID */ 10:
|
|
message.ProjectID = reader.string();
|
|
break;
|
|
case /* string ID */ 20:
|
|
message.ID = reader.string();
|
|
break;
|
|
case /* string Label */ 30:
|
|
message.Label = reader.string();
|
|
break;
|
|
case /* api.EntityType Entity */ 40:
|
|
message.Entity = reader.int32();
|
|
break;
|
|
case /* repeated api.MappingTableInputDescription InputFields */ 50:
|
|
message.InputFields.push(MappingTableInputDescription.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* api.MappingTableOutputField OutputField */ 60:
|
|
message.OutputField = MappingTableOutputField.internalBinaryRead(reader, reader.uint32(), options, message.OutputField);
|
|
break;
|
|
case /* repeated api.MappingTableEntry Entries */ 70:
|
|
message.Entries.push(MappingTableEntry.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: MappingTable, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ProjectID = 10; */
|
|
if (message.ProjectID !== "")
|
|
writer.tag(10, WireType.LengthDelimited).string(message.ProjectID);
|
|
/* string ID = 20; */
|
|
if (message.ID !== "")
|
|
writer.tag(20, WireType.LengthDelimited).string(message.ID);
|
|
/* string Label = 30; */
|
|
if (message.Label !== "")
|
|
writer.tag(30, WireType.LengthDelimited).string(message.Label);
|
|
/* api.EntityType Entity = 40; */
|
|
if (message.Entity !== 0)
|
|
writer.tag(40, WireType.Varint).int32(message.Entity);
|
|
/* repeated api.MappingTableInputDescription InputFields = 50; */
|
|
for (let i = 0; i < message.InputFields.length; i++)
|
|
MappingTableInputDescription.internalBinaryWrite(message.InputFields[i], writer.tag(50, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.MappingTableOutputField OutputField = 60; */
|
|
if (message.OutputField)
|
|
MappingTableOutputField.internalBinaryWrite(message.OutputField, writer.tag(60, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.MappingTableEntry Entries = 70; */
|
|
for (let i = 0; i < message.Entries.length; i++)
|
|
MappingTableEntry.internalBinaryWrite(message.Entries[i], writer.tag(70, 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.MappingTable
|
|
*/
|
|
export const MappingTable = new MappingTable$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MappingTableInputDescription$Type extends MessageType<MappingTableInputDescription> {
|
|
constructor() {
|
|
super("api.MappingTableInputDescription", [
|
|
{ no: 1, name: "Field", kind: "scalar", localName: "Field", jsonName: "Field", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 2, name: "Granularity", kind: "enum", localName: "Granularity", jsonName: "Granularity", T: () => ["api.MappingTableInputDescriptionGranularity", MappingTableInputDescriptionGranularity], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<MappingTableInputDescription>): MappingTableInputDescription {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Field = "";
|
|
message.Granularity = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MappingTableInputDescription>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MappingTableInputDescription): MappingTableInputDescription {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Field */ 1:
|
|
message.Field = reader.string();
|
|
break;
|
|
case /* api.MappingTableInputDescriptionGranularity Granularity */ 2:
|
|
message.Granularity = 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: MappingTableInputDescription, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Field = 1; */
|
|
if (message.Field !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Field);
|
|
/* api.MappingTableInputDescriptionGranularity Granularity = 2; */
|
|
if (message.Granularity !== 0)
|
|
writer.tag(2, WireType.Varint).int32(message.Granularity);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MappingTableInputDescription
|
|
*/
|
|
export const MappingTableInputDescription = new MappingTableInputDescription$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MappingTableEntry$Type extends MessageType<MappingTableEntry> {
|
|
constructor() {
|
|
super("api.MappingTableEntry", [
|
|
{ no: 1, name: "Inputs", kind: "message", localName: "Inputs", jsonName: "Inputs", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MappingTableInput, options: { "n1validate.rules": { repeated: { minItems: "1" } } } },
|
|
{ no: 2, name: "OutputValue", kind: "message", localName: "OutputValue", jsonName: "OutputValue", T: () => EngineRuleLiteral, options: { "n1validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Inputs", "OutputValue"] } } });
|
|
}
|
|
create(value?: PartialMessage<MappingTableEntry>): MappingTableEntry {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Inputs = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MappingTableEntry>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MappingTableEntry): MappingTableEntry {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated api.MappingTableInput Inputs */ 1:
|
|
message.Inputs.push(MappingTableInput.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* api.EngineRuleLiteral OutputValue */ 2:
|
|
message.OutputValue = EngineRuleLiteral.internalBinaryRead(reader, reader.uint32(), options, message.OutputValue);
|
|
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: MappingTableEntry, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated api.MappingTableInput Inputs = 1; */
|
|
for (let i = 0; i < message.Inputs.length; i++)
|
|
MappingTableInput.internalBinaryWrite(message.Inputs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EngineRuleLiteral OutputValue = 2; */
|
|
if (message.OutputValue)
|
|
EngineRuleLiteral.internalBinaryWrite(message.OutputValue, writer.tag(2, 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.MappingTableEntry
|
|
*/
|
|
export const MappingTableEntry = new MappingTableEntry$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MappingTableInput$Type extends MessageType<MappingTableInput> {
|
|
constructor() {
|
|
super("api.MappingTableInput", [
|
|
{ no: 10, name: "Field", kind: "scalar", localName: "Field", jsonName: "Field", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 20, name: "Literal", kind: "message", localName: "Literal", jsonName: "Literal", oneof: "Value", T: () => EngineRuleLiteral, options: { "n1validate.rules": { message: { required: true } } } },
|
|
{ no: 22, name: "LiteralList", kind: "message", localName: "LiteralList", jsonName: "LiteralList", oneof: "Value", T: () => EngineRuleLiteralList },
|
|
{ no: 21, name: "AllValuesMatch", kind: "scalar", localName: "AllValuesMatch", jsonName: "AllValuesMatch", oneof: "Value", T: 8 /*ScalarType.BOOL*/ },
|
|
{ no: 30, name: "Operator", kind: "enum", localName: "Operator", jsonName: "Operator", T: () => ["api.MappingTableInputOperator", MappingTableInputOperator], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Field", "Value"] } } });
|
|
}
|
|
create(value?: PartialMessage<MappingTableInput>): MappingTableInput {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Field = "";
|
|
message.Value = { oneofKind: undefined };
|
|
message.Operator = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MappingTableInput>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MappingTableInput): MappingTableInput {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Field */ 10:
|
|
message.Field = reader.string();
|
|
break;
|
|
case /* api.EngineRuleLiteral Literal */ 20:
|
|
message.Value = {
|
|
oneofKind: "Literal",
|
|
Literal: EngineRuleLiteral.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).Literal)
|
|
};
|
|
break;
|
|
case /* api.EngineRuleLiteralList LiteralList */ 22:
|
|
message.Value = {
|
|
oneofKind: "LiteralList",
|
|
LiteralList: EngineRuleLiteralList.internalBinaryRead(reader, reader.uint32(), options, (message.Value as any).LiteralList)
|
|
};
|
|
break;
|
|
case /* bool AllValuesMatch */ 21:
|
|
message.Value = {
|
|
oneofKind: "AllValuesMatch",
|
|
AllValuesMatch: reader.bool()
|
|
};
|
|
break;
|
|
case /* api.MappingTableInputOperator Operator */ 30:
|
|
message.Operator = 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: MappingTableInput, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Field = 10; */
|
|
if (message.Field !== "")
|
|
writer.tag(10, WireType.LengthDelimited).string(message.Field);
|
|
/* api.EngineRuleLiteral Literal = 20; */
|
|
if (message.Value.oneofKind === "Literal")
|
|
EngineRuleLiteral.internalBinaryWrite(message.Value.Literal, writer.tag(20, WireType.LengthDelimited).fork(), options).join();
|
|
/* bool AllValuesMatch = 21; */
|
|
if (message.Value.oneofKind === "AllValuesMatch")
|
|
writer.tag(21, WireType.Varint).bool(message.Value.AllValuesMatch);
|
|
/* api.EngineRuleLiteralList LiteralList = 22; */
|
|
if (message.Value.oneofKind === "LiteralList")
|
|
EngineRuleLiteralList.internalBinaryWrite(message.Value.LiteralList, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.MappingTableInputOperator Operator = 30; */
|
|
if (message.Operator !== 0)
|
|
writer.tag(30, WireType.Varint).int32(message.Operator);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MappingTableInput
|
|
*/
|
|
export const MappingTableInput = new MappingTableInput$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class MappingTableOutputField$Type extends MessageType<MappingTableOutputField> {
|
|
constructor() {
|
|
super("api.MappingTableOutputField", [
|
|
{ no: 1, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 2, name: "Type", kind: "enum", localName: "Type", jsonName: "Type", T: () => ["api.MappingTableOutputFieldType", MappingTableOutputFieldType], options: { "n1validate.rules": { enum: { definedOnly: true, notIn: [0] } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Label", "Type"] } } });
|
|
}
|
|
create(value?: PartialMessage<MappingTableOutputField>): MappingTableOutputField {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Label = "";
|
|
message.Type = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<MappingTableOutputField>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MappingTableOutputField): MappingTableOutputField {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Label */ 1:
|
|
message.Label = reader.string();
|
|
break;
|
|
case /* api.MappingTableOutputFieldType Type */ 2:
|
|
message.Type = 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: MappingTableOutputField, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Label = 1; */
|
|
if (message.Label !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Label);
|
|
/* api.MappingTableOutputFieldType Type = 2; */
|
|
if (message.Type !== 0)
|
|
writer.tag(2, WireType.Varint).int32(message.Type);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.MappingTableOutputField
|
|
*/
|
|
export const MappingTableOutputField = new MappingTableOutputField$Type();
|