digicust_types 1.7.39 → 1.7.43
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/start-hs-classification.dto.d.ts +3 -0
- package/lib/contracts/start-hs-classification.dto.js +2 -0
- package/lib/helpers/cleanObject.js +1 -1
- package/lib/models/common/checkpoint.model.d.ts +21 -0
- package/lib/models/common/checkpoint.model.js +8 -0
- package/lib/models/common/country.model.d.ts +4 -0
- package/lib/models/common/country.model.js +2 -0
- package/lib/models/common/event.model.d.ts +21 -0
- package/lib/models/common/event.model.js +8 -0
- package/lib/models/common/super.d.ts +7 -0
- package/lib/models/common/super.js +2 -0
- package/lib/models/digicust/QueueWorkspaceModel.model.d.ts +12 -0
- package/lib/models/digicust/QueueWorkspaceModel.model.js +2 -0
- package/lib/models/digicust/activity.mode.d.ts +18 -0
- package/lib/models/digicust/activity.mode.js +2 -0
- package/lib/models/digicust/aggregated-case-data.model.js +2 -2
- package/lib/models/digicust/case.model.js +2 -2
- package/lib/models/digicust/company.model.d.ts +4 -0
- package/lib/models/digicust/company.model.js +2 -0
- package/lib/models/digicust/digicust-document.model.d.ts +2 -0
- package/lib/models/digicust/digicust-document.model.js +1 -1
- package/lib/models/digicust/document-code.model.d.ts +10 -0
- package/lib/models/digicust/document-code.model.js +2 -0
- package/lib/models/digicust/extractions/extraction.model.d.ts +0 -1
- package/lib/models/digicust/incoterm.enum.d.ts +17 -0
- package/lib/models/digicust/incoterm.enum.js +21 -0
- package/lib/models/digicust/index.d.ts +1 -0
- package/lib/models/digicust/index.js +1 -0
- package/lib/models/digicust/invoice-type.model.d.ts +2 -0
- package/lib/models/digicust/line-item.model.js +39 -39
- package/lib/models/digicust/notification.model.d.ts +13 -0
- package/lib/models/digicust/notification.model.js +2 -0
- package/lib/models/digicust/preference-state.model.d.ts +1 -0
- package/lib/models/digicust/shipping-type.model.d.ts +25 -0
- package/lib/models/digicust/shipping-type.model.js +21 -0
- package/lib/models/digicust/submission-case-model.d.ts +8 -0
- package/lib/models/digicust/submission-case-model.js +2 -0
- package/lib/models/digicust/transit-item.model.js +16 -16
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ var cleanObject = function (obj) {
|
|
|
13
13
|
var type = typeof value;
|
|
14
14
|
if (type === "object" && value !== null) {
|
|
15
15
|
// Recurse...
|
|
16
|
-
|
|
16
|
+
exports.cleanObject(value);
|
|
17
17
|
// ...and remove if now "empty" (NOTE: insert your definition of "empty" here)
|
|
18
18
|
if (!Object.keys(value).length) {
|
|
19
19
|
delete obj[key];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface Checkpoint {
|
|
2
|
+
id?: string;
|
|
3
|
+
customerId?: string;
|
|
4
|
+
context?: string;
|
|
5
|
+
type?: "webhook" | "email";
|
|
6
|
+
}
|
|
7
|
+
export declare enum CheckPointType {
|
|
8
|
+
webhook = "webhook",
|
|
9
|
+
mail = "email"
|
|
10
|
+
}
|
|
11
|
+
export interface WebhookCheckpoint extends Checkpoint {
|
|
12
|
+
type: "webhook";
|
|
13
|
+
url?: string;
|
|
14
|
+
method?: "GET" | "POST" | "PATCH" | "DELETE" | "PUT";
|
|
15
|
+
body?: any;
|
|
16
|
+
}
|
|
17
|
+
export interface EmailCheckpoint extends Checkpoint {
|
|
18
|
+
type: "email";
|
|
19
|
+
emailAddress?: string;
|
|
20
|
+
body?: any;
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CheckPointType = void 0;
|
|
4
|
+
var CheckPointType;
|
|
5
|
+
(function (CheckPointType) {
|
|
6
|
+
CheckPointType["webhook"] = "webhook";
|
|
7
|
+
CheckPointType["mail"] = "email";
|
|
8
|
+
})(CheckPointType = exports.CheckPointType || (exports.CheckPointType = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface Event {
|
|
2
|
+
id?: string;
|
|
3
|
+
customerId?: string;
|
|
4
|
+
context?: string;
|
|
5
|
+
type?: "webhook" | "email";
|
|
6
|
+
}
|
|
7
|
+
export declare enum EventType {
|
|
8
|
+
webhook = "webhook",
|
|
9
|
+
mail = "email"
|
|
10
|
+
}
|
|
11
|
+
export interface WebhookEvent extends Event {
|
|
12
|
+
type: "webhook";
|
|
13
|
+
url?: string;
|
|
14
|
+
method?: "GET" | "POST" | "PATCH" | "DELETE" | "PUT";
|
|
15
|
+
body?: any;
|
|
16
|
+
}
|
|
17
|
+
export interface EmailEvent extends Event {
|
|
18
|
+
type: "email";
|
|
19
|
+
emailAddress?: string;
|
|
20
|
+
body?: any;
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventType = void 0;
|
|
4
|
+
var EventType;
|
|
5
|
+
(function (EventType) {
|
|
6
|
+
EventType["webhook"] = "webhook";
|
|
7
|
+
EventType["mail"] = "email";
|
|
8
|
+
})(EventType = exports.EventType || (exports.EventType = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Money } from "../common";
|
|
2
|
+
/**
|
|
3
|
+
* Used to document usage of the service. Every activity can be tracked using this interface
|
|
4
|
+
*/
|
|
5
|
+
export interface Activity {
|
|
6
|
+
id?: string;
|
|
7
|
+
customerId?: string;
|
|
8
|
+
projectId?: string;
|
|
9
|
+
userId?: string;
|
|
10
|
+
/** An identifier of this type of activity */
|
|
11
|
+
activityName?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
timestamp?: Date;
|
|
14
|
+
caseId?: string;
|
|
15
|
+
subscriptionId?: string;
|
|
16
|
+
paid?: boolean;
|
|
17
|
+
extraCosts?: Money;
|
|
18
|
+
}
|
|
@@ -17,8 +17,8 @@ var transit_item_model_1 = require("./transit-item.model");
|
|
|
17
17
|
var condenseAggregated = function (aggregated) {
|
|
18
18
|
var _a, _b;
|
|
19
19
|
return aggregated
|
|
20
|
-
? __assign(__assign({}, aggregated), { items: (_a = aggregated.items) === null || _a === void 0 ? void 0 : _a.map(function (item) { return
|
|
21
|
-
return
|
|
20
|
+
? __assign(__assign({}, aggregated), { items: (_a = aggregated.items) === null || _a === void 0 ? void 0 : _a.map(function (item) { return line_item_model_1.condenseLineItem(item); }), transitItems: (_b = aggregated.transitItems) === null || _b === void 0 ? void 0 : _b.map(function (item) {
|
|
21
|
+
return transit_item_model_1.condenseTransitLineItem(item);
|
|
22
22
|
}) })
|
|
23
23
|
: null;
|
|
24
24
|
};
|
|
@@ -19,8 +19,8 @@ var condenseCaseModel = function (caseModel) {
|
|
|
19
19
|
var _a;
|
|
20
20
|
return caseModel
|
|
21
21
|
? __assign(__assign({}, caseModel), { documents: (_a = caseModel.documents) === null || _a === void 0 ? void 0 : _a.map(function (document) {
|
|
22
|
-
return
|
|
23
|
-
}), executionStrategy:
|
|
22
|
+
return digicust_document_model_1.condenseDocument(document);
|
|
23
|
+
}), executionStrategy: execution_strategy_model_1.condenseExecutionStrategy(caseModel.executionStrategy), aggregated: aggregated_case_data_model_1.condenseAggregated(caseModel.aggregated) })
|
|
24
24
|
: null;
|
|
25
25
|
};
|
|
26
26
|
exports.condenseCaseModel = condenseCaseModel;
|
|
@@ -3,6 +3,7 @@ import { DocumentStatus, SubDocumentStatus, UserDocumentStatus, ClassificationSt
|
|
|
3
3
|
import { RossumImportStatus } from "../rossum";
|
|
4
4
|
import { DateTimeModel } from "../common";
|
|
5
5
|
import { AnalyzerMetadataModel } from "./AnalyzerMetadataModel.model";
|
|
6
|
+
import { DocumentCode } from "./document-code.model";
|
|
6
7
|
/**
|
|
7
8
|
* Base model for different types of documents (e.g. waybills, invoices, ...)
|
|
8
9
|
*/
|
|
@@ -14,6 +15,7 @@ export interface DigicustDocumentModel {
|
|
|
14
15
|
customerId?: string;
|
|
15
16
|
fileName?: string;
|
|
16
17
|
documentType?: DigicustDocumentType;
|
|
18
|
+
documentCode?: DocumentCode;
|
|
17
19
|
documentStatus?: DocumentStatus;
|
|
18
20
|
userDocumentStatus?: UserDocumentStatus;
|
|
19
21
|
subDocumentStatus?: SubDocumentStatus;
|
|
@@ -26,7 +26,7 @@ var condenseDocument = function (document) {
|
|
|
26
26
|
var invoice = doc;
|
|
27
27
|
if (invoice.items) {
|
|
28
28
|
invoice.items = invoice.items.map(function (item) {
|
|
29
|
-
var lineItem =
|
|
29
|
+
var lineItem = line_item_model_1.condenseLineItem(item);
|
|
30
30
|
if (!lineItem) {
|
|
31
31
|
return {};
|
|
32
32
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta } from "../common";
|
|
2
|
+
import { DigicustDocumentType } from "./digicust-document-type.enum";
|
|
3
|
+
/**
|
|
4
|
+
* Coding of documents
|
|
5
|
+
*/
|
|
6
|
+
export interface DocumentCode extends Meta<DigicustDocumentType> {
|
|
7
|
+
NC_24000?: string;
|
|
8
|
+
Dokumentenarten?: string;
|
|
9
|
+
DE_I0200?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Incoterms give information on transport conditions in international trade
|
|
3
|
+
*/
|
|
4
|
+
export declare enum Incoterm {
|
|
5
|
+
EXW = "EXW",
|
|
6
|
+
FAS = "FAS",
|
|
7
|
+
FCA = "FCA",
|
|
8
|
+
FOB = "FOB",
|
|
9
|
+
CFR = "CFR",
|
|
10
|
+
CIF = "CIF",
|
|
11
|
+
CIP = "CIP",
|
|
12
|
+
CPT = "CPT",
|
|
13
|
+
DAP = "DAP",
|
|
14
|
+
DPU = "DPU",
|
|
15
|
+
DAT = "DAT",
|
|
16
|
+
DDP = "DDP"
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Incoterm = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Incoterms give information on transport conditions in international trade
|
|
6
|
+
*/
|
|
7
|
+
var Incoterm;
|
|
8
|
+
(function (Incoterm) {
|
|
9
|
+
Incoterm["EXW"] = "EXW";
|
|
10
|
+
Incoterm["FAS"] = "FAS";
|
|
11
|
+
Incoterm["FCA"] = "FCA";
|
|
12
|
+
Incoterm["FOB"] = "FOB";
|
|
13
|
+
Incoterm["CFR"] = "CFR";
|
|
14
|
+
Incoterm["CIF"] = "CIF";
|
|
15
|
+
Incoterm["CIP"] = "CIP";
|
|
16
|
+
Incoterm["CPT"] = "CPT";
|
|
17
|
+
Incoterm["DAP"] = "DAP";
|
|
18
|
+
Incoterm["DPU"] = "DPU";
|
|
19
|
+
Incoterm["DAT"] = "DAT";
|
|
20
|
+
Incoterm["DDP"] = "DDP";
|
|
21
|
+
})(Incoterm = exports.Incoterm || (exports.Incoterm = {}));
|
|
@@ -13,6 +13,7 @@ export * from "./document-status.enum";
|
|
|
13
13
|
export * from "./invoice.model";
|
|
14
14
|
export * from "./waybill.model";
|
|
15
15
|
export * from "./packingList.model";
|
|
16
|
+
export * from "./document-code.model";
|
|
16
17
|
export * from "./line-item.model";
|
|
17
18
|
export * from "./tax-details.model";
|
|
18
19
|
export * from "./uploaded-file.model";
|
|
@@ -28,6 +28,7 @@ __exportStar(require("./document-status.enum"), exports); // provides informatio
|
|
|
28
28
|
__exportStar(require("./invoice.model"), exports); // invoice document model -> inherits from digicust-document.model
|
|
29
29
|
__exportStar(require("./waybill.model"), exports); // waybill document model -> inherits from digicust-document.model
|
|
30
30
|
__exportStar(require("./packingList.model"), exports);
|
|
31
|
+
__exportStar(require("./document-code.model"), exports);
|
|
31
32
|
__exportStar(require("./line-item.model"), exports); // line items of customs documents
|
|
32
33
|
__exportStar(require("./tax-details.model"), exports); // Information about VAT on a document
|
|
33
34
|
__exportStar(require("./uploaded-file.model"), exports); // Uploaded files of customs documents
|
|
@@ -13,118 +13,118 @@ var condenseLineItem = function (lineItem) {
|
|
|
13
13
|
caseId: lineItem.caseId,
|
|
14
14
|
materialId: lineItem.materialId,
|
|
15
15
|
invoiceNumber: lineItem.invoiceNumber
|
|
16
|
-
?
|
|
16
|
+
? common_1.condenseMeta(lineItem.invoiceNumber)
|
|
17
17
|
: lineItem.invoiceNumber,
|
|
18
18
|
waybillNumber: lineItem.waybillNumber
|
|
19
|
-
?
|
|
19
|
+
? common_1.condenseMeta(lineItem.waybillNumber)
|
|
20
20
|
: lineItem.waybillNumber,
|
|
21
21
|
transitNumber: lineItem.transitNumber
|
|
22
|
-
?
|
|
22
|
+
? common_1.condenseMeta(lineItem.transitNumber)
|
|
23
23
|
: lineItem.transitNumber,
|
|
24
|
-
box40: lineItem.box40 ?
|
|
24
|
+
box40: lineItem.box40 ? common_1.condenseMeta(lineItem.box40) : lineItem.box40,
|
|
25
25
|
guaranteeNumber: lineItem.guaranteeNumber
|
|
26
|
-
?
|
|
26
|
+
? common_1.condenseMeta(lineItem.guaranteeNumber)
|
|
27
27
|
: lineItem.guaranteeNumber,
|
|
28
28
|
billOfLading: lineItem.billOfLading
|
|
29
|
-
?
|
|
29
|
+
? common_1.condenseMeta(lineItem.billOfLading)
|
|
30
30
|
: lineItem.billOfLading,
|
|
31
31
|
packingList: lineItem.packingList
|
|
32
|
-
?
|
|
32
|
+
? common_1.condenseMeta(lineItem.packingList)
|
|
33
33
|
: lineItem.packingList,
|
|
34
34
|
position: lineItem.position
|
|
35
|
-
?
|
|
35
|
+
? common_1.condenseMeta(lineItem.position)
|
|
36
36
|
: lineItem.position,
|
|
37
|
-
code: lineItem.code ?
|
|
37
|
+
code: lineItem.code ? common_1.condenseMeta(lineItem.code) : lineItem.code,
|
|
38
38
|
serialNumber: lineItem.serialNumber
|
|
39
|
-
?
|
|
39
|
+
? common_1.condenseMeta(lineItem.serialNumber)
|
|
40
40
|
: lineItem.serialNumber,
|
|
41
41
|
orderNumber: lineItem.orderNumber
|
|
42
|
-
?
|
|
42
|
+
? common_1.condenseMeta(lineItem.orderNumber)
|
|
43
43
|
: lineItem.orderNumber,
|
|
44
44
|
description: lineItem.description
|
|
45
|
-
?
|
|
45
|
+
? common_1.condenseMeta(lineItem.description)
|
|
46
46
|
: lineItem.description,
|
|
47
47
|
customsTariffNumber: lineItem.customsTariffNumber
|
|
48
|
-
?
|
|
48
|
+
? common_1.condenseCustomsTariffNumber(lineItem.customsTariffNumber)
|
|
49
49
|
: lineItem.customsTariffNumber,
|
|
50
50
|
quantity: lineItem.quantity
|
|
51
|
-
?
|
|
51
|
+
? common_1.condenseQuantity(lineItem.quantity)
|
|
52
52
|
: lineItem.quantity,
|
|
53
53
|
orderedQuantity: lineItem.orderedQuantity
|
|
54
|
-
?
|
|
54
|
+
? common_1.condenseQuantity(lineItem.orderedQuantity)
|
|
55
55
|
: lineItem.orderedQuantity,
|
|
56
56
|
unitOfMeasurement: lineItem.unitOfMeasurement
|
|
57
|
-
?
|
|
57
|
+
? common_1.condenseMeta(lineItem.unitOfMeasurement)
|
|
58
58
|
: lineItem.unitOfMeasurement,
|
|
59
59
|
countryOfOrigin: lineItem.countryOfOrigin
|
|
60
|
-
?
|
|
60
|
+
? common_1.condenseAddress(lineItem.countryOfOrigin)
|
|
61
61
|
: lineItem.countryOfOrigin,
|
|
62
62
|
itemValue: lineItem.itemValue
|
|
63
|
-
?
|
|
63
|
+
? common_1.condenseMoney(lineItem.itemValue)
|
|
64
64
|
: lineItem.itemValue,
|
|
65
65
|
discount: lineItem.discount
|
|
66
|
-
?
|
|
66
|
+
? common_1.condenseMoney(lineItem.discount)
|
|
67
67
|
: lineItem.discount,
|
|
68
68
|
currency: lineItem.currency
|
|
69
|
-
?
|
|
69
|
+
? common_1.condenseMeta(lineItem.currency)
|
|
70
70
|
: lineItem.currency,
|
|
71
71
|
totalValue: lineItem.totalValue
|
|
72
|
-
?
|
|
72
|
+
? common_1.condenseMoney(lineItem.totalValue)
|
|
73
73
|
: lineItem.totalValue,
|
|
74
74
|
customsValue: lineItem.customsValue
|
|
75
|
-
?
|
|
75
|
+
? common_1.condenseMoney(lineItem.customsValue)
|
|
76
76
|
: lineItem.customsValue,
|
|
77
77
|
netWeight: lineItem.netWeight
|
|
78
|
-
?
|
|
78
|
+
? common_1.condenseWeight(lineItem.netWeight)
|
|
79
79
|
: lineItem.netWeight,
|
|
80
80
|
totalNetWeight: lineItem.totalNetWeight
|
|
81
|
-
?
|
|
81
|
+
? common_1.condenseWeight(lineItem.totalNetWeight)
|
|
82
82
|
: lineItem.totalNetWeight,
|
|
83
83
|
grossWeight: lineItem.grossWeight
|
|
84
|
-
?
|
|
84
|
+
? common_1.condenseWeight(lineItem.grossWeight)
|
|
85
85
|
: lineItem.grossWeight,
|
|
86
86
|
totalGrossWeight: lineItem.totalGrossWeight
|
|
87
|
-
?
|
|
87
|
+
? common_1.condenseWeight(lineItem.totalGrossWeight)
|
|
88
88
|
: lineItem.totalGrossWeight,
|
|
89
89
|
itemSize: lineItem.itemSize
|
|
90
|
-
?
|
|
90
|
+
? common_1.condenseMeta(lineItem.itemSize)
|
|
91
91
|
: lineItem.itemSize,
|
|
92
92
|
buyerArticleNumber: lineItem.buyerArticleNumber
|
|
93
|
-
?
|
|
93
|
+
? common_1.condenseMeta(lineItem.buyerArticleNumber)
|
|
94
94
|
: lineItem.buyerArticleNumber,
|
|
95
95
|
buyerOrderNumber: lineItem.buyerOrderNumber
|
|
96
|
-
?
|
|
96
|
+
? common_1.condenseMeta(lineItem.buyerOrderNumber)
|
|
97
97
|
: lineItem.buyerOrderNumber,
|
|
98
98
|
material: lineItem.material
|
|
99
|
-
?
|
|
99
|
+
? common_1.condenseMeta(lineItem.material)
|
|
100
100
|
: lineItem.material,
|
|
101
101
|
materialNumber: lineItem.materialNumber
|
|
102
|
-
?
|
|
102
|
+
? common_1.condenseMeta(lineItem.materialNumber)
|
|
103
103
|
: lineItem.materialNumber,
|
|
104
|
-
CAS: lineItem.CAS ?
|
|
104
|
+
CAS: lineItem.CAS ? common_1.condenseMeta(lineItem.CAS) : lineItem.CAS,
|
|
105
105
|
deliveryNote: lineItem.deliveryNote
|
|
106
|
-
?
|
|
106
|
+
? common_1.condenseMeta(lineItem.deliveryNote)
|
|
107
107
|
: lineItem.deliveryNote,
|
|
108
108
|
procedure: lineItem.procedure
|
|
109
|
-
?
|
|
109
|
+
? common_1.condenseMeta(lineItem.procedure)
|
|
110
110
|
: lineItem.procedure,
|
|
111
111
|
units: lineItem.units,
|
|
112
112
|
preferenceState: lineItem.preferenceState
|
|
113
|
-
?
|
|
113
|
+
? common_1.condenseMeta(lineItem.preferenceState)
|
|
114
114
|
: lineItem.preferenceState,
|
|
115
115
|
documents: lineItem.documents
|
|
116
|
-
? (_a = lineItem.documents) === null || _a === void 0 ? void 0 : _a.map(function (document) { return
|
|
116
|
+
? (_a = lineItem.documents) === null || _a === void 0 ? void 0 : _a.map(function (document) { return digicust_document_model_1.condenseDocument(document); })
|
|
117
117
|
: lineItem.documents,
|
|
118
118
|
adjustments: lineItem.adjustments,
|
|
119
119
|
containers: lineItem.containers
|
|
120
|
-
? (_b = lineItem.containers) === null || _b === void 0 ? void 0 : _b.map(function (container) { return
|
|
120
|
+
? (_b = lineItem.containers) === null || _b === void 0 ? void 0 : _b.map(function (container) { return common_1.condenseMeta(container); })
|
|
121
121
|
: lineItem.containers,
|
|
122
122
|
reference: lineItem.reference
|
|
123
|
-
?
|
|
123
|
+
? common_1.condenseMeta(lineItem.reference)
|
|
124
124
|
: lineItem.reference,
|
|
125
125
|
isCondensed: true,
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
cleanObject_1.cleanObject(condensedLineItem);
|
|
128
128
|
return condensedLineItem;
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Information about a notification Model
|
|
3
|
+
*/
|
|
4
|
+
export interface NotificationsModel {
|
|
5
|
+
id?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
status?: string;
|
|
8
|
+
message?: string;
|
|
9
|
+
link?: string;
|
|
10
|
+
consumer?: string;
|
|
11
|
+
addresseeType?: "customer" | "project" | "user";
|
|
12
|
+
addresseeId?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Meta } from "../common";
|
|
2
|
+
export interface ShippingType extends Meta<ShippingMode> {
|
|
3
|
+
/** unique identifier of the transportation mean */
|
|
4
|
+
code?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
type?: ShippingTypePlace;
|
|
7
|
+
/** ISO Code of nationality of the mean */
|
|
8
|
+
countryCode?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare enum ShippingMode {
|
|
11
|
+
maritime = "Maritime",
|
|
12
|
+
rail = "Rail",
|
|
13
|
+
road = "Road",
|
|
14
|
+
air = "Air",
|
|
15
|
+
postal = "Postal",
|
|
16
|
+
fixedInstallations = "FixedInstallations",
|
|
17
|
+
inlandWaterway = "InlandWaterway",
|
|
18
|
+
unknown = "Unknown"
|
|
19
|
+
}
|
|
20
|
+
export declare enum ShippingTypePlace {
|
|
21
|
+
border = "Border",
|
|
22
|
+
arrival = "Arrival",
|
|
23
|
+
departure = "Departure",
|
|
24
|
+
inland = "Inland"
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShippingTypePlace = exports.ShippingMode = void 0;
|
|
4
|
+
var ShippingMode;
|
|
5
|
+
(function (ShippingMode) {
|
|
6
|
+
ShippingMode["maritime"] = "Maritime";
|
|
7
|
+
ShippingMode["rail"] = "Rail";
|
|
8
|
+
ShippingMode["road"] = "Road";
|
|
9
|
+
ShippingMode["air"] = "Air";
|
|
10
|
+
ShippingMode["postal"] = "Postal";
|
|
11
|
+
ShippingMode["fixedInstallations"] = "FixedInstallations";
|
|
12
|
+
ShippingMode["inlandWaterway"] = "InlandWaterway";
|
|
13
|
+
ShippingMode["unknown"] = "Unknown";
|
|
14
|
+
})(ShippingMode = exports.ShippingMode || (exports.ShippingMode = {}));
|
|
15
|
+
var ShippingTypePlace;
|
|
16
|
+
(function (ShippingTypePlace) {
|
|
17
|
+
ShippingTypePlace["border"] = "Border";
|
|
18
|
+
ShippingTypePlace["arrival"] = "Arrival";
|
|
19
|
+
ShippingTypePlace["departure"] = "Departure";
|
|
20
|
+
ShippingTypePlace["inland"] = "Inland";
|
|
21
|
+
})(ShippingTypePlace = exports.ShippingTypePlace || (exports.ShippingTypePlace = {}));
|
|
@@ -12,52 +12,52 @@ var condenseTransitLineItem = function (transitItem) {
|
|
|
12
12
|
documentId: transitItem.documentId,
|
|
13
13
|
caseId: transitItem.caseId,
|
|
14
14
|
description: transitItem.description
|
|
15
|
-
?
|
|
15
|
+
? common_1.condenseMeta(transitItem.description)
|
|
16
16
|
: transitItem.description,
|
|
17
17
|
customsTariffNumber: transitItem.customsTariffNumber
|
|
18
|
-
?
|
|
18
|
+
? common_1.condenseCustomsTariffNumber(transitItem.customsTariffNumber)
|
|
19
19
|
: transitItem.customsTariffNumber,
|
|
20
20
|
totalValue: transitItem.totalValue
|
|
21
|
-
?
|
|
21
|
+
? common_1.condenseMoney(transitItem.totalValue)
|
|
22
22
|
: transitItem.totalValue,
|
|
23
23
|
customsValue: transitItem.customsValue
|
|
24
|
-
?
|
|
24
|
+
? common_1.condenseMoney(transitItem.customsValue)
|
|
25
25
|
: transitItem.customsValue,
|
|
26
26
|
netWeight: transitItem.netWeight
|
|
27
|
-
?
|
|
27
|
+
? common_1.condenseWeight(transitItem.netWeight)
|
|
28
28
|
: transitItem.netWeight,
|
|
29
29
|
grossWeight: transitItem.grossWeight
|
|
30
|
-
?
|
|
30
|
+
? common_1.condenseWeight(transitItem.grossWeight)
|
|
31
31
|
: transitItem.grossWeight,
|
|
32
32
|
weight: transitItem.weight
|
|
33
|
-
?
|
|
33
|
+
? common_1.condenseWeight(transitItem.weight)
|
|
34
34
|
: transitItem.weight,
|
|
35
35
|
packingList: transitItem.packingList
|
|
36
|
-
?
|
|
36
|
+
? common_1.condenseMeta(transitItem.packingList)
|
|
37
37
|
: transitItem.packingList,
|
|
38
38
|
countryOfOrigin: transitItem.countryOfOrigin
|
|
39
|
-
?
|
|
39
|
+
? common_1.condenseAddress(transitItem.countryOfOrigin)
|
|
40
40
|
: transitItem.countryOfOrigin,
|
|
41
41
|
procedure: transitItem.procedure
|
|
42
|
-
?
|
|
42
|
+
? common_1.condenseMeta(transitItem.procedure)
|
|
43
43
|
: transitItem.procedure,
|
|
44
44
|
preliminaryDocuments: transitItem.preliminaryDocuments
|
|
45
|
-
? (_a = transitItem.preliminaryDocuments) === null || _a === void 0 ? void 0 : _a.map(function (document) { return
|
|
45
|
+
? (_a = transitItem.preliminaryDocuments) === null || _a === void 0 ? void 0 : _a.map(function (document) { return digicust_document_model_1.condenseDocument(document); })
|
|
46
46
|
: transitItem.preliminaryDocuments,
|
|
47
47
|
containers: transitItem.containers
|
|
48
|
-
? (_b = transitItem.containers) === null || _b === void 0 ? void 0 : _b.map(function (container) { return
|
|
48
|
+
? (_b = transitItem.containers) === null || _b === void 0 ? void 0 : _b.map(function (container) { return common_1.condenseMeta(container); })
|
|
49
49
|
: transitItem.containers,
|
|
50
50
|
reference: transitItem.reference
|
|
51
|
-
?
|
|
51
|
+
? common_1.condenseMeta(transitItem.reference)
|
|
52
52
|
: transitItem.reference,
|
|
53
53
|
shipperCountry: transitItem.shipperCountry
|
|
54
|
-
?
|
|
54
|
+
? common_1.condenseMeta(transitItem.shipperCountry)
|
|
55
55
|
: transitItem.shipperCountry,
|
|
56
56
|
destinationCountry: transitItem.destinationCountry
|
|
57
|
-
?
|
|
57
|
+
? common_1.condenseMeta(transitItem.destinationCountry)
|
|
58
58
|
: transitItem.destinationCountry
|
|
59
59
|
};
|
|
60
|
-
|
|
60
|
+
cleanObject_1.cleanObject(condensedTransitLineItem);
|
|
61
61
|
return condensedTransitLineItem;
|
|
62
62
|
}
|
|
63
63
|
return null;
|