mindee 4.14.1 → 4.16.0
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/CHANGELOG.md +24 -0
- package/package.json +2 -1
- package/src/client.d.ts +5 -3
- package/src/client.js +7 -1
- package/src/http/endpoint.d.ts +3 -1
- package/src/http/endpoint.js +12 -8
- package/src/http/responseValidation.js +11 -4
- package/src/imageOperations/invoiceSplitterExtractor/invoiceSplitterExtractor.d.ts +2 -1
- package/src/imageOperations/invoiceSplitterExtractor/invoiceSplitterExtractor.js +2 -1
- package/src/imageOperations/multiReceiptsExtractor/multiReceiptsExtractor.js +3 -1
- package/src/input/localResponse.d.ts +1 -0
- package/src/input/localResponse.js +1 -0
- package/src/parsing/common/document.d.ts +1 -0
- package/src/parsing/common/document.js +27 -6
- package/src/parsing/common/extras/fullTextOcrExtra.d.ts +11 -0
- package/src/parsing/common/extras/fullTextOcrExtra.js +20 -0
- package/src/parsing/common/extras/index.d.ts +3 -0
- package/src/parsing/common/extras/index.js +9 -0
- package/src/parsing/common/index.d.ts +2 -0
- package/src/parsing/common/index.js +28 -1
- package/src/parsing/common/page.d.ts +1 -0
- package/src/parsing/common/page.js +30 -7
- package/src/parsing/common/summaryHelper.d.ts +10 -0
- package/src/parsing/common/summaryHelper.js +27 -1
- package/src/parsing/generated/generatedObject.d.ts +3 -3
- package/src/parsing/generated/generatedObject.js +14 -5
- package/src/parsing/standard/amount.d.ts +0 -1
- package/src/parsing/standard/amount.js +4 -11
- package/src/parsing/standard/index.d.ts +1 -1
- package/src/parsing/standard/index.js +1 -2
- package/src/parsing/standard/tax.js +4 -4
- package/src/pdf/pdfOperation.d.ts +1 -1
- package/src/pdf/pdfOperation.js +12 -7
- package/src/product/billOfLading/billOfLadingV1.d.ts +16 -0
- package/src/product/billOfLading/billOfLadingV1.js +27 -0
- package/src/product/billOfLading/billOfLadingV1Carrier.d.ts +32 -0
- package/src/product/billOfLading/billOfLadingV1Carrier.js +62 -0
- package/src/product/billOfLading/billOfLadingV1CarrierItem.d.ts +38 -0
- package/src/product/billOfLading/billOfLadingV1CarrierItem.js +117 -0
- package/src/product/billOfLading/billOfLadingV1Consignee.d.ts +34 -0
- package/src/product/billOfLading/billOfLadingV1Consignee.js +67 -0
- package/src/product/billOfLading/billOfLadingV1Document.d.ts +39 -0
- package/src/product/billOfLading/billOfLadingV1Document.js +95 -0
- package/src/product/billOfLading/billOfLadingV1NotifyParty.d.ts +34 -0
- package/src/product/billOfLading/billOfLadingV1NotifyParty.js +67 -0
- package/src/product/billOfLading/billOfLadingV1Shipper.d.ts +34 -0
- package/src/product/billOfLading/billOfLadingV1Shipper.js +67 -0
- package/src/product/billOfLading/index.d.ts +1 -0
- package/src/product/billOfLading/index.js +5 -0
- package/src/product/billOfLading/internal.d.ts +7 -0
- package/src/product/billOfLading/internal.js +17 -0
- package/src/product/financialDocument/financialDocumentV1LineItem.d.ts +8 -8
- package/src/product/financialDocument/financialDocumentV1LineItem.js +47 -22
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV2Bban.d.ts +4 -4
- package/src/product/fr/energyBill/energyBillV1.d.ts +16 -0
- package/src/product/fr/energyBill/energyBillV1.js +27 -0
- package/src/product/fr/energyBill/energyBillV1Document.d.ts +49 -0
- package/src/product/fr/energyBill/energyBillV1Document.js +143 -0
- package/src/product/fr/energyBill/energyBillV1EnergyConsumer.d.ts +30 -0
- package/src/product/fr/energyBill/energyBillV1EnergyConsumer.js +57 -0
- package/src/product/fr/energyBill/energyBillV1EnergySupplier.d.ts +30 -0
- package/src/product/fr/energyBill/energyBillV1EnergySupplier.js +57 -0
- package/src/product/fr/energyBill/energyBillV1EnergyUsage.d.ts +38 -0
- package/src/product/fr/energyBill/energyBillV1EnergyUsage.js +117 -0
- package/src/product/fr/energyBill/energyBillV1MeterDetail.d.ts +32 -0
- package/src/product/fr/energyBill/energyBillV1MeterDetail.js +62 -0
- package/src/product/fr/energyBill/energyBillV1Subscription.d.ts +38 -0
- package/src/product/fr/energyBill/energyBillV1Subscription.js +117 -0
- package/src/product/fr/energyBill/energyBillV1TaxesAndContribution.d.ts +38 -0
- package/src/product/fr/energyBill/energyBillV1TaxesAndContribution.js +117 -0
- package/src/product/fr/energyBill/index.d.ts +1 -0
- package/src/product/fr/energyBill/index.js +5 -0
- package/src/product/fr/energyBill/internal.d.ts +8 -0
- package/src/product/fr/energyBill/internal.js +19 -0
- package/src/product/fr/index.d.ts +2 -0
- package/src/product/fr/index.js +5 -1
- package/src/product/fr/internal.d.ts +2 -0
- package/src/product/fr/internal.js +3 -1
- package/src/product/fr/payslip/index.d.ts +1 -0
- package/src/product/fr/payslip/index.js +5 -0
- package/src/product/fr/payslip/internal.d.ts +10 -0
- package/src/product/fr/payslip/internal.js +23 -0
- package/src/product/fr/payslip/payslipV2.d.ts +16 -0
- package/src/product/fr/payslip/payslipV2.js +27 -0
- package/src/product/fr/payslip/payslipV2BankAccountDetail.d.ts +32 -0
- package/src/product/fr/payslip/payslipV2BankAccountDetail.js +62 -0
- package/src/product/fr/payslip/payslipV2Document.d.ts +35 -0
- package/src/product/fr/payslip/payslipV2Document.js +80 -0
- package/src/product/fr/payslip/payslipV2Employee.d.ts +40 -0
- package/src/product/fr/payslip/payslipV2Employee.js +82 -0
- package/src/product/fr/payslip/payslipV2Employer.d.ts +40 -0
- package/src/product/fr/payslip/payslipV2Employer.js +82 -0
- package/src/product/fr/payslip/payslipV2Employment.d.ts +38 -0
- package/src/product/fr/payslip/payslipV2Employment.js +85 -0
- package/src/product/fr/payslip/payslipV2PayDetail.d.ts +46 -0
- package/src/product/fr/payslip/payslipV2PayDetail.js +168 -0
- package/src/product/fr/payslip/payslipV2PayPeriod.d.ts +36 -0
- package/src/product/fr/payslip/payslipV2PayPeriod.js +72 -0
- package/src/product/fr/payslip/payslipV2Pto.d.ts +32 -0
- package/src/product/fr/payslip/payslipV2Pto.js +84 -0
- package/src/product/fr/payslip/payslipV2SalaryDetail.d.ts +34 -0
- package/src/product/fr/payslip/payslipV2SalaryDetail.js +97 -0
- package/src/product/generated/generatedV1.js +2 -1
- package/src/product/index.d.ts +2 -0
- package/src/product/index.js +5 -1
- package/src/product/internal.d.ts +2 -0
- package/src/product/internal.js +3 -1
- package/src/product/invoice/invoiceV4LineItem.d.ts +8 -8
- package/src/product/invoice/invoiceV4LineItem.js +47 -22
- package/src/product/nutritionFactsLabel/index.d.ts +1 -0
- package/src/product/nutritionFactsLabel/index.js +5 -0
- package/src/product/nutritionFactsLabel/internal.d.ts +15 -0
- package/src/product/nutritionFactsLabel/internal.js +33 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1.d.ts +16 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1.js +27 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1AddedSugar.d.ts +32 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1AddedSugar.js +84 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Calorie.d.ts +32 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Calorie.js +84 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Cholesterol.d.ts +32 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Cholesterol.js +84 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1DietaryFiber.d.ts +32 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1DietaryFiber.js +84 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Document.d.ts +53 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Document.js +117 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Nutrient.d.ts +36 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Nutrient.js +107 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Protein.d.ts +32 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Protein.js +84 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1SaturatedFat.d.ts +32 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1SaturatedFat.js +84 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1ServingSize.d.ts +30 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1ServingSize.js +65 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Sodium.d.ts +34 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1Sodium.js +89 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalCarbohydrate.d.ts +32 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalCarbohydrate.js +84 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalFat.d.ts +32 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalFat.js +84 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalSugar.d.ts +32 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TotalSugar.js +84 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TransFat.d.ts +32 -0
- package/src/product/nutritionFactsLabel/nutritionFactsLabelV1TransFat.js +84 -0
- package/src/product/receipt/receiptV5LineItem.d.ts +4 -4
- package/src/product/receipt/receiptV5LineItem.js +27 -12
- package/src/product/resume/resumeV1Certificate.d.ts +4 -4
- package/src/product/resume/resumeV1Certificate.js +9 -8
- package/src/product/resume/resumeV1Education.d.ts +7 -7
- package/src/product/resume/resumeV1Education.js +15 -14
- package/src/product/resume/resumeV1Language.d.ts +2 -2
- package/src/product/resume/resumeV1Language.js +5 -4
- package/src/product/resume/resumeV1ProfessionalExperience.d.ts +8 -8
- package/src/product/resume/resumeV1ProfessionalExperience.js +17 -16
- package/src/product/resume/resumeV1SocialNetworksUrl.d.ts +2 -2
- package/src/product/resume/resumeV1SocialNetworksUrl.js +5 -4
- package/src/product/us/healthcareCard/healthcareCardV1Copay.d.ts +2 -2
- package/src/product/us/healthcareCard/healthcareCardV1Copay.js +11 -6
- package/src/product/us/usMail/index.d.ts +1 -0
- package/src/product/us/usMail/index.js +5 -0
- package/src/product/us/usMail/usMailV2RecipientAddress.d.ts +7 -7
- package/src/product/us/usMail/usMailV2RecipientAddress.js +17 -15
- package/src/product/us/usMail/usMailV2SenderAddress.d.ts +5 -5
- package/src/product/us/usMail/usMailV2SenderAddress.js +5 -25
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { StringDict } from "../../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* Information about the pay period.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PayslipV2PayPeriod {
|
|
7
|
+
#private;
|
|
8
|
+
/** The end date of the pay period. */
|
|
9
|
+
endDate: string | null;
|
|
10
|
+
/** The month of the pay period. */
|
|
11
|
+
month: string | null;
|
|
12
|
+
/** The date of payment for the pay period. */
|
|
13
|
+
paymentDate: string | null;
|
|
14
|
+
/** The start date of the pay period. */
|
|
15
|
+
startDate: string | null;
|
|
16
|
+
/** The year of the pay period. */
|
|
17
|
+
year: string | null;
|
|
18
|
+
/** Confidence score */
|
|
19
|
+
confidence: number;
|
|
20
|
+
/** The document page on which the information was found. */
|
|
21
|
+
pageId: number;
|
|
22
|
+
/**
|
|
23
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
24
|
+
* the field in the document.
|
|
25
|
+
*/
|
|
26
|
+
polygon: Polygon;
|
|
27
|
+
constructor({ prediction }: StringDict);
|
|
28
|
+
/**
|
|
29
|
+
* Default string representation.
|
|
30
|
+
*/
|
|
31
|
+
toString(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Output in a format suitable for inclusion in a field list.
|
|
34
|
+
*/
|
|
35
|
+
toFieldList(): string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var _PayslipV2PayPeriod_instances, _PayslipV2PayPeriod_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PayslipV2PayPeriod = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Information about the pay period.
|
|
12
|
+
*/
|
|
13
|
+
class PayslipV2PayPeriod {
|
|
14
|
+
constructor({ prediction = {} }) {
|
|
15
|
+
_PayslipV2PayPeriod_instances.add(this);
|
|
16
|
+
/** Confidence score */
|
|
17
|
+
this.confidence = 0.0;
|
|
18
|
+
/**
|
|
19
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
20
|
+
* the field in the document.
|
|
21
|
+
*/
|
|
22
|
+
this.polygon = [];
|
|
23
|
+
this.endDate = prediction["end_date"];
|
|
24
|
+
this.month = prediction["month"];
|
|
25
|
+
this.paymentDate = prediction["payment_date"];
|
|
26
|
+
this.startDate = prediction["start_date"];
|
|
27
|
+
this.year = prediction["year"];
|
|
28
|
+
this.pageId = prediction["page_id"];
|
|
29
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
30
|
+
if (prediction["polygon"]) {
|
|
31
|
+
this.polygon = prediction.polygon;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Default string representation.
|
|
36
|
+
*/
|
|
37
|
+
toString() {
|
|
38
|
+
const printable = __classPrivateFieldGet(this, _PayslipV2PayPeriod_instances, "m", _PayslipV2PayPeriod_printableValues).call(this);
|
|
39
|
+
return ("End Date: " +
|
|
40
|
+
printable.endDate +
|
|
41
|
+
", Month: " +
|
|
42
|
+
printable.month +
|
|
43
|
+
", Payment Date: " +
|
|
44
|
+
printable.paymentDate +
|
|
45
|
+
", Start Date: " +
|
|
46
|
+
printable.startDate +
|
|
47
|
+
", Year: " +
|
|
48
|
+
printable.year);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Output in a format suitable for inclusion in a field list.
|
|
52
|
+
*/
|
|
53
|
+
toFieldList() {
|
|
54
|
+
const printable = __classPrivateFieldGet(this, _PayslipV2PayPeriod_instances, "m", _PayslipV2PayPeriod_printableValues).call(this);
|
|
55
|
+
return `
|
|
56
|
+
:End Date: ${printable.endDate}
|
|
57
|
+
:Month: ${printable.month}
|
|
58
|
+
:Payment Date: ${printable.paymentDate}
|
|
59
|
+
:Start Date: ${printable.startDate}
|
|
60
|
+
:Year: ${printable.year}`.trimEnd();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.PayslipV2PayPeriod = PayslipV2PayPeriod;
|
|
64
|
+
_PayslipV2PayPeriod_instances = new WeakSet(), _PayslipV2PayPeriod_printableValues = function _PayslipV2PayPeriod_printableValues() {
|
|
65
|
+
return {
|
|
66
|
+
endDate: this.endDate ?? "",
|
|
67
|
+
month: this.month ?? "",
|
|
68
|
+
paymentDate: this.paymentDate ?? "",
|
|
69
|
+
startDate: this.startDate ?? "",
|
|
70
|
+
year: this.year ?? "",
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StringDict } from "../../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* Information about paid time off.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PayslipV2Pto {
|
|
7
|
+
#private;
|
|
8
|
+
/** The amount of paid time off accrued in this period. */
|
|
9
|
+
accruedThisPeriod: number | null;
|
|
10
|
+
/** The balance of paid time off at the end of the period. */
|
|
11
|
+
balanceEndOfPeriod: number | null;
|
|
12
|
+
/** The amount of paid time off used in this period. */
|
|
13
|
+
usedThisPeriod: number | null;
|
|
14
|
+
/** Confidence score */
|
|
15
|
+
confidence: number;
|
|
16
|
+
/** The document page on which the information was found. */
|
|
17
|
+
pageId: number;
|
|
18
|
+
/**
|
|
19
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
20
|
+
* the field in the document.
|
|
21
|
+
*/
|
|
22
|
+
polygon: Polygon;
|
|
23
|
+
constructor({ prediction }: StringDict);
|
|
24
|
+
/**
|
|
25
|
+
* Default string representation.
|
|
26
|
+
*/
|
|
27
|
+
toString(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Output in a format suitable for inclusion in a field list.
|
|
30
|
+
*/
|
|
31
|
+
toFieldList(): string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var _PayslipV2Pto_instances, _PayslipV2Pto_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PayslipV2Pto = void 0;
|
|
10
|
+
const common_1 = require("../../../parsing/common");
|
|
11
|
+
/**
|
|
12
|
+
* Information about paid time off.
|
|
13
|
+
*/
|
|
14
|
+
class PayslipV2Pto {
|
|
15
|
+
constructor({ prediction = {} }) {
|
|
16
|
+
_PayslipV2Pto_instances.add(this);
|
|
17
|
+
/** Confidence score */
|
|
18
|
+
this.confidence = 0.0;
|
|
19
|
+
/**
|
|
20
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
21
|
+
* the field in the document.
|
|
22
|
+
*/
|
|
23
|
+
this.polygon = [];
|
|
24
|
+
if (prediction["accrued_this_period"] !== undefined &&
|
|
25
|
+
prediction["accrued_this_period"] !== null &&
|
|
26
|
+
!isNaN(prediction["accrued_this_period"])) {
|
|
27
|
+
this.accruedThisPeriod = +parseFloat(prediction["accrued_this_period"]);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.accruedThisPeriod = null;
|
|
31
|
+
}
|
|
32
|
+
if (prediction["balance_end_of_period"] !== undefined &&
|
|
33
|
+
prediction["balance_end_of_period"] !== null &&
|
|
34
|
+
!isNaN(prediction["balance_end_of_period"])) {
|
|
35
|
+
this.balanceEndOfPeriod = +parseFloat(prediction["balance_end_of_period"]);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.balanceEndOfPeriod = null;
|
|
39
|
+
}
|
|
40
|
+
if (prediction["used_this_period"] !== undefined &&
|
|
41
|
+
prediction["used_this_period"] !== null &&
|
|
42
|
+
!isNaN(prediction["used_this_period"])) {
|
|
43
|
+
this.usedThisPeriod = +parseFloat(prediction["used_this_period"]);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
this.usedThisPeriod = null;
|
|
47
|
+
}
|
|
48
|
+
this.pageId = prediction["page_id"];
|
|
49
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
50
|
+
if (prediction["polygon"]) {
|
|
51
|
+
this.polygon = prediction.polygon;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Default string representation.
|
|
56
|
+
*/
|
|
57
|
+
toString() {
|
|
58
|
+
const printable = __classPrivateFieldGet(this, _PayslipV2Pto_instances, "m", _PayslipV2Pto_printableValues).call(this);
|
|
59
|
+
return ("Accrued This Period: " +
|
|
60
|
+
printable.accruedThisPeriod +
|
|
61
|
+
", Balance End of Period: " +
|
|
62
|
+
printable.balanceEndOfPeriod +
|
|
63
|
+
", Used This Period: " +
|
|
64
|
+
printable.usedThisPeriod);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Output in a format suitable for inclusion in a field list.
|
|
68
|
+
*/
|
|
69
|
+
toFieldList() {
|
|
70
|
+
const printable = __classPrivateFieldGet(this, _PayslipV2Pto_instances, "m", _PayslipV2Pto_printableValues).call(this);
|
|
71
|
+
return `
|
|
72
|
+
:Accrued This Period: ${printable.accruedThisPeriod}
|
|
73
|
+
:Balance End of Period: ${printable.balanceEndOfPeriod}
|
|
74
|
+
:Used This Period: ${printable.usedThisPeriod}`.trimEnd();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.PayslipV2Pto = PayslipV2Pto;
|
|
78
|
+
_PayslipV2Pto_instances = new WeakSet(), _PayslipV2Pto_printableValues = function _PayslipV2Pto_printableValues() {
|
|
79
|
+
return {
|
|
80
|
+
accruedThisPeriod: this.accruedThisPeriod !== undefined ? (0, common_1.floatToString)(this.accruedThisPeriod) : "",
|
|
81
|
+
balanceEndOfPeriod: this.balanceEndOfPeriod !== undefined ? (0, common_1.floatToString)(this.balanceEndOfPeriod) : "",
|
|
82
|
+
usedThisPeriod: this.usedThisPeriod !== undefined ? (0, common_1.floatToString)(this.usedThisPeriod) : "",
|
|
83
|
+
};
|
|
84
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { StringDict } from "../../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* Detailed information about the earnings.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PayslipV2SalaryDetail {
|
|
7
|
+
#private;
|
|
8
|
+
/** The amount of the earnings. */
|
|
9
|
+
amount: number | null;
|
|
10
|
+
/** The base value of the earnings. */
|
|
11
|
+
base: number | null;
|
|
12
|
+
/** The description of the earnings. */
|
|
13
|
+
description: string | null;
|
|
14
|
+
/** The rate of the earnings. */
|
|
15
|
+
rate: number | null;
|
|
16
|
+
/** Confidence score */
|
|
17
|
+
confidence: number;
|
|
18
|
+
/** The document page on which the information was found. */
|
|
19
|
+
pageId: number;
|
|
20
|
+
/**
|
|
21
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
22
|
+
* the field in the document.
|
|
23
|
+
*/
|
|
24
|
+
polygon: Polygon;
|
|
25
|
+
constructor({ prediction }: StringDict);
|
|
26
|
+
/**
|
|
27
|
+
* Default string representation.
|
|
28
|
+
*/
|
|
29
|
+
toString(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
32
|
+
*/
|
|
33
|
+
toTableLine(): string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var _PayslipV2SalaryDetail_instances, _PayslipV2SalaryDetail_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PayslipV2SalaryDetail = void 0;
|
|
10
|
+
const common_1 = require("../../../parsing/common");
|
|
11
|
+
/**
|
|
12
|
+
* Detailed information about the earnings.
|
|
13
|
+
*/
|
|
14
|
+
class PayslipV2SalaryDetail {
|
|
15
|
+
constructor({ prediction = {} }) {
|
|
16
|
+
_PayslipV2SalaryDetail_instances.add(this);
|
|
17
|
+
/** Confidence score */
|
|
18
|
+
this.confidence = 0.0;
|
|
19
|
+
/**
|
|
20
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
21
|
+
* the field in the document.
|
|
22
|
+
*/
|
|
23
|
+
this.polygon = [];
|
|
24
|
+
if (prediction["amount"] !== undefined &&
|
|
25
|
+
prediction["amount"] !== null &&
|
|
26
|
+
!isNaN(prediction["amount"])) {
|
|
27
|
+
this.amount = +parseFloat(prediction["amount"]);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.amount = null;
|
|
31
|
+
}
|
|
32
|
+
if (prediction["base"] !== undefined &&
|
|
33
|
+
prediction["base"] !== null &&
|
|
34
|
+
!isNaN(prediction["base"])) {
|
|
35
|
+
this.base = +parseFloat(prediction["base"]);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.base = null;
|
|
39
|
+
}
|
|
40
|
+
this.description = prediction["description"];
|
|
41
|
+
if (prediction["rate"] !== undefined &&
|
|
42
|
+
prediction["rate"] !== null &&
|
|
43
|
+
!isNaN(prediction["rate"])) {
|
|
44
|
+
this.rate = +parseFloat(prediction["rate"]);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.rate = null;
|
|
48
|
+
}
|
|
49
|
+
this.pageId = prediction["page_id"];
|
|
50
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
51
|
+
if (prediction["polygon"]) {
|
|
52
|
+
this.polygon = prediction.polygon;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Default string representation.
|
|
57
|
+
*/
|
|
58
|
+
toString() {
|
|
59
|
+
const printable = __classPrivateFieldGet(this, _PayslipV2SalaryDetail_instances, "m", _PayslipV2SalaryDetail_printableValues).call(this);
|
|
60
|
+
return ("Amount: " +
|
|
61
|
+
printable.amount +
|
|
62
|
+
", Base: " +
|
|
63
|
+
printable.base +
|
|
64
|
+
", Description: " +
|
|
65
|
+
printable.description +
|
|
66
|
+
", Rate: " +
|
|
67
|
+
printable.rate);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
71
|
+
*/
|
|
72
|
+
toTableLine() {
|
|
73
|
+
const printable = __classPrivateFieldGet(this, _PayslipV2SalaryDetail_instances, "m", _PayslipV2SalaryDetail_printableValues).call(this);
|
|
74
|
+
return ("| " +
|
|
75
|
+
printable.amount.padEnd(12) +
|
|
76
|
+
" | " +
|
|
77
|
+
printable.base.padEnd(9) +
|
|
78
|
+
" | " +
|
|
79
|
+
printable.description.padEnd(36) +
|
|
80
|
+
" | " +
|
|
81
|
+
printable.rate.padEnd(9) +
|
|
82
|
+
" |");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.PayslipV2SalaryDetail = PayslipV2SalaryDetail;
|
|
86
|
+
_PayslipV2SalaryDetail_instances = new WeakSet(), _PayslipV2SalaryDetail_printableValues = function _PayslipV2SalaryDetail_printableValues() {
|
|
87
|
+
return {
|
|
88
|
+
amount: this.amount !== undefined ? (0, common_1.floatToString)(this.amount) : "",
|
|
89
|
+
base: this.base !== undefined ? (0, common_1.floatToString)(this.base) : "",
|
|
90
|
+
description: this.description ?
|
|
91
|
+
this.description.length <= 36 ?
|
|
92
|
+
(0, common_1.cleanSpecialChars)(this.description) :
|
|
93
|
+
(0, common_1.cleanSpecialChars)(this.description).slice(0, 33) + "..." :
|
|
94
|
+
"",
|
|
95
|
+
rate: this.rate !== undefined ? (0, common_1.floatToString)(this.rate) : "",
|
|
96
|
+
};
|
|
97
|
+
};
|
|
@@ -17,7 +17,8 @@ class GeneratedV1 extends common_1.Inference {
|
|
|
17
17
|
/** The document's pages. */
|
|
18
18
|
this.pages = [];
|
|
19
19
|
this.prediction = new generatedV1Document_1.GeneratedV1Document(rawPrediction["prediction"]);
|
|
20
|
-
this.pages = rawPrediction["pages"].length > 0 && Object.keys(rawPrediction["pages"][0]["prediction"]).length > 0 ?
|
|
20
|
+
this.pages = rawPrediction["pages"].length > 0 && Object.keys(rawPrediction["pages"][0]["prediction"]).length > 0 ?
|
|
21
|
+
rawPrediction["pages"].map((page) => new common_1.Page(generatedV1Page_1.GeneratedV1Page, page, page["id"])) : [];
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
exports.GeneratedV1 = GeneratedV1;
|
package/src/product/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { BarcodeReaderV1 } from "./barcodeReader/barcodeReaderV1";
|
|
2
|
+
export { BillOfLadingV1 } from "./billOfLading/billOfLadingV1";
|
|
2
3
|
export { CropperV1 } from "./cropper/cropperV1";
|
|
3
4
|
export { CustomV1 } from "./custom/customV1";
|
|
4
5
|
export { FinancialDocumentV1 } from "./financialDocument/financialDocumentV1";
|
|
@@ -8,6 +9,7 @@ export { InternationalIdV2 } from "./internationalId/internationalIdV2";
|
|
|
8
9
|
export { InvoiceV4 } from "./invoice/invoiceV4";
|
|
9
10
|
export { InvoiceSplitterV1 } from "./invoiceSplitter/invoiceSplitterV1";
|
|
10
11
|
export { MultiReceiptsDetectorV1 } from "./multiReceiptsDetector/multiReceiptsDetectorV1";
|
|
12
|
+
export { NutritionFactsLabelV1 } from "./nutritionFactsLabel/nutritionFactsLabelV1";
|
|
11
13
|
export { PassportV1 } from "./passport/passportV1";
|
|
12
14
|
export { ProofOfAddressV1 } from "./proofOfAddress/proofOfAddressV1";
|
|
13
15
|
export { ReceiptV4 } from "./receipt/receiptV4";
|
package/src/product/index.js
CHANGED
|
@@ -23,9 +23,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.us = exports.fr = exports.eu = exports.ResumeV1 = exports.ReceiptV5 = exports.ReceiptV4 = exports.ProofOfAddressV1 = exports.PassportV1 = exports.MultiReceiptsDetectorV1 = exports.InvoiceSplitterV1 = exports.InvoiceV4 = exports.InternationalIdV2 = exports.InternationalIdV1 = exports.GeneratedV1 = exports.FinancialDocumentV1 = exports.CustomV1 = exports.CropperV1 = exports.BarcodeReaderV1 = void 0;
|
|
26
|
+
exports.us = exports.fr = exports.eu = exports.ResumeV1 = exports.ReceiptV5 = exports.ReceiptV4 = exports.ProofOfAddressV1 = exports.PassportV1 = exports.NutritionFactsLabelV1 = exports.MultiReceiptsDetectorV1 = exports.InvoiceSplitterV1 = exports.InvoiceV4 = exports.InternationalIdV2 = exports.InternationalIdV1 = exports.GeneratedV1 = exports.FinancialDocumentV1 = exports.CustomV1 = exports.CropperV1 = exports.BillOfLadingV1 = exports.BarcodeReaderV1 = void 0;
|
|
27
27
|
var barcodeReaderV1_1 = require("./barcodeReader/barcodeReaderV1");
|
|
28
28
|
Object.defineProperty(exports, "BarcodeReaderV1", { enumerable: true, get: function () { return barcodeReaderV1_1.BarcodeReaderV1; } });
|
|
29
|
+
var billOfLadingV1_1 = require("./billOfLading/billOfLadingV1");
|
|
30
|
+
Object.defineProperty(exports, "BillOfLadingV1", { enumerable: true, get: function () { return billOfLadingV1_1.BillOfLadingV1; } });
|
|
29
31
|
var cropperV1_1 = require("./cropper/cropperV1");
|
|
30
32
|
Object.defineProperty(exports, "CropperV1", { enumerable: true, get: function () { return cropperV1_1.CropperV1; } });
|
|
31
33
|
var customV1_1 = require("./custom/customV1");
|
|
@@ -44,6 +46,8 @@ var invoiceSplitterV1_1 = require("./invoiceSplitter/invoiceSplitterV1");
|
|
|
44
46
|
Object.defineProperty(exports, "InvoiceSplitterV1", { enumerable: true, get: function () { return invoiceSplitterV1_1.InvoiceSplitterV1; } });
|
|
45
47
|
var multiReceiptsDetectorV1_1 = require("./multiReceiptsDetector/multiReceiptsDetectorV1");
|
|
46
48
|
Object.defineProperty(exports, "MultiReceiptsDetectorV1", { enumerable: true, get: function () { return multiReceiptsDetectorV1_1.MultiReceiptsDetectorV1; } });
|
|
49
|
+
var nutritionFactsLabelV1_1 = require("./nutritionFactsLabel/nutritionFactsLabelV1");
|
|
50
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1", { enumerable: true, get: function () { return nutritionFactsLabelV1_1.NutritionFactsLabelV1; } });
|
|
47
51
|
var passportV1_1 = require("./passport/passportV1");
|
|
48
52
|
Object.defineProperty(exports, "PassportV1", { enumerable: true, get: function () { return passportV1_1.PassportV1; } });
|
|
49
53
|
var proofOfAddressV1_1 = require("./proofOfAddress/proofOfAddressV1");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * as barcodeReader from "./barcodeReader/internal";
|
|
2
|
+
export * as billOfLading from "./billOfLading/internal";
|
|
2
3
|
export * as cropper from "./cropper/internal";
|
|
3
4
|
export * as custom from "./custom/internal";
|
|
4
5
|
export * as eu from "./eu/internal";
|
|
@@ -9,6 +10,7 @@ export * as internationalId from "./internationalId/internal";
|
|
|
9
10
|
export * as invoice from "./invoice/internal";
|
|
10
11
|
export * as invoiceSplitter from "./invoiceSplitter/internal";
|
|
11
12
|
export * as multiReceiptsDetector from "./multiReceiptsDetector/internal";
|
|
13
|
+
export * as nutritionFactsLabel from "./nutritionFactsLabel/internal";
|
|
12
14
|
export * as passport from "./passport/internal";
|
|
13
15
|
export * as proofOfAddress from "./proofOfAddress/internal";
|
|
14
16
|
export * as receipt from "./receipt/internal";
|
package/src/product/internal.js
CHANGED
|
@@ -23,8 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.us = exports.resume = exports.receipt = exports.proofOfAddress = exports.passport = exports.multiReceiptsDetector = exports.invoiceSplitter = exports.invoice = exports.internationalId = exports.generated = exports.fr = exports.financialDocument = exports.eu = exports.custom = exports.cropper = exports.barcodeReader = void 0;
|
|
26
|
+
exports.us = exports.resume = exports.receipt = exports.proofOfAddress = exports.passport = exports.nutritionFactsLabel = exports.multiReceiptsDetector = exports.invoiceSplitter = exports.invoice = exports.internationalId = exports.generated = exports.fr = exports.financialDocument = exports.eu = exports.custom = exports.cropper = exports.billOfLading = exports.barcodeReader = void 0;
|
|
27
27
|
exports.barcodeReader = __importStar(require("./barcodeReader/internal"));
|
|
28
|
+
exports.billOfLading = __importStar(require("./billOfLading/internal"));
|
|
28
29
|
exports.cropper = __importStar(require("./cropper/internal"));
|
|
29
30
|
exports.custom = __importStar(require("./custom/internal"));
|
|
30
31
|
exports.eu = __importStar(require("./eu/internal"));
|
|
@@ -35,6 +36,7 @@ exports.internationalId = __importStar(require("./internationalId/internal"));
|
|
|
35
36
|
exports.invoice = __importStar(require("./invoice/internal"));
|
|
36
37
|
exports.invoiceSplitter = __importStar(require("./invoiceSplitter/internal"));
|
|
37
38
|
exports.multiReceiptsDetector = __importStar(require("./multiReceiptsDetector/internal"));
|
|
39
|
+
exports.nutritionFactsLabel = __importStar(require("./nutritionFactsLabel/internal"));
|
|
38
40
|
exports.passport = __importStar(require("./passport/internal"));
|
|
39
41
|
exports.proofOfAddress = __importStar(require("./proofOfAddress/internal"));
|
|
40
42
|
exports.receipt = __importStar(require("./receipt/internal"));
|
|
@@ -6,21 +6,21 @@ import { Polygon } from "../../geometry";
|
|
|
6
6
|
export declare class InvoiceV4LineItem {
|
|
7
7
|
#private;
|
|
8
8
|
/** The item description. */
|
|
9
|
-
description: string |
|
|
9
|
+
description: string | null;
|
|
10
10
|
/** The product code referring to the item. */
|
|
11
|
-
productCode: string |
|
|
11
|
+
productCode: string | null;
|
|
12
12
|
/** The item quantity */
|
|
13
|
-
quantity: number |
|
|
13
|
+
quantity: number | null;
|
|
14
14
|
/** The item tax amount. */
|
|
15
|
-
taxAmount: number |
|
|
15
|
+
taxAmount: number | null;
|
|
16
16
|
/** The item tax rate in percentage. */
|
|
17
|
-
taxRate: number |
|
|
17
|
+
taxRate: number | null;
|
|
18
18
|
/** The item total amount. */
|
|
19
|
-
totalAmount: number |
|
|
19
|
+
totalAmount: number | null;
|
|
20
20
|
/** The item unit of measure. */
|
|
21
|
-
unitMeasure: string |
|
|
21
|
+
unitMeasure: string | null;
|
|
22
22
|
/** The item unit price. */
|
|
23
|
-
unitPrice: number |
|
|
23
|
+
unitPrice: number | null;
|
|
24
24
|
/** Confidence score */
|
|
25
25
|
confidence: number;
|
|
26
26
|
/** The document page on which the information was found. */
|
|
@@ -7,7 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
7
7
|
var _InvoiceV4LineItem_instances, _InvoiceV4LineItem_printableValues;
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.InvoiceV4LineItem = void 0;
|
|
10
|
-
const
|
|
10
|
+
const common_1 = require("../../parsing/common");
|
|
11
11
|
/**
|
|
12
12
|
* List of line item details.
|
|
13
13
|
*/
|
|
@@ -23,21 +23,46 @@ class InvoiceV4LineItem {
|
|
|
23
23
|
this.polygon = [];
|
|
24
24
|
this.description = prediction["description"];
|
|
25
25
|
this.productCode = prediction["product_code"];
|
|
26
|
-
if (prediction["quantity"]
|
|
27
|
-
|
|
26
|
+
if (prediction["quantity"] !== undefined &&
|
|
27
|
+
prediction["quantity"] !== null &&
|
|
28
|
+
!isNaN(prediction["quantity"])) {
|
|
29
|
+
this.quantity = +parseFloat(prediction["quantity"]);
|
|
28
30
|
}
|
|
29
|
-
|
|
30
|
-
this.
|
|
31
|
+
else {
|
|
32
|
+
this.quantity = null;
|
|
31
33
|
}
|
|
32
|
-
if (prediction["
|
|
33
|
-
|
|
34
|
+
if (prediction["tax_amount"] !== undefined &&
|
|
35
|
+
prediction["tax_amount"] !== null &&
|
|
36
|
+
!isNaN(prediction["tax_amount"])) {
|
|
37
|
+
this.taxAmount = +parseFloat(prediction["tax_amount"]);
|
|
34
38
|
}
|
|
35
|
-
|
|
36
|
-
this.
|
|
39
|
+
else {
|
|
40
|
+
this.taxAmount = null;
|
|
41
|
+
}
|
|
42
|
+
if (prediction["tax_rate"] !== undefined &&
|
|
43
|
+
prediction["tax_rate"] !== null &&
|
|
44
|
+
!isNaN(prediction["tax_rate"])) {
|
|
45
|
+
this.taxRate = +parseFloat(prediction["tax_rate"]);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.taxRate = null;
|
|
49
|
+
}
|
|
50
|
+
if (prediction["total_amount"] !== undefined &&
|
|
51
|
+
prediction["total_amount"] !== null &&
|
|
52
|
+
!isNaN(prediction["total_amount"])) {
|
|
53
|
+
this.totalAmount = +parseFloat(prediction["total_amount"]);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.totalAmount = null;
|
|
37
57
|
}
|
|
38
58
|
this.unitMeasure = prediction["unit_measure"];
|
|
39
|
-
if (prediction["unit_price"]
|
|
40
|
-
|
|
59
|
+
if (prediction["unit_price"] !== undefined &&
|
|
60
|
+
prediction["unit_price"] !== null &&
|
|
61
|
+
!isNaN(prediction["unit_price"])) {
|
|
62
|
+
this.unitPrice = +parseFloat(prediction["unit_price"]);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
this.unitPrice = null;
|
|
41
66
|
}
|
|
42
67
|
this.pageId = prediction["page_id"];
|
|
43
68
|
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
@@ -96,23 +121,23 @@ _InvoiceV4LineItem_instances = new WeakSet(), _InvoiceV4LineItem_printableValues
|
|
|
96
121
|
return {
|
|
97
122
|
description: this.description ?
|
|
98
123
|
this.description.length <= 36 ?
|
|
99
|
-
this.description :
|
|
100
|
-
this.description.slice(0, 33) + "..." :
|
|
124
|
+
(0, common_1.cleanSpecialChars)(this.description) :
|
|
125
|
+
(0, common_1.cleanSpecialChars)(this.description).slice(0, 33) + "..." :
|
|
101
126
|
"",
|
|
102
127
|
productCode: this.productCode ?
|
|
103
128
|
this.productCode.length <= 12 ?
|
|
104
|
-
this.productCode :
|
|
105
|
-
this.productCode.slice(0, 9) + "..." :
|
|
129
|
+
(0, common_1.cleanSpecialChars)(this.productCode) :
|
|
130
|
+
(0, common_1.cleanSpecialChars)(this.productCode).slice(0, 9) + "..." :
|
|
106
131
|
"",
|
|
107
|
-
quantity: this.quantity !== undefined ? (0,
|
|
108
|
-
taxAmount: this.taxAmount !== undefined ? (0,
|
|
109
|
-
taxRate: this.taxRate !== undefined ? (0,
|
|
110
|
-
totalAmount: this.totalAmount !== undefined ? (0,
|
|
132
|
+
quantity: this.quantity !== undefined ? (0, common_1.floatToString)(this.quantity) : "",
|
|
133
|
+
taxAmount: this.taxAmount !== undefined ? (0, common_1.floatToString)(this.taxAmount) : "",
|
|
134
|
+
taxRate: this.taxRate !== undefined ? (0, common_1.floatToString)(this.taxRate) : "",
|
|
135
|
+
totalAmount: this.totalAmount !== undefined ? (0, common_1.floatToString)(this.totalAmount) : "",
|
|
111
136
|
unitMeasure: this.unitMeasure ?
|
|
112
137
|
this.unitMeasure.length <= 15 ?
|
|
113
|
-
this.unitMeasure :
|
|
114
|
-
this.unitMeasure.slice(0, 12) + "..." :
|
|
138
|
+
(0, common_1.cleanSpecialChars)(this.unitMeasure) :
|
|
139
|
+
(0, common_1.cleanSpecialChars)(this.unitMeasure).slice(0, 12) + "..." :
|
|
115
140
|
"",
|
|
116
|
-
unitPrice: this.unitPrice !== undefined ? (0,
|
|
141
|
+
unitPrice: this.unitPrice !== undefined ? (0, common_1.floatToString)(this.unitPrice) : "",
|
|
117
142
|
};
|
|
118
143
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NutritionFactsLabelV1 } from "./nutritionFactsLabelV1";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NutritionFactsLabelV1 = void 0;
|
|
4
|
+
var nutritionFactsLabelV1_1 = require("./nutritionFactsLabelV1");
|
|
5
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1", { enumerable: true, get: function () { return nutritionFactsLabelV1_1.NutritionFactsLabelV1; } });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { NutritionFactsLabelV1 } from "./nutritionFactsLabelV1";
|
|
2
|
+
export { NutritionFactsLabelV1AddedSugar } from "./nutritionFactsLabelV1AddedSugar";
|
|
3
|
+
export { NutritionFactsLabelV1Calorie } from "./nutritionFactsLabelV1Calorie";
|
|
4
|
+
export { NutritionFactsLabelV1Cholesterol } from "./nutritionFactsLabelV1Cholesterol";
|
|
5
|
+
export { NutritionFactsLabelV1DietaryFiber } from "./nutritionFactsLabelV1DietaryFiber";
|
|
6
|
+
export { NutritionFactsLabelV1Document } from "./nutritionFactsLabelV1Document";
|
|
7
|
+
export { NutritionFactsLabelV1Nutrient } from "./nutritionFactsLabelV1Nutrient";
|
|
8
|
+
export { NutritionFactsLabelV1Protein } from "./nutritionFactsLabelV1Protein";
|
|
9
|
+
export { NutritionFactsLabelV1SaturatedFat } from "./nutritionFactsLabelV1SaturatedFat";
|
|
10
|
+
export { NutritionFactsLabelV1ServingSize } from "./nutritionFactsLabelV1ServingSize";
|
|
11
|
+
export { NutritionFactsLabelV1Sodium } from "./nutritionFactsLabelV1Sodium";
|
|
12
|
+
export { NutritionFactsLabelV1TotalCarbohydrate } from "./nutritionFactsLabelV1TotalCarbohydrate";
|
|
13
|
+
export { NutritionFactsLabelV1TotalFat } from "./nutritionFactsLabelV1TotalFat";
|
|
14
|
+
export { NutritionFactsLabelV1TotalSugar } from "./nutritionFactsLabelV1TotalSugar";
|
|
15
|
+
export { NutritionFactsLabelV1TransFat } from "./nutritionFactsLabelV1TransFat";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NutritionFactsLabelV1TransFat = exports.NutritionFactsLabelV1TotalSugar = exports.NutritionFactsLabelV1TotalFat = exports.NutritionFactsLabelV1TotalCarbohydrate = exports.NutritionFactsLabelV1Sodium = exports.NutritionFactsLabelV1ServingSize = exports.NutritionFactsLabelV1SaturatedFat = exports.NutritionFactsLabelV1Protein = exports.NutritionFactsLabelV1Nutrient = exports.NutritionFactsLabelV1Document = exports.NutritionFactsLabelV1DietaryFiber = exports.NutritionFactsLabelV1Cholesterol = exports.NutritionFactsLabelV1Calorie = exports.NutritionFactsLabelV1AddedSugar = exports.NutritionFactsLabelV1 = void 0;
|
|
4
|
+
var nutritionFactsLabelV1_1 = require("./nutritionFactsLabelV1");
|
|
5
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1", { enumerable: true, get: function () { return nutritionFactsLabelV1_1.NutritionFactsLabelV1; } });
|
|
6
|
+
var nutritionFactsLabelV1AddedSugar_1 = require("./nutritionFactsLabelV1AddedSugar");
|
|
7
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1AddedSugar", { enumerable: true, get: function () { return nutritionFactsLabelV1AddedSugar_1.NutritionFactsLabelV1AddedSugar; } });
|
|
8
|
+
var nutritionFactsLabelV1Calorie_1 = require("./nutritionFactsLabelV1Calorie");
|
|
9
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1Calorie", { enumerable: true, get: function () { return nutritionFactsLabelV1Calorie_1.NutritionFactsLabelV1Calorie; } });
|
|
10
|
+
var nutritionFactsLabelV1Cholesterol_1 = require("./nutritionFactsLabelV1Cholesterol");
|
|
11
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1Cholesterol", { enumerable: true, get: function () { return nutritionFactsLabelV1Cholesterol_1.NutritionFactsLabelV1Cholesterol; } });
|
|
12
|
+
var nutritionFactsLabelV1DietaryFiber_1 = require("./nutritionFactsLabelV1DietaryFiber");
|
|
13
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1DietaryFiber", { enumerable: true, get: function () { return nutritionFactsLabelV1DietaryFiber_1.NutritionFactsLabelV1DietaryFiber; } });
|
|
14
|
+
var nutritionFactsLabelV1Document_1 = require("./nutritionFactsLabelV1Document");
|
|
15
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1Document", { enumerable: true, get: function () { return nutritionFactsLabelV1Document_1.NutritionFactsLabelV1Document; } });
|
|
16
|
+
var nutritionFactsLabelV1Nutrient_1 = require("./nutritionFactsLabelV1Nutrient");
|
|
17
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1Nutrient", { enumerable: true, get: function () { return nutritionFactsLabelV1Nutrient_1.NutritionFactsLabelV1Nutrient; } });
|
|
18
|
+
var nutritionFactsLabelV1Protein_1 = require("./nutritionFactsLabelV1Protein");
|
|
19
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1Protein", { enumerable: true, get: function () { return nutritionFactsLabelV1Protein_1.NutritionFactsLabelV1Protein; } });
|
|
20
|
+
var nutritionFactsLabelV1SaturatedFat_1 = require("./nutritionFactsLabelV1SaturatedFat");
|
|
21
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1SaturatedFat", { enumerable: true, get: function () { return nutritionFactsLabelV1SaturatedFat_1.NutritionFactsLabelV1SaturatedFat; } });
|
|
22
|
+
var nutritionFactsLabelV1ServingSize_1 = require("./nutritionFactsLabelV1ServingSize");
|
|
23
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1ServingSize", { enumerable: true, get: function () { return nutritionFactsLabelV1ServingSize_1.NutritionFactsLabelV1ServingSize; } });
|
|
24
|
+
var nutritionFactsLabelV1Sodium_1 = require("./nutritionFactsLabelV1Sodium");
|
|
25
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1Sodium", { enumerable: true, get: function () { return nutritionFactsLabelV1Sodium_1.NutritionFactsLabelV1Sodium; } });
|
|
26
|
+
var nutritionFactsLabelV1TotalCarbohydrate_1 = require("./nutritionFactsLabelV1TotalCarbohydrate");
|
|
27
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1TotalCarbohydrate", { enumerable: true, get: function () { return nutritionFactsLabelV1TotalCarbohydrate_1.NutritionFactsLabelV1TotalCarbohydrate; } });
|
|
28
|
+
var nutritionFactsLabelV1TotalFat_1 = require("./nutritionFactsLabelV1TotalFat");
|
|
29
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1TotalFat", { enumerable: true, get: function () { return nutritionFactsLabelV1TotalFat_1.NutritionFactsLabelV1TotalFat; } });
|
|
30
|
+
var nutritionFactsLabelV1TotalSugar_1 = require("./nutritionFactsLabelV1TotalSugar");
|
|
31
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1TotalSugar", { enumerable: true, get: function () { return nutritionFactsLabelV1TotalSugar_1.NutritionFactsLabelV1TotalSugar; } });
|
|
32
|
+
var nutritionFactsLabelV1TransFat_1 = require("./nutritionFactsLabelV1TransFat");
|
|
33
|
+
Object.defineProperty(exports, "NutritionFactsLabelV1TransFat", { enumerable: true, get: function () { return nutritionFactsLabelV1TransFat_1.NutritionFactsLabelV1TransFat; } });
|