UNPKG

@experteam-mx/ngx-services

Version:

Angular common services for Experteam apps

91 lines (90 loc) 2.24 kB
import { Catalog, CountryGroups, CriteriaCustom, CriteriaWithTimestamps, DependentRules, Dropdown, Field, Override, Rule, RuleByCriteria, TextConfig } from './api-customs.interfaces'; export type FieldsOut = { total: number; fields: Field[]; }; export type OverridesOut = { total: number; overrides: Override[]; }; export type CatalogsOut = { total: number; catalogs: Catalog[]; }; export type RulesOut = { total: number; rules: Rule[]; }; export type RuleOut = { rule: Rule; }; export type CriteriaIn = { origins: string[]; originGroups: string[]; originExclusions: string[]; destinations: string[]; destinationGroups: string[]; destinationExclusions: string[]; dutiable: boolean; declaredValue: { operator: number; } | null; touched?: boolean; valid?: boolean; }; export type CriteriaOut = { criteria: CriteriaCustom & CriteriaWithTimestamps; }; export type RuleIn = { ruleType: string; criteriaId: number | null; name: string; description: string | null; level: string; roleTypes: string[]; warning: string | null; attributes: AttributeIn[]; isActive: boolean; }; export type AttributeIn = { fieldId: number | null; dhlCodeId: number | null; inputType: string; inputLabel: string; inputTooltip: string | null; exclusive: boolean; exclusiveDefault: boolean; required: boolean; text: TextConfig | null; dropdown: Dropdown | null; number: number | null | { min: number | null; max: number | null; }; dependentRules: DependentRules | null; fillFrom: FillFromIn | null; overrideId: number | null; isActive: boolean; }; export type FillFromIn = { attributeIndex: number; using: string; disabled: boolean; }; export type RuleCriteriaIn = CriteriaIn & { ruleType: string | null; }; export type AttributeWithId = AttributeIn & { id: number; }; export type RulesIn = Omit<RuleIn, 'attributes'> & { id: number | null; attributes: AttributeWithId[]; }; export type CountryGroupsOut = { countryGroups: CountryGroups[]; }; export type RulesByCriteriaOut = { total: number; rules: RuleByCriteria[]; };