digicust_types 1.8.22 → 1.8.24
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/helpers/cleanObject.js +4 -4
- package/lib/models/digicust/billing/subscription.model.d.ts +1 -1
- package/lib/models/digicust/case/aggregated-case-data.model.d.ts +1 -1
- package/lib/models/digicust/case/aggregated-case-data.model.js +7 -16
- package/lib/models/digicust/case/case.model.d.ts +1 -1
- package/lib/models/digicust/case/case.model.js +8 -16
- package/lib/models/digicust/customs/tariff-number/customs-tariff-number.model.js +2 -13
- package/lib/models/digicust/customs/transit-item.model.d.ts +1 -1
- package/lib/models/digicust/customs/transit-item.model.js +6 -8
- package/lib/models/digicust/documents/document-types/digicust-document.model.d.ts +3 -3
- package/lib/models/digicust/documents/document-types/digicust-document.model.js +7 -7
- package/lib/models/digicust/execution-strategy/execution-strategy.model.d.ts +1 -1
- package/lib/models/digicust/execution-strategy/execution-strategy.model.js +9 -11
- package/lib/models/digicust/frontend/dialog-window.model.d.ts +2 -2
- package/lib/models/digicust/frontend/extra-styles.model.d.ts +2 -2
- package/lib/models/digicust/frontend/frontend-big-section.model.d.ts +5 -5
- package/lib/models/digicust/frontend/frontend-fields.model.d.ts +5 -5
- package/lib/models/digicust/frontend/frontend-group.model.d.ts +2 -2
- package/lib/models/digicust/frontend/frontend-small-section.mode.d.ts +1 -1
- package/lib/models/digicust/line-item/line-item.model.d.ts +1 -1
- package/lib/models/digicust/line-item/line-item.model.js +3 -3
- package/lib/models/digicust/masterdata/material.model.d.ts +2 -2
- package/lib/models/digicust/measures/address.model.js +2 -2
- package/lib/models/digicust/measures/money/currency.enum.d.ts +178 -178
- package/lib/models/digicust/measures/money/money.model.js +2 -2
- package/lib/models/digicust/measures/quantity.model.d.ts +4 -4
- package/lib/models/digicust/measures/quantity.model.js +2 -2
- package/lib/models/digicust/measures/weight/weight.model.js +2 -2
- package/lib/models/digicust/meta/meta.d.ts +5 -5
- package/lib/models/digicust/meta/meta.js +9 -11
- package/lib/models/digicust/meta/workflow.d.ts +1 -1
- package/lib/models/ml/machine-learning-model.model.d.ts +1 -1
- package/package.json +12 -9
|
@@ -7,11 +7,11 @@ exports.cleanObject = void 0;
|
|
|
7
7
|
*
|
|
8
8
|
* @param obj The object to clean
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
|
-
Object.keys(obj).forEach(
|
|
10
|
+
const cleanObject = (obj) => {
|
|
11
|
+
Object.keys(obj).forEach((key) => {
|
|
12
12
|
// Get this value and its type
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const value = obj[key];
|
|
14
|
+
const type = typeof value;
|
|
15
15
|
if (type === "object" && value !== null) {
|
|
16
16
|
// Recurse...
|
|
17
17
|
(0, exports.cleanObject)(value);
|
|
@@ -97,4 +97,4 @@ export interface AggregatedCaseDataModel {
|
|
|
97
97
|
statisticalValue?: Money;
|
|
98
98
|
additionalInformation?: Meta<string>;
|
|
99
99
|
}
|
|
100
|
-
export declare const condenseAggregated: (aggregated?: AggregatedCaseDataModel) => AggregatedCaseDataModel
|
|
100
|
+
export declare const condenseAggregated: (aggregated?: AggregatedCaseDataModel) => AggregatedCaseDataModel;
|
|
@@ -1,24 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.condenseAggregated = void 0;
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const condenseAggregated = (aggregated) => {
|
|
17
6
|
var _a, _b;
|
|
18
7
|
return aggregated
|
|
19
|
-
?
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
? {
|
|
9
|
+
...aggregated,
|
|
10
|
+
items: (_a = aggregated.items) === null || _a === void 0 ? void 0 : _a.map((item) => (0, __1.condenseLineItem)(item)),
|
|
11
|
+
transitItems: (_b = aggregated.transitItems) === null || _b === void 0 ? void 0 : _b.map((item) => (0, __1.condenseTransitLineItem)(item)),
|
|
12
|
+
}
|
|
22
13
|
: null;
|
|
23
14
|
};
|
|
24
15
|
exports.condenseAggregated = condenseAggregated;
|
|
@@ -56,4 +56,4 @@ export interface CaseModel {
|
|
|
56
56
|
/** Information on how the case needs to be processed */
|
|
57
57
|
executionStrategy?: ExecutionStrategy;
|
|
58
58
|
}
|
|
59
|
-
export declare const condenseCaseModel: (caseModel?: CaseModel) => CaseModel
|
|
59
|
+
export declare const condenseCaseModel: (caseModel?: CaseModel) => CaseModel;
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.condenseCaseModel = void 0;
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const condenseCaseModel = (caseModel) => {
|
|
17
6
|
var _a;
|
|
18
7
|
return caseModel
|
|
19
|
-
?
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
? {
|
|
9
|
+
...caseModel,
|
|
10
|
+
documents: (_a = caseModel.documents) === null || _a === void 0 ? void 0 : _a.map((document) => (0, __1.condenseDocument)(document)),
|
|
11
|
+
executionStrategy: (0, __1.condenseExecutionStrategy)(caseModel.executionStrategy),
|
|
12
|
+
aggregated: (0, __1.condenseAggregated)(caseModel.aggregated),
|
|
13
|
+
}
|
|
22
14
|
: null;
|
|
23
15
|
};
|
|
24
16
|
exports.condenseCaseModel = condenseCaseModel;
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.condenseCustomsTariffNumber = void 0;
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
const condenseCustomsTariffNumber = (customsTariffNumber) => {
|
|
5
|
+
let condensed = { ...customsTariffNumber };
|
|
17
6
|
delete condensed.classifier;
|
|
18
7
|
condensed = JSON.parse(JSON.stringify(condensed)); // remove undefined properties
|
|
19
8
|
return condensed;
|
|
@@ -22,4 +22,4 @@ export interface TransitItemModel {
|
|
|
22
22
|
preliminaryDocuments?: DigicustDocumentModel[];
|
|
23
23
|
reference?: Meta<string>;
|
|
24
24
|
}
|
|
25
|
-
export declare const condenseTransitLineItem: (transitItem?: TransitItemModel) => TransitItemModel
|
|
25
|
+
export declare const condenseTransitLineItem: (transitItem?: TransitItemModel) => TransitItemModel;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.condenseTransitLineItem = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const cleanObject_1 = require("../../../helpers/cleanObject");
|
|
6
|
+
const condenseTransitLineItem = (transitItem) => {
|
|
7
7
|
var _a, _b;
|
|
8
8
|
if (transitItem) {
|
|
9
|
-
|
|
9
|
+
const condensedTransitLineItem = {
|
|
10
10
|
id: transitItem.id,
|
|
11
11
|
documentId: transitItem.documentId,
|
|
12
12
|
caseId: transitItem.caseId,
|
|
@@ -41,12 +41,10 @@ var condenseTransitLineItem = function (transitItem) {
|
|
|
41
41
|
? (0, __1.condenseMeta)(transitItem.procedure)
|
|
42
42
|
: transitItem.procedure,
|
|
43
43
|
preliminaryDocuments: transitItem.preliminaryDocuments
|
|
44
|
-
? (_a = transitItem.preliminaryDocuments) === null || _a === void 0 ? void 0 : _a.map(
|
|
45
|
-
return (0, __1.condenseDocument)(document);
|
|
46
|
-
})
|
|
44
|
+
? (_a = transitItem.preliminaryDocuments) === null || _a === void 0 ? void 0 : _a.map((document) => (0, __1.condenseDocument)(document))
|
|
47
45
|
: transitItem.preliminaryDocuments,
|
|
48
46
|
containers: transitItem.containers
|
|
49
|
-
? (_b = transitItem.containers) === null || _b === void 0 ? void 0 : _b.map(
|
|
47
|
+
? (_b = transitItem.containers) === null || _b === void 0 ? void 0 : _b.map((container) => (0, __1.condenseMeta)(container))
|
|
50
48
|
: transitItem.containers,
|
|
51
49
|
reference: transitItem.reference
|
|
52
50
|
? (0, __1.condenseMeta)(transitItem.reference)
|
|
@@ -30,8 +30,8 @@ export interface DigicustDocumentModel {
|
|
|
30
30
|
isCondensed?: boolean;
|
|
31
31
|
analyzerMetadata?: AnalyzerMetadataModel;
|
|
32
32
|
modifiedBy?: {
|
|
33
|
-
id?:
|
|
34
|
-
displayName?:
|
|
33
|
+
id?: string;
|
|
34
|
+
displayName?: string;
|
|
35
35
|
date?: Date;
|
|
36
36
|
};
|
|
37
37
|
uploadedFiles?: Array<UploadedFileModel>;
|
|
@@ -45,4 +45,4 @@ export interface DigicustDocumentModel {
|
|
|
45
45
|
exportOnConfirmed?: boolean;
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
export declare const condenseDocument: (document?: DigicustDocumentModel) => DigicustDocumentModel
|
|
48
|
+
export declare const condenseDocument: (document?: DigicustDocumentModel) => DigicustDocumentModel;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.condenseDocument = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const __2 = require("../..");
|
|
6
|
+
const condenseDocument = (document) => {
|
|
7
|
+
const doc = document
|
|
8
8
|
? {
|
|
9
9
|
id: document.id,
|
|
10
10
|
caseId: document.caseId,
|
|
@@ -24,10 +24,10 @@ var condenseDocument = function (document) {
|
|
|
24
24
|
}
|
|
25
25
|
: null;
|
|
26
26
|
if ((doc === null || doc === void 0 ? void 0 : doc.documentType) === __1.DigicustDocumentType.Invoice) {
|
|
27
|
-
|
|
27
|
+
const invoice = doc;
|
|
28
28
|
if (invoice.items) {
|
|
29
|
-
invoice.items = invoice.items.map(
|
|
30
|
-
|
|
29
|
+
invoice.items = invoice.items.map((item) => {
|
|
30
|
+
const lineItem = (0, __2.condenseLineItem)(item);
|
|
31
31
|
if (!lineItem) {
|
|
32
32
|
return {};
|
|
33
33
|
}
|
|
@@ -126,4 +126,4 @@ export interface ExecutionStrategy {
|
|
|
126
126
|
LRN?: string;
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
export declare const condenseExecutionStrategy: (strategy?: ExecutionStrategy) => ExecutionStrategy
|
|
129
|
+
export declare const condenseExecutionStrategy: (strategy?: ExecutionStrategy) => ExecutionStrategy;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.condenseExecutionStrategy = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
: null;
|
|
14
|
-
};
|
|
4
|
+
const condenseExecutionStrategy = (strategy) => strategy
|
|
5
|
+
? {
|
|
6
|
+
id: strategy.id,
|
|
7
|
+
alias: strategy.alias,
|
|
8
|
+
customerId: strategy.customerId,
|
|
9
|
+
subscriptionId: strategy.subscriptionId,
|
|
10
|
+
isCondensed: true,
|
|
11
|
+
}
|
|
12
|
+
: null;
|
|
15
13
|
exports.condenseExecutionStrategy = condenseExecutionStrategy;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { DigicustDocumentType } from "..";
|
|
2
2
|
import { FrontendSmallSection } from "./frontend-small-section.mode";
|
|
3
3
|
export interface FrontendBigSection {
|
|
4
|
-
title:
|
|
5
|
-
icon:
|
|
4
|
+
title: string;
|
|
5
|
+
icon: string;
|
|
6
6
|
documentType?: DigicustDocumentType;
|
|
7
7
|
subInfo: Array<{
|
|
8
|
-
title:
|
|
9
|
-
boxes: Array<
|
|
8
|
+
title: string;
|
|
9
|
+
boxes: Array<string>;
|
|
10
10
|
}>;
|
|
11
11
|
sections: Array<FrontendSmallSection>;
|
|
12
|
-
pagination:
|
|
12
|
+
pagination: boolean;
|
|
13
13
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FieldType } from "./field-type.enum";
|
|
2
2
|
import { FieldPrefix } from "./prefix.enum";
|
|
3
3
|
export interface FrontendFields {
|
|
4
|
-
path?:
|
|
5
|
-
value?:
|
|
6
|
-
label?:
|
|
7
|
-
reviewNeeded?: Array<
|
|
4
|
+
path?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
reviewNeeded?: Array<boolean>;
|
|
8
8
|
type: FieldType;
|
|
9
|
-
format?:
|
|
9
|
+
format?: string;
|
|
10
10
|
prefix?: FieldPrefix;
|
|
11
11
|
}
|
|
@@ -92,4 +92,4 @@ export interface LineItemModel {
|
|
|
92
92
|
fraudDetection?: ItemFraudDetectionDetails;
|
|
93
93
|
matchingMetadata?: MatchingMetadataModel<MaterialMatchInput, MaterialMatchResult>;
|
|
94
94
|
}
|
|
95
|
-
export declare const condenseLineItem: (lineItem?: LineItemModel) => LineItemModel
|
|
95
|
+
export declare const condenseLineItem: (lineItem?: LineItemModel) => LineItemModel;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.condenseLineItem = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const cleanObject_1 = require("../../../helpers/cleanObject");
|
|
5
|
+
const condenseLineItem = (lineItem) => {
|
|
6
6
|
if (lineItem) {
|
|
7
|
-
|
|
7
|
+
const condensedLineItem = {
|
|
8
8
|
id: lineItem.id,
|
|
9
9
|
documentId: lineItem.documentId,
|
|
10
10
|
caseId: lineItem.caseId,
|
|
@@ -41,8 +41,8 @@ export interface Meursing extends Meta<string> {
|
|
|
41
41
|
saccharose?: Workflow<number>;
|
|
42
42
|
}
|
|
43
43
|
export declare enum MasterDataCreationType {
|
|
44
|
-
manual = "manual"
|
|
45
|
-
processed = "processed"
|
|
44
|
+
manual = "manual",// If created using frontend
|
|
45
|
+
processed = "processed",// Id added by integration service
|
|
46
46
|
file = "file"
|
|
47
47
|
}
|
|
48
48
|
export interface MaterialModel {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.condenseAddress = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const condenseAddress = (address) => {
|
|
5
|
+
let condensed = {
|
|
6
6
|
formattedAddress: address.formattedAddress,
|
|
7
7
|
confidence: address.confidence,
|
|
8
8
|
reviewNeeded: address.reviewNeeded,
|
|
@@ -1,181 +1,181 @@
|
|
|
1
1
|
export declare enum Currency {
|
|
2
|
-
EUR = "EUR"
|
|
3
|
-
USD = "USD"
|
|
4
|
-
GBP = "GBP"
|
|
5
|
-
AED = "AED"
|
|
6
|
-
AFN = "AFN"
|
|
7
|
-
ALL = "ALL"
|
|
8
|
-
AMD = "AMD"
|
|
9
|
-
ANG = "ANG"
|
|
10
|
-
AOA = "AOA"
|
|
11
|
-
ARS = "ARS"
|
|
12
|
-
AUD = "AUD"
|
|
13
|
-
AWG = "AWG"
|
|
14
|
-
AZN = "AZN"
|
|
15
|
-
BAM = "BAM"
|
|
16
|
-
BBD = "BBD"
|
|
17
|
-
BDT = "BDT"
|
|
18
|
-
BGN = "BGN"
|
|
19
|
-
BHD = "BHD"
|
|
20
|
-
BIF = "BIF"
|
|
21
|
-
BMD = "BMD"
|
|
22
|
-
BND = "BND"
|
|
23
|
-
BOB = "BOB"
|
|
24
|
-
BOV = "BOV"
|
|
25
|
-
BRL = "BRL"
|
|
26
|
-
BSD = "BSD"
|
|
27
|
-
BTN = "BTN"
|
|
28
|
-
BWP = "BWP"
|
|
29
|
-
BYN = "BYN"
|
|
30
|
-
BZD = "BZD"
|
|
31
|
-
CAD = "CAD"
|
|
32
|
-
CDF = "CDF"
|
|
33
|
-
CHE = "CHE"
|
|
34
|
-
CHF = "CHF"
|
|
35
|
-
CHW = "CHW"
|
|
36
|
-
CLF = "CLF"
|
|
37
|
-
CLP = "CLP"
|
|
38
|
-
CNY = "CNY"
|
|
39
|
-
COP = "COP"
|
|
40
|
-
COU = "COU"
|
|
41
|
-
CRC = "CRC"
|
|
42
|
-
CUC = "CUC"
|
|
43
|
-
CUP = "CUP"
|
|
44
|
-
CVE = "CVE"
|
|
45
|
-
CZK = "CZK"
|
|
46
|
-
DJF = "DJF"
|
|
47
|
-
DKK = "DKK"
|
|
48
|
-
DOP = "DOP"
|
|
49
|
-
DZD = "DZD"
|
|
50
|
-
EGP = "EGP"
|
|
51
|
-
ERN = "ERN"
|
|
52
|
-
ETB = "ETB"
|
|
53
|
-
FJD = "FJD"
|
|
54
|
-
FKP = "FKP"
|
|
55
|
-
GEL = "GEL"
|
|
56
|
-
GHS = "GHS"
|
|
57
|
-
GIP = "GIP"
|
|
58
|
-
GMD = "GMD"
|
|
59
|
-
GNF = "GNF"
|
|
60
|
-
GTQ = "GTQ"
|
|
61
|
-
GYD = "GYD"
|
|
62
|
-
HKD = "HKD"
|
|
63
|
-
HNL = "HNL"
|
|
64
|
-
HRK = "HRK",
|
|
65
|
-
HTG = "HTG"
|
|
66
|
-
HUF = "HUF"
|
|
67
|
-
IDR = "IDR"
|
|
68
|
-
ILS = "ILS"
|
|
69
|
-
INR = "INR"
|
|
70
|
-
IQD = "IQD"
|
|
71
|
-
IRR = "IRR"
|
|
72
|
-
ISK = "ISK"
|
|
73
|
-
JMD = "JMD"
|
|
74
|
-
JOD = "JOD"
|
|
75
|
-
JPY = "JPY"
|
|
76
|
-
KES = "KES"
|
|
77
|
-
KGS = "KGS"
|
|
78
|
-
KHR = "KHR"
|
|
79
|
-
KMF = "KMF"
|
|
80
|
-
KPW = "KPW"
|
|
81
|
-
KRW = "KRW"
|
|
82
|
-
KWD = "KWD"
|
|
83
|
-
KYD = "KYD"
|
|
84
|
-
KZT = "KZT"
|
|
85
|
-
LAK = "LAK"
|
|
86
|
-
LBP = "LBP"
|
|
87
|
-
LKR = "LKR"
|
|
88
|
-
LRD = "LRD"
|
|
89
|
-
LSL = "LSL"
|
|
90
|
-
LYD = "LYD"
|
|
91
|
-
MAD = "MAD"
|
|
92
|
-
MDL = "MDL"
|
|
93
|
-
MGA = "MGA"
|
|
94
|
-
MKD = "MKD"
|
|
95
|
-
MMK = "MMK"
|
|
96
|
-
MNT = "MNT"
|
|
97
|
-
MOP = "MOP"
|
|
98
|
-
MRU = "MRU"
|
|
99
|
-
MUR = "MUR"
|
|
100
|
-
MVR = "MVR"
|
|
101
|
-
MWK = "MWK"
|
|
102
|
-
MXN = "MXN"
|
|
103
|
-
MXV = "MXV"
|
|
104
|
-
MYR = "MYR"
|
|
105
|
-
MZN = "MZN"
|
|
106
|
-
NAD = "NAD"
|
|
107
|
-
NGN = "NGN"
|
|
108
|
-
NIO = "NIO"
|
|
109
|
-
NOK = "NOK"
|
|
110
|
-
NPR = "NPR"
|
|
111
|
-
NZD = "NZD"
|
|
112
|
-
OMR = "OMR"
|
|
113
|
-
PAB = "PAB"
|
|
114
|
-
PEN = "PEN"
|
|
115
|
-
PKG = "PKG"
|
|
116
|
-
PHP = "PHP"
|
|
117
|
-
PKR = "PKR"
|
|
118
|
-
PLN = "PLN"
|
|
119
|
-
PYG = "PYG"
|
|
120
|
-
QAR = "QAR"
|
|
121
|
-
RON = "RON"
|
|
122
|
-
RSD = "RSD"
|
|
123
|
-
RUB = "RUB"
|
|
124
|
-
RWF = "RWF"
|
|
125
|
-
SAR = "SAR"
|
|
126
|
-
SBD = "SBD"
|
|
127
|
-
SCR = "SCR"
|
|
128
|
-
SDG = "SDG"
|
|
129
|
-
SEK = "SEK"
|
|
130
|
-
SGD = "SGD"
|
|
131
|
-
SHP = "SHP"
|
|
132
|
-
SLL = "SLL"
|
|
133
|
-
SOS = "SOS"
|
|
134
|
-
SRD = "SRD"
|
|
135
|
-
SSP = "SSP"
|
|
136
|
-
STN = "STN"
|
|
137
|
-
SVC = "SVC"
|
|
138
|
-
SYP = "SYP"
|
|
139
|
-
SZL = "SZL"
|
|
140
|
-
THB = "THN"
|
|
141
|
-
TJS = "TJS"
|
|
142
|
-
TMT = "TMT"
|
|
143
|
-
TND = "TND"
|
|
144
|
-
TOP = "TOP"
|
|
145
|
-
TRY = "TRY"
|
|
146
|
-
TTD = "TTD"
|
|
147
|
-
TWD = "TWD"
|
|
148
|
-
TZS = "TZS"
|
|
149
|
-
UAH = "UAH"
|
|
150
|
-
UGX = "UGX"
|
|
151
|
-
USN = "USN"
|
|
152
|
-
UYI = "UYI"
|
|
153
|
-
UYU = "UYU"
|
|
154
|
-
UYW = "UYW"
|
|
155
|
-
UZS = "UZS"
|
|
156
|
-
VES = "VES"
|
|
157
|
-
VND = "VND"
|
|
158
|
-
VUV = "VUV"
|
|
159
|
-
WST = "WST"
|
|
160
|
-
XAF = "XAF"
|
|
161
|
-
XAG = "XAG"
|
|
162
|
-
XAU = "XAU"
|
|
163
|
-
XBA = "XBA"
|
|
164
|
-
XBB = "XBB"
|
|
165
|
-
XBC = "XBC"
|
|
166
|
-
XBD = "XBD"
|
|
167
|
-
XCD = "XCD"
|
|
168
|
-
XDR = "XDR"
|
|
169
|
-
XOF = "XOF"
|
|
170
|
-
XPD = "XPD"
|
|
171
|
-
XPF = "XPF"
|
|
172
|
-
XPT = "XPT"
|
|
173
|
-
XSU = "XSU"
|
|
174
|
-
XTS = "XTS"
|
|
175
|
-
XUA = "XUA"
|
|
176
|
-
XXX = "XXX"
|
|
177
|
-
YER = "YER"
|
|
178
|
-
ZAR = "ZAR"
|
|
179
|
-
ZMW = "ZMW"
|
|
2
|
+
EUR = "EUR",// EURO
|
|
3
|
+
USD = "USD",// US Dollar
|
|
4
|
+
GBP = "GBP",// Pound Sterling
|
|
5
|
+
AED = "AED",// UAE Dirham
|
|
6
|
+
AFN = "AFN",// Afghani
|
|
7
|
+
ALL = "ALL",// Lek / Albania
|
|
8
|
+
AMD = "AMD",// Armenian Dram
|
|
9
|
+
ANG = "ANG",// Netherlands Antillean Guilder
|
|
10
|
+
AOA = "AOA",// Kwanza / Angola
|
|
11
|
+
ARS = "ARS",// Argentine Peso
|
|
12
|
+
AUD = "AUD",// Australian Dollar
|
|
13
|
+
AWG = "AWG",// Aruban Florin
|
|
14
|
+
AZN = "AZN",// Azerbaijan Manat
|
|
15
|
+
BAM = "BAM",// Convertible Mark
|
|
16
|
+
BBD = "BBD",// Barbados Dollar
|
|
17
|
+
BDT = "BDT",// Taka
|
|
18
|
+
BGN = "BGN",// Bulgarian Lev
|
|
19
|
+
BHD = "BHD",// Bahraini Dinar
|
|
20
|
+
BIF = "BIF",// Burundi Franc
|
|
21
|
+
BMD = "BMD",// Bermudian Dollar
|
|
22
|
+
BND = "BND",// Brunei Dollar
|
|
23
|
+
BOB = "BOB",// Boliviano
|
|
24
|
+
BOV = "BOV",// Mvdol
|
|
25
|
+
BRL = "BRL",// Brazilian Real
|
|
26
|
+
BSD = "BSD",// Bahamian Dollar
|
|
27
|
+
BTN = "BTN",// Ngultrum
|
|
28
|
+
BWP = "BWP",// Pula / Botswana
|
|
29
|
+
BYN = "BYN",// Belarusian Ruble
|
|
30
|
+
BZD = "BZD",// Belize Dollar
|
|
31
|
+
CAD = "CAD",// Canadian Dollar
|
|
32
|
+
CDF = "CDF",// Congolese Franc
|
|
33
|
+
CHE = "CHE",// WIR Euro
|
|
34
|
+
CHF = "CHF",// Swiss Franc
|
|
35
|
+
CHW = "CHW",// WIR Franc
|
|
36
|
+
CLF = "CLF",// Unidad de Fomento
|
|
37
|
+
CLP = "CLP",// Chilean Peso
|
|
38
|
+
CNY = "CNY",// Yuan Renminbi
|
|
39
|
+
COP = "COP",// Colombian Peso
|
|
40
|
+
COU = "COU",// Unidad de Valor Real
|
|
41
|
+
CRC = "CRC",// Costa Rican Colon
|
|
42
|
+
CUC = "CUC",// Peso Convertible
|
|
43
|
+
CUP = "CUP",// Cuban Peso
|
|
44
|
+
CVE = "CVE",// Cabo Verde Escudo
|
|
45
|
+
CZK = "CZK",// Czech Koruna
|
|
46
|
+
DJF = "DJF",// Djibouti Franc
|
|
47
|
+
DKK = "DKK",// Danish Krone
|
|
48
|
+
DOP = "DOP",// Dominican Peso
|
|
49
|
+
DZD = "DZD",// Algerian Dinar
|
|
50
|
+
EGP = "EGP",// Egyptian Pound
|
|
51
|
+
ERN = "ERN",// Nakfa
|
|
52
|
+
ETB = "ETB",// Ethiopian Birr
|
|
53
|
+
FJD = "FJD",// Fiji Dollar
|
|
54
|
+
FKP = "FKP",// Falkland Islands Pound
|
|
55
|
+
GEL = "GEL",// Lari / Georgia
|
|
56
|
+
GHS = "GHS",// Ghana Cedi
|
|
57
|
+
GIP = "GIP",// Gibraltar Pound
|
|
58
|
+
GMD = "GMD",// Dalasi / Gambia
|
|
59
|
+
GNF = "GNF",// Guinean Franc
|
|
60
|
+
GTQ = "GTQ",// Quetzal / Guatemala
|
|
61
|
+
GYD = "GYD",// Guyana Dollar
|
|
62
|
+
HKD = "HKD",// Hong Kong Dollar
|
|
63
|
+
HNL = "HNL",// Lempira / Honduras
|
|
64
|
+
HRK = "HRK",// Kuna / Croatia,
|
|
65
|
+
HTG = "HTG",// Gourde / Haiti
|
|
66
|
+
HUF = "HUF",// Forint
|
|
67
|
+
IDR = "IDR",// Rupiah
|
|
68
|
+
ILS = "ILS",// New Israeli Sheqel
|
|
69
|
+
INR = "INR",// Indian Rupee
|
|
70
|
+
IQD = "IQD",// Iraqi Dinar
|
|
71
|
+
IRR = "IRR",// Iranian Rial
|
|
72
|
+
ISK = "ISK",// Iceland Krona
|
|
73
|
+
JMD = "JMD",// Jamaican Dollar
|
|
74
|
+
JOD = "JOD",// Jordanian Dinar
|
|
75
|
+
JPY = "JPY",// Yen
|
|
76
|
+
KES = "KES",// Kenyan Shilling
|
|
77
|
+
KGS = "KGS",// Som / Kyrgyztan
|
|
78
|
+
KHR = "KHR",// Riel / Cambodia
|
|
79
|
+
KMF = "KMF",// Comorian Franc
|
|
80
|
+
KPW = "KPW",// North Korean Won
|
|
81
|
+
KRW = "KRW",// Won
|
|
82
|
+
KWD = "KWD",// Kuwaiti Dina
|
|
83
|
+
KYD = "KYD",// Cayman Islands Dollar
|
|
84
|
+
KZT = "KZT",// Tenge Kazakhstan
|
|
85
|
+
LAK = "LAK",// Lao Kip
|
|
86
|
+
LBP = "LBP",// Lebanese Pound
|
|
87
|
+
LKR = "LKR",// Sri Lanka Rupee
|
|
88
|
+
LRD = "LRD",// Liberian Dollar
|
|
89
|
+
LSL = "LSL",// Loti
|
|
90
|
+
LYD = "LYD",// Libyan Dinar
|
|
91
|
+
MAD = "MAD",// Moroccan Dirham
|
|
92
|
+
MDL = "MDL",// Moldovan Leu
|
|
93
|
+
MGA = "MGA",// Malagasy Ariary
|
|
94
|
+
MKD = "MKD",// Denar
|
|
95
|
+
MMK = "MMK",// Kyat
|
|
96
|
+
MNT = "MNT",// Tugrik
|
|
97
|
+
MOP = "MOP",// Pataca
|
|
98
|
+
MRU = "MRU",// Ouguiya
|
|
99
|
+
MUR = "MUR",// Mauritius Rupee
|
|
100
|
+
MVR = "MVR",// Rufiyaa
|
|
101
|
+
MWK = "MWK",// Malawi Kwacha
|
|
102
|
+
MXN = "MXN",// Mexican Peso
|
|
103
|
+
MXV = "MXV",// Mexican Unidad de Inversion (UDI)
|
|
104
|
+
MYR = "MYR",// Malaysian Ringgit
|
|
105
|
+
MZN = "MZN",// Mozambique Metical
|
|
106
|
+
NAD = "NAD",// Namibia Dollar
|
|
107
|
+
NGN = "NGN",// Naira
|
|
108
|
+
NIO = "NIO",// Cordoba Oro
|
|
109
|
+
NOK = "NOK",// Norwegian Krone
|
|
110
|
+
NPR = "NPR",// Nepalese Rupee
|
|
111
|
+
NZD = "NZD",// New Zealand Dollar
|
|
112
|
+
OMR = "OMR",// Rial Omani
|
|
113
|
+
PAB = "PAB",// Balboa
|
|
114
|
+
PEN = "PEN",// Sol / Peru
|
|
115
|
+
PKG = "PKG",// Kina
|
|
116
|
+
PHP = "PHP",// Philippine Peso
|
|
117
|
+
PKR = "PKR",// Pakistan Rupee
|
|
118
|
+
PLN = "PLN",// Zloty
|
|
119
|
+
PYG = "PYG",// Guarani
|
|
120
|
+
QAR = "QAR",// Qatari Rial
|
|
121
|
+
RON = "RON",// Romanian Leu
|
|
122
|
+
RSD = "RSD",// Serbian Dinar
|
|
123
|
+
RUB = "RUB",// Russian Ruble
|
|
124
|
+
RWF = "RWF",// Rwanda Franc
|
|
125
|
+
SAR = "SAR",// Saudi Riyal
|
|
126
|
+
SBD = "SBD",// Solomon Islands Dollar
|
|
127
|
+
SCR = "SCR",// Seychelles Rupee
|
|
128
|
+
SDG = "SDG",// Sudanese Pound
|
|
129
|
+
SEK = "SEK",// Swedish Krona
|
|
130
|
+
SGD = "SGD",// Singapore Dollar
|
|
131
|
+
SHP = "SHP",// Saint Helena Pound
|
|
132
|
+
SLL = "SLL",// Leone
|
|
133
|
+
SOS = "SOS",// Somali Shilling
|
|
134
|
+
SRD = "SRD",// Surinam Dollar
|
|
135
|
+
SSP = "SSP",// South Sudanese Pound
|
|
136
|
+
STN = "STN",// Dobra
|
|
137
|
+
SVC = "SVC",// El Salvador Colon
|
|
138
|
+
SYP = "SYP",// Syrian Pound
|
|
139
|
+
SZL = "SZL",// Lilangeni
|
|
140
|
+
THB = "THN",// Baht / Thailand
|
|
141
|
+
TJS = "TJS",// Somoni
|
|
142
|
+
TMT = "TMT",// Turkmenistan New Manat
|
|
143
|
+
TND = "TND",// Tunisian Dinar
|
|
144
|
+
TOP = "TOP",// Pa’anga
|
|
145
|
+
TRY = "TRY",// Turkish Lira
|
|
146
|
+
TTD = "TTD",// Trinidad and Tobago Dollar
|
|
147
|
+
TWD = "TWD",// New Taiwan Dollar
|
|
148
|
+
TZS = "TZS",// Tanzanian Shilling
|
|
149
|
+
UAH = "UAH",// Hryvnia / Ukraine
|
|
150
|
+
UGX = "UGX",// Uganda Shilling
|
|
151
|
+
USN = "USN",// US Dollar (Next day)
|
|
152
|
+
UYI = "UYI",// Uruguay Peso en Unidades Indexadas (UI)
|
|
153
|
+
UYU = "UYU",// Peso Uruguayo
|
|
154
|
+
UYW = "UYW",// Unidad Previsional
|
|
155
|
+
UZS = "UZS",// Uzbekistan Sum
|
|
156
|
+
VES = "VES",// Bolívar Soberano
|
|
157
|
+
VND = "VND",// Dong
|
|
158
|
+
VUV = "VUV",// Vatu
|
|
159
|
+
WST = "WST",// Tala
|
|
160
|
+
XAF = "XAF",// CFA Franc BEAC
|
|
161
|
+
XAG = "XAG",// Silver
|
|
162
|
+
XAU = "XAU",// Gold
|
|
163
|
+
XBA = "XBA",// Bond Markets Unit European Composite Unit (EURCO)
|
|
164
|
+
XBB = "XBB",// Bond Markets Unit European Monetary Unit (E.M.U.-6)
|
|
165
|
+
XBC = "XBC",// Bond Markets Unit European Unit of Account 9 (E.U.A.-9)
|
|
166
|
+
XBD = "XBD",// Bond Markets Unit European Unit of Account 17 (E.U.A.-17)
|
|
167
|
+
XCD = "XCD",// East Caribbean Dollar
|
|
168
|
+
XDR = "XDR",// SDR (Special Drawing Right)
|
|
169
|
+
XOF = "XOF",// CFA Franc BCEAO
|
|
170
|
+
XPD = "XPD",// Palladium
|
|
171
|
+
XPF = "XPF",// CFP Franc
|
|
172
|
+
XPT = "XPT",// Platinum
|
|
173
|
+
XSU = "XSU",// Sucre
|
|
174
|
+
XTS = "XTS",// Codes specifically reserved for testing purposes
|
|
175
|
+
XUA = "XUA",// ADB Unit of Account
|
|
176
|
+
XXX = "XXX",// The codes assigned for transactions where no currency is involved
|
|
177
|
+
YER = "YER",// Yemeni Rial
|
|
178
|
+
ZAR = "ZAR",// Rand
|
|
179
|
+
ZMW = "ZMW",// Zambian Kwacha
|
|
180
180
|
ZWL = "ZWL"
|
|
181
181
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.condenseMoney = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const condenseMoney = (money) => {
|
|
5
|
+
let condensed = {
|
|
6
6
|
value: money.value,
|
|
7
7
|
unit: money.unit,
|
|
8
8
|
EUREquivalent: money.EUREquivalent,
|
|
@@ -10,8 +10,8 @@ export interface Quantity extends Meta<any> {
|
|
|
10
10
|
weightUnit?: WeightUnit;
|
|
11
11
|
}
|
|
12
12
|
export declare const condenseQuantity: (meta: Quantity) => {
|
|
13
|
-
amount: number
|
|
14
|
-
uom: UnitOfMeasurement
|
|
15
|
-
confidence: number
|
|
16
|
-
reviewNeeded: boolean
|
|
13
|
+
amount: number;
|
|
14
|
+
uom: UnitOfMeasurement;
|
|
15
|
+
confidence: number;
|
|
16
|
+
reviewNeeded: boolean;
|
|
17
17
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.condenseQuantity = void 0;
|
|
4
|
-
|
|
4
|
+
const condenseQuantity = (meta) => ({
|
|
5
5
|
amount: meta.amount,
|
|
6
6
|
uom: meta.uom,
|
|
7
7
|
confidence: meta.confidence,
|
|
8
8
|
reviewNeeded: meta.reviewNeeded,
|
|
9
|
-
});
|
|
9
|
+
});
|
|
10
10
|
exports.condenseQuantity = condenseQuantity;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.condenseWeight = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const condenseWeight = (weight) => {
|
|
5
|
+
let condensed = {
|
|
6
6
|
value: weight.value,
|
|
7
7
|
unit: weight.unit,
|
|
8
8
|
kgEquivalent: weight.kgEquivalent,
|
|
@@ -18,7 +18,7 @@ export interface Meta<T> extends Workflow<T> {
|
|
|
18
18
|
*/
|
|
19
19
|
bbox?: Bbox;
|
|
20
20
|
options?: T[];
|
|
21
|
-
source?:
|
|
21
|
+
source?: string;
|
|
22
22
|
reviewNeeded?: boolean;
|
|
23
23
|
display?: boolean;
|
|
24
24
|
required?: boolean;
|
|
@@ -27,11 +27,11 @@ export interface Meta<T> extends Workflow<T> {
|
|
|
27
27
|
reason?: any;
|
|
28
28
|
}
|
|
29
29
|
export declare const condenseMeta: <T>(meta: Meta<T>, valueOnly?: boolean) => {
|
|
30
|
-
value: T
|
|
31
|
-
confidence: number
|
|
32
|
-
reviewNeeded: boolean
|
|
30
|
+
value: T;
|
|
31
|
+
confidence: number;
|
|
32
|
+
reviewNeeded: boolean;
|
|
33
33
|
} | {
|
|
34
|
-
value: T
|
|
34
|
+
value: T;
|
|
35
35
|
confidence?: undefined;
|
|
36
36
|
reviewNeeded?: undefined;
|
|
37
37
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.condenseMeta = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
:
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
};
|
|
4
|
+
const condenseMeta = (meta, valueOnly) => !valueOnly
|
|
5
|
+
? {
|
|
6
|
+
value: meta.value,
|
|
7
|
+
confidence: meta.confidence,
|
|
8
|
+
reviewNeeded: meta.reviewNeeded,
|
|
9
|
+
}
|
|
10
|
+
: {
|
|
11
|
+
value: meta.value,
|
|
12
|
+
};
|
|
15
13
|
exports.condenseMeta = condenseMeta;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "digicust_types",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.24",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -29,18 +29,21 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/Digicust0406/types#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"typedoc": "^0.25.
|
|
32
|
+
"typedoc": "^0.25.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@types/node": "^20.
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
37
|
-
"@typescript-eslint/parser": "^6.
|
|
38
|
-
"eslint": "^8.
|
|
35
|
+
"@types/node": "^20.10.1",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
37
|
+
"@typescript-eslint/parser": "^6.13.1",
|
|
38
|
+
"eslint": "^8.54.0",
|
|
39
39
|
"eslint-config-airbnb-typescript": "^17.1.0",
|
|
40
|
+
"eslint-config-prettier": "^9.0.0",
|
|
40
41
|
"eslint-plugin-import": "^2.29.0",
|
|
42
|
+
"eslint-plugin-node": "^11.1.0",
|
|
43
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
41
44
|
"husky": "^8.0.3",
|
|
42
|
-
"lint-staged": "^15.0
|
|
43
|
-
"prettier": "^3.0
|
|
44
|
-
"typescript": "^5.
|
|
45
|
+
"lint-staged": "^15.1.0",
|
|
46
|
+
"prettier": "^3.1.0",
|
|
47
|
+
"typescript": "^5.3.2"
|
|
45
48
|
}
|
|
46
49
|
}
|