digicust_types 1.8.514 → 1.8.515
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.
- package/lib/contracts/index.d.ts +1 -0
- package/lib/contracts/index.js +1 -0
- package/lib/contracts/line-item-merge-settings.d.ts +39 -0
- package/lib/contracts/line-item-merge-settings.js +2 -0
- package/lib/models/digicust/documents/document-code-source-context.d.ts +18 -0
- package/lib/models/digicust/documents/document-code-source-context.js +2 -0
- package/lib/models/digicust/documents/document-types/digicust-document.model.d.ts +5 -0
- package/lib/models/digicust/execution-strategy/execution-strategy.model.d.ts +6 -0
- package/lib/models/digicust/module/index.d.ts +1 -0
- package/lib/models/digicust/module/index.js +17 -0
- package/lib/models/digicust/module/module.model.d.ts +49 -0
- package/lib/models/digicust/module/module.model.js +27 -0
- package/lib/models/digicust/multerfile.model.d.ts +1 -0
- package/package.json +1 -1
package/lib/contracts/index.d.ts
CHANGED
package/lib/contracts/index.js
CHANGED
@@ -30,3 +30,4 @@ __exportStar(require("./start-dakosy-submission.dto"), exports); // starts dakos
|
|
30
30
|
__exportStar(require("./start-data-integration.dto"), exports); // starts data integration
|
31
31
|
__exportStar(require("./start-taric-import.dto"), exports); // starts taric import
|
32
32
|
__exportStar(require("./start-data-extraction-callback.dto"), exports); // starts data extraction callback
|
33
|
+
__exportStar(require("./line-item-merge-settings"), exports); // line item merge settings
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { DigicustDocumentType } from "../models";
|
2
|
+
/** Switch between legacy hard-coded precedence and rules mode. */
|
3
|
+
export type MergeMode = "legacy" | "rules";
|
4
|
+
/** Optional reducer hook – string id now, function later when SDK grows. */
|
5
|
+
export type MergeReducerId = string;
|
6
|
+
/** One field's precedence & reducer rule. */
|
7
|
+
export interface MergeFieldRule {
|
8
|
+
/**
|
9
|
+
* Document types ranked from highest to lowest precedence.
|
10
|
+
* Single value allowed as shorthand.
|
11
|
+
*/
|
12
|
+
source: DigicustDocumentType | DigicustDocumentType[];
|
13
|
+
/** Optional reducer id (e.g. 'sum', 'first', 'concat'). */
|
14
|
+
reducer?: MergeReducerId;
|
15
|
+
}
|
16
|
+
/** Top-level settings object injected into the Line-item merger. */
|
17
|
+
export interface LineItemMergeSettings {
|
18
|
+
/** Default = 'legacy' if omitted. */
|
19
|
+
mode?: MergeMode;
|
20
|
+
/**
|
21
|
+
* Document types that, if present with items, short-circuit the merge
|
22
|
+
* and are returned verbatim (replaces hard-coded early returns).
|
23
|
+
*/
|
24
|
+
earlyReturn?: DigicustDocumentType[];
|
25
|
+
/**
|
26
|
+
* Ordered list; the first type that actually exists in the documents
|
27
|
+
* becomes the baseline "container" set.
|
28
|
+
*/
|
29
|
+
baselinePriority?: DigicustDocumentType[];
|
30
|
+
/**
|
31
|
+
* Document types that may supply candidates to merge *into* baseline.
|
32
|
+
* If omitted, the implementation uses its internal default list.
|
33
|
+
*/
|
34
|
+
mergeSources?: DigicustDocumentType[];
|
35
|
+
/** Per-field rules – if a field is absent here, default precedence applies. */
|
36
|
+
fields?: Record<string, MergeFieldRule>;
|
37
|
+
/** Optional map for custom reducer ids → implementation name (future). */
|
38
|
+
reducers?: Record<string, MergeReducerId>;
|
39
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { DocumentCodeSource } from "./document-code-source.enum";
|
2
|
+
import { ConditionModel } from "../execution-strategy/condition.model";
|
3
|
+
export interface DocumentCodeSourceContext {
|
4
|
+
source: DocumentCodeSource;
|
5
|
+
taricQueryParams?: {
|
6
|
+
itemId?: string;
|
7
|
+
countryCode?: string;
|
8
|
+
procedureMode?: string;
|
9
|
+
certificateType?: string;
|
10
|
+
};
|
11
|
+
ruleMetadata?: {
|
12
|
+
name?: string;
|
13
|
+
id?: string;
|
14
|
+
conditions?: ConditionModel[];
|
15
|
+
};
|
16
|
+
computationParams?: any;
|
17
|
+
materialId?: string;
|
18
|
+
}
|
@@ -20,6 +20,11 @@ export interface DigicustDocumentModel {
|
|
20
20
|
userDocumentStatus?: UserDocumentStatus;
|
21
21
|
subDocumentStatus?: SubDocumentStatus;
|
22
22
|
classificationStatus?: ClassificationStatus;
|
23
|
+
/**
|
24
|
+
* Special file format that requires different processing than normal OCR.
|
25
|
+
* Examples: 'xlsx', 'xml', 'csv' for structured data files.
|
26
|
+
*/
|
27
|
+
specialFileFormat?: "xlsx" | "xml" | "csv";
|
23
28
|
userEdited?: boolean;
|
24
29
|
isPseudonymized?: boolean;
|
25
30
|
processing?: ProcessingModel;
|
@@ -3,6 +3,7 @@ import { UserInputTemplate } from "../userInputTemplate";
|
|
3
3
|
import { Submission } from "./sftp-config.model";
|
4
4
|
import { UploadWidget } from "./uploadWidget";
|
5
5
|
import { MaterialEnrichmentMergeConfig } from "./material-enrichment-merge-config";
|
6
|
+
import { LineItemMergeSettings } from "../../../contracts/line-item-merge-settings";
|
6
7
|
/**
|
7
8
|
* Execution strategies are customer-configurable plans on how to process a specific case.
|
8
9
|
*/
|
@@ -327,6 +328,11 @@ export interface ExecutionStrategy {
|
|
327
328
|
*/
|
328
329
|
omitLineItemDescription?: boolean;
|
329
330
|
emailSenderAsRepresentativeEmail?: boolean;
|
331
|
+
/**
|
332
|
+
* Optional – if absent the merger operates in legacy mode.
|
333
|
+
* Safe to add to existing JSON without breaking old clients.
|
334
|
+
*/
|
335
|
+
lineItemMergeSettings?: LineItemMergeSettings;
|
330
336
|
};
|
331
337
|
dataValidation?: {
|
332
338
|
active?: boolean;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./module.model";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./module.model"), exports);
|
@@ -0,0 +1,49 @@
|
|
1
|
+
/**
|
2
|
+
* Identifies a module. Modules are different "programs" in the frontend
|
3
|
+
*/
|
4
|
+
export interface ModuleModel {
|
5
|
+
id?: string;
|
6
|
+
alias?: string;
|
7
|
+
type?: ModuleType;
|
8
|
+
active?: boolean;
|
9
|
+
executionStrategies?: {
|
10
|
+
Default?: ModuleExecStrategy;
|
11
|
+
Declaration?: ModuleExecStrategy;
|
12
|
+
PreDeclaration?: ModuleExecStrategy;
|
13
|
+
SimplifiedProcedure?: ModuleExecStrategy;
|
14
|
+
WriteupProcedure?: ModuleExecStrategy;
|
15
|
+
T1Transit?: ModuleExecStrategy;
|
16
|
+
T2Transit?: ModuleExecStrategy;
|
17
|
+
MasterData?: ModuleExecStrategy;
|
18
|
+
StakeHolderData?: ModuleExecStrategy;
|
19
|
+
};
|
20
|
+
}
|
21
|
+
interface ModuleExecStrategy {
|
22
|
+
title?: string;
|
23
|
+
executionStrategyId?: string;
|
24
|
+
alias?: string;
|
25
|
+
active?: boolean;
|
26
|
+
}
|
27
|
+
export declare enum ModuleType {
|
28
|
+
import = "Import",
|
29
|
+
export = "Export",
|
30
|
+
warehouseProcedure = "Warehouse Procedure",
|
31
|
+
transitProcedure = "Transit Procedure",
|
32
|
+
dataExtraction = "Data Extraction",
|
33
|
+
documentClassification = "Document Classification",
|
34
|
+
productClassification = "Product Classification",
|
35
|
+
statistics = "Statistics",
|
36
|
+
masterModule = "Master Module"
|
37
|
+
}
|
38
|
+
export declare enum ModuleCategory {
|
39
|
+
default = "Default",
|
40
|
+
declaration = "Declaration",
|
41
|
+
preDeclaration = "Pre Declaration",
|
42
|
+
simplifiedProcedure = "Simplified Procedure",
|
43
|
+
writeupProcedure = "Writeup Procedure",
|
44
|
+
t1Transit = "T1 Transit",
|
45
|
+
t2Transit = "T2 Transit",
|
46
|
+
masterData = "Master Data",
|
47
|
+
stakeHolderData = "StakeHolder Data"
|
48
|
+
}
|
49
|
+
export {};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ModuleCategory = exports.ModuleType = void 0;
|
4
|
+
var ModuleType;
|
5
|
+
(function (ModuleType) {
|
6
|
+
ModuleType["import"] = "Import";
|
7
|
+
ModuleType["export"] = "Export";
|
8
|
+
ModuleType["warehouseProcedure"] = "Warehouse Procedure";
|
9
|
+
ModuleType["transitProcedure"] = "Transit Procedure";
|
10
|
+
ModuleType["dataExtraction"] = "Data Extraction";
|
11
|
+
ModuleType["documentClassification"] = "Document Classification";
|
12
|
+
ModuleType["productClassification"] = "Product Classification";
|
13
|
+
ModuleType["statistics"] = "Statistics";
|
14
|
+
ModuleType["masterModule"] = "Master Module";
|
15
|
+
})(ModuleType || (exports.ModuleType = ModuleType = {}));
|
16
|
+
var ModuleCategory;
|
17
|
+
(function (ModuleCategory) {
|
18
|
+
ModuleCategory["default"] = "Default";
|
19
|
+
ModuleCategory["declaration"] = "Declaration";
|
20
|
+
ModuleCategory["preDeclaration"] = "Pre Declaration";
|
21
|
+
ModuleCategory["simplifiedProcedure"] = "Simplified Procedure";
|
22
|
+
ModuleCategory["writeupProcedure"] = "Writeup Procedure";
|
23
|
+
ModuleCategory["t1Transit"] = "T1 Transit";
|
24
|
+
ModuleCategory["t2Transit"] = "T2 Transit";
|
25
|
+
ModuleCategory["masterData"] = "Master Data";
|
26
|
+
ModuleCategory["stakeHolderData"] = "StakeHolder Data";
|
27
|
+
})(ModuleCategory || (exports.ModuleCategory = ModuleCategory = {}));
|