digicust_types 1.8.516 → 1.8.518
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { VirtualDocumentType } from "../models";
|
2
2
|
/** Switch between legacy hard-coded precedence and rules mode. */
|
3
3
|
export type MergeMode = "legacy" | "rules";
|
4
4
|
/** Optional reducer hook – string id now, function later when SDK grows. */
|
@@ -9,7 +9,7 @@ export interface MergeFieldRule {
|
|
9
9
|
* Document types ranked from highest to lowest precedence.
|
10
10
|
* Single value allowed as shorthand.
|
11
11
|
*/
|
12
|
-
source:
|
12
|
+
source: VirtualDocumentType | VirtualDocumentType[];
|
13
13
|
/** Optional reducer id (e.g. 'sum', 'first', 'concat'). */
|
14
14
|
reducer?: MergeReducerId;
|
15
15
|
}
|
@@ -21,17 +21,17 @@ export interface LineItemMergeSettings {
|
|
21
21
|
* Document types that, if present with items, short-circuit the merge
|
22
22
|
* and are returned verbatim (replaces hard-coded early returns).
|
23
23
|
*/
|
24
|
-
earlyReturn?:
|
24
|
+
earlyReturn?: VirtualDocumentType[];
|
25
25
|
/**
|
26
26
|
* Ordered list; the first type that actually exists in the documents
|
27
27
|
* becomes the baseline "container" set.
|
28
28
|
*/
|
29
|
-
baselinePriority?:
|
29
|
+
baselinePriority?: VirtualDocumentType[];
|
30
30
|
/**
|
31
31
|
* Document types that may supply candidates to merge *into* baseline.
|
32
32
|
* If omitted, the implementation uses its internal default list.
|
33
33
|
*/
|
34
|
-
mergeSources?:
|
34
|
+
mergeSources?: VirtualDocumentType[];
|
35
35
|
/** Per-field rules – if a field is absent here, default precedence applies. */
|
36
36
|
fields?: Record<string, MergeFieldRule>;
|
37
37
|
/** Optional map for custom reducer ids → implementation name (future). */
|
@@ -144,6 +144,8 @@ export interface ExecutionStrategy {
|
|
144
144
|
defaultInvoiceType?: "tax_invoice" | "proforma";
|
145
145
|
/** Between 0 and 1 */
|
146
146
|
foreignFreightCostRate?: number;
|
147
|
+
/** If true, the freight costs will be deducted from the statistical value */
|
148
|
+
autoDeductFreightCostsFromStatisticalValue?: boolean;
|
147
149
|
freightCostCalculation?: {
|
148
150
|
active?: boolean;
|
149
151
|
strategy?: "default" | "austriaWeightDependent" | "packageDependent" | "distanceDependent" | "relative" | "containerSizeDependent";
|