mindee 4.19.0 → 4.20.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 +7 -0
- package/package.json +1 -1
- package/src/cli.js +10 -20
- package/src/product/driverLicense/driverLicenseV1.d.ts +16 -0
- package/src/product/driverLicense/driverLicenseV1.js +27 -0
- package/src/product/driverLicense/driverLicenseV1Document.d.ts +38 -0
- package/src/product/driverLicense/driverLicenseV1Document.js +84 -0
- package/src/product/driverLicense/index.d.ts +1 -0
- package/src/product/driverLicense/index.js +5 -0
- package/src/product/driverLicense/internal.d.ts +2 -0
- package/src/product/driverLicense/internal.js +7 -0
- package/src/product/fr/healthCard/healthCardV1.d.ts +16 -0
- package/src/product/fr/healthCard/healthCardV1.js +27 -0
- package/src/product/fr/healthCard/healthCardV1Document.d.ts +20 -0
- package/src/product/fr/healthCard/healthCardV1Document.js +43 -0
- package/src/product/fr/healthCard/index.d.ts +1 -0
- package/src/product/fr/healthCard/index.js +5 -0
- package/src/product/fr/healthCard/internal.d.ts +2 -0
- package/src/product/fr/healthCard/internal.js +7 -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 +1 -0
- package/src/product/fr/internal.js +2 -1
- package/src/product/fr/payslip/index.d.ts +1 -0
- package/src/product/fr/payslip/index.js +3 -1
- package/src/product/fr/payslip/internal.d.ts +10 -0
- package/src/product/fr/payslip/internal.js +21 -1
- package/src/product/fr/payslip/payslipV3.d.ts +16 -0
- package/src/product/fr/payslip/payslipV3.js +27 -0
- package/src/product/fr/payslip/payslipV3BankAccountDetail.d.ts +32 -0
- package/src/product/fr/payslip/payslipV3BankAccountDetail.js +62 -0
- package/src/product/fr/payslip/payslipV3Document.d.ts +35 -0
- package/src/product/fr/payslip/payslipV3Document.js +96 -0
- package/src/product/fr/payslip/payslipV3Employee.d.ts +40 -0
- package/src/product/fr/payslip/payslipV3Employee.js +82 -0
- package/src/product/fr/payslip/payslipV3Employer.d.ts +40 -0
- package/src/product/fr/payslip/payslipV3Employer.js +82 -0
- package/src/product/fr/payslip/payslipV3Employment.d.ts +40 -0
- package/src/product/fr/payslip/payslipV3Employment.js +82 -0
- package/src/product/fr/payslip/payslipV3PaidTimeOff.d.ts +36 -0
- package/src/product/fr/payslip/payslipV3PaidTimeOff.js +107 -0
- package/src/product/fr/payslip/payslipV3PayDetail.d.ts +46 -0
- package/src/product/fr/payslip/payslipV3PayDetail.js +168 -0
- package/src/product/fr/payslip/payslipV3PayPeriod.d.ts +36 -0
- package/src/product/fr/payslip/payslipV3PayPeriod.js +72 -0
- package/src/product/fr/payslip/payslipV3SalaryDetail.d.ts +36 -0
- package/src/product/fr/payslip/payslipV3SalaryDetail.js +110 -0
- package/src/product/ind/indianPassport/indianPassportV1Document.d.ts +1 -1
- package/src/product/ind/indianPassport/indianPassportV1Document.js +1 -1
- package/src/product/index.d.ts +1 -0
- package/src/product/index.js +3 -1
- package/src/product/internal.d.ts +1 -0
- package/src/product/internal.js +2 -1
- package/src/product/resume/resumeV1Document.d.ts +1 -1
- package/src/product/resume/resumeV1Document.js +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
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 _PayslipV3PaidTimeOff_instances, _PayslipV3PaidTimeOff_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PayslipV3PaidTimeOff = void 0;
|
|
10
|
+
const common_1 = require("../../../parsing/common");
|
|
11
|
+
/**
|
|
12
|
+
* Information about paid time off.
|
|
13
|
+
*/
|
|
14
|
+
class PayslipV3PaidTimeOff {
|
|
15
|
+
constructor({ prediction = {} }) {
|
|
16
|
+
_PayslipV3PaidTimeOff_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"] !== undefined &&
|
|
25
|
+
prediction["accrued"] !== null &&
|
|
26
|
+
!isNaN(prediction["accrued"])) {
|
|
27
|
+
this.accrued = +parseFloat(prediction["accrued"]);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.accrued = null;
|
|
31
|
+
}
|
|
32
|
+
this.period = prediction["period"];
|
|
33
|
+
this.ptoType = prediction["pto_type"];
|
|
34
|
+
if (prediction["remaining"] !== undefined &&
|
|
35
|
+
prediction["remaining"] !== null &&
|
|
36
|
+
!isNaN(prediction["remaining"])) {
|
|
37
|
+
this.remaining = +parseFloat(prediction["remaining"]);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.remaining = null;
|
|
41
|
+
}
|
|
42
|
+
if (prediction["used"] !== undefined &&
|
|
43
|
+
prediction["used"] !== null &&
|
|
44
|
+
!isNaN(prediction["used"])) {
|
|
45
|
+
this.used = +parseFloat(prediction["used"]);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.used = null;
|
|
49
|
+
}
|
|
50
|
+
this.pageId = prediction["page_id"];
|
|
51
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
52
|
+
if (prediction["polygon"]) {
|
|
53
|
+
this.polygon = prediction.polygon;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Default string representation.
|
|
58
|
+
*/
|
|
59
|
+
toString() {
|
|
60
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3PaidTimeOff_instances, "m", _PayslipV3PaidTimeOff_printableValues).call(this);
|
|
61
|
+
return ("Accrued: " +
|
|
62
|
+
printable.accrued +
|
|
63
|
+
", Period: " +
|
|
64
|
+
printable.period +
|
|
65
|
+
", Type: " +
|
|
66
|
+
printable.ptoType +
|
|
67
|
+
", Remaining: " +
|
|
68
|
+
printable.remaining +
|
|
69
|
+
", Used: " +
|
|
70
|
+
printable.used);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
74
|
+
*/
|
|
75
|
+
toTableLine() {
|
|
76
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3PaidTimeOff_instances, "m", _PayslipV3PaidTimeOff_printableValues).call(this);
|
|
77
|
+
return ("| " +
|
|
78
|
+
printable.accrued.padEnd(9) +
|
|
79
|
+
" | " +
|
|
80
|
+
printable.period.padEnd(6) +
|
|
81
|
+
" | " +
|
|
82
|
+
printable.ptoType.padEnd(11) +
|
|
83
|
+
" | " +
|
|
84
|
+
printable.remaining.padEnd(9) +
|
|
85
|
+
" | " +
|
|
86
|
+
printable.used.padEnd(9) +
|
|
87
|
+
" |");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.PayslipV3PaidTimeOff = PayslipV3PaidTimeOff;
|
|
91
|
+
_PayslipV3PaidTimeOff_instances = new WeakSet(), _PayslipV3PaidTimeOff_printableValues = function _PayslipV3PaidTimeOff_printableValues() {
|
|
92
|
+
return {
|
|
93
|
+
accrued: this.accrued !== undefined ? (0, common_1.floatToString)(this.accrued) : "",
|
|
94
|
+
period: this.period ?
|
|
95
|
+
this.period.length <= 6 ?
|
|
96
|
+
(0, common_1.cleanSpecialChars)(this.period) :
|
|
97
|
+
(0, common_1.cleanSpecialChars)(this.period).slice(0, 3) + "..." :
|
|
98
|
+
"",
|
|
99
|
+
ptoType: this.ptoType ?
|
|
100
|
+
this.ptoType.length <= 11 ?
|
|
101
|
+
(0, common_1.cleanSpecialChars)(this.ptoType) :
|
|
102
|
+
(0, common_1.cleanSpecialChars)(this.ptoType).slice(0, 8) + "..." :
|
|
103
|
+
"",
|
|
104
|
+
remaining: this.remaining !== undefined ? (0, common_1.floatToString)(this.remaining) : "",
|
|
105
|
+
used: this.used !== undefined ? (0, common_1.floatToString)(this.used) : "",
|
|
106
|
+
};
|
|
107
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { StringDict } from "../../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* Detailed information about the pay.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PayslipV3PayDetail {
|
|
7
|
+
#private;
|
|
8
|
+
/** The gross salary of the employee. */
|
|
9
|
+
grossSalary: number | null;
|
|
10
|
+
/** The year-to-date gross salary of the employee. */
|
|
11
|
+
grossSalaryYtd: number | null;
|
|
12
|
+
/** The income tax rate of the employee. */
|
|
13
|
+
incomeTaxRate: number | null;
|
|
14
|
+
/** The income tax withheld from the employee's pay. */
|
|
15
|
+
incomeTaxWithheld: number | null;
|
|
16
|
+
/** The net paid amount of the employee. */
|
|
17
|
+
netPaid: number | null;
|
|
18
|
+
/** The net paid amount before tax of the employee. */
|
|
19
|
+
netPaidBeforeTax: number | null;
|
|
20
|
+
/** The net taxable amount of the employee. */
|
|
21
|
+
netTaxable: number | null;
|
|
22
|
+
/** The year-to-date net taxable amount of the employee. */
|
|
23
|
+
netTaxableYtd: number | null;
|
|
24
|
+
/** The total cost to the employer. */
|
|
25
|
+
totalCostEmployer: number | null;
|
|
26
|
+
/** The total taxes and deductions of the employee. */
|
|
27
|
+
totalTaxesAndDeductions: number | null;
|
|
28
|
+
/** Confidence score */
|
|
29
|
+
confidence: number;
|
|
30
|
+
/** The document page on which the information was found. */
|
|
31
|
+
pageId: number;
|
|
32
|
+
/**
|
|
33
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
34
|
+
* the field in the document.
|
|
35
|
+
*/
|
|
36
|
+
polygon: Polygon;
|
|
37
|
+
constructor({ prediction }: StringDict);
|
|
38
|
+
/**
|
|
39
|
+
* Default string representation.
|
|
40
|
+
*/
|
|
41
|
+
toString(): string;
|
|
42
|
+
/**
|
|
43
|
+
* Output in a format suitable for inclusion in a field list.
|
|
44
|
+
*/
|
|
45
|
+
toFieldList(): string;
|
|
46
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
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 _PayslipV3PayDetail_instances, _PayslipV3PayDetail_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PayslipV3PayDetail = void 0;
|
|
10
|
+
const common_1 = require("../../../parsing/common");
|
|
11
|
+
/**
|
|
12
|
+
* Detailed information about the pay.
|
|
13
|
+
*/
|
|
14
|
+
class PayslipV3PayDetail {
|
|
15
|
+
constructor({ prediction = {} }) {
|
|
16
|
+
_PayslipV3PayDetail_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["gross_salary"] !== undefined &&
|
|
25
|
+
prediction["gross_salary"] !== null &&
|
|
26
|
+
!isNaN(prediction["gross_salary"])) {
|
|
27
|
+
this.grossSalary = +parseFloat(prediction["gross_salary"]);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.grossSalary = null;
|
|
31
|
+
}
|
|
32
|
+
if (prediction["gross_salary_ytd"] !== undefined &&
|
|
33
|
+
prediction["gross_salary_ytd"] !== null &&
|
|
34
|
+
!isNaN(prediction["gross_salary_ytd"])) {
|
|
35
|
+
this.grossSalaryYtd = +parseFloat(prediction["gross_salary_ytd"]);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.grossSalaryYtd = null;
|
|
39
|
+
}
|
|
40
|
+
if (prediction["income_tax_rate"] !== undefined &&
|
|
41
|
+
prediction["income_tax_rate"] !== null &&
|
|
42
|
+
!isNaN(prediction["income_tax_rate"])) {
|
|
43
|
+
this.incomeTaxRate = +parseFloat(prediction["income_tax_rate"]);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
this.incomeTaxRate = null;
|
|
47
|
+
}
|
|
48
|
+
if (prediction["income_tax_withheld"] !== undefined &&
|
|
49
|
+
prediction["income_tax_withheld"] !== null &&
|
|
50
|
+
!isNaN(prediction["income_tax_withheld"])) {
|
|
51
|
+
this.incomeTaxWithheld = +parseFloat(prediction["income_tax_withheld"]);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this.incomeTaxWithheld = null;
|
|
55
|
+
}
|
|
56
|
+
if (prediction["net_paid"] !== undefined &&
|
|
57
|
+
prediction["net_paid"] !== null &&
|
|
58
|
+
!isNaN(prediction["net_paid"])) {
|
|
59
|
+
this.netPaid = +parseFloat(prediction["net_paid"]);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
this.netPaid = null;
|
|
63
|
+
}
|
|
64
|
+
if (prediction["net_paid_before_tax"] !== undefined &&
|
|
65
|
+
prediction["net_paid_before_tax"] !== null &&
|
|
66
|
+
!isNaN(prediction["net_paid_before_tax"])) {
|
|
67
|
+
this.netPaidBeforeTax = +parseFloat(prediction["net_paid_before_tax"]);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.netPaidBeforeTax = null;
|
|
71
|
+
}
|
|
72
|
+
if (prediction["net_taxable"] !== undefined &&
|
|
73
|
+
prediction["net_taxable"] !== null &&
|
|
74
|
+
!isNaN(prediction["net_taxable"])) {
|
|
75
|
+
this.netTaxable = +parseFloat(prediction["net_taxable"]);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.netTaxable = null;
|
|
79
|
+
}
|
|
80
|
+
if (prediction["net_taxable_ytd"] !== undefined &&
|
|
81
|
+
prediction["net_taxable_ytd"] !== null &&
|
|
82
|
+
!isNaN(prediction["net_taxable_ytd"])) {
|
|
83
|
+
this.netTaxableYtd = +parseFloat(prediction["net_taxable_ytd"]);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this.netTaxableYtd = null;
|
|
87
|
+
}
|
|
88
|
+
if (prediction["total_cost_employer"] !== undefined &&
|
|
89
|
+
prediction["total_cost_employer"] !== null &&
|
|
90
|
+
!isNaN(prediction["total_cost_employer"])) {
|
|
91
|
+
this.totalCostEmployer = +parseFloat(prediction["total_cost_employer"]);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
this.totalCostEmployer = null;
|
|
95
|
+
}
|
|
96
|
+
if (prediction["total_taxes_and_deductions"] !== undefined &&
|
|
97
|
+
prediction["total_taxes_and_deductions"] !== null &&
|
|
98
|
+
!isNaN(prediction["total_taxes_and_deductions"])) {
|
|
99
|
+
this.totalTaxesAndDeductions = +parseFloat(prediction["total_taxes_and_deductions"]);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.totalTaxesAndDeductions = null;
|
|
103
|
+
}
|
|
104
|
+
this.pageId = prediction["page_id"];
|
|
105
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
106
|
+
if (prediction["polygon"]) {
|
|
107
|
+
this.polygon = prediction.polygon;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Default string representation.
|
|
112
|
+
*/
|
|
113
|
+
toString() {
|
|
114
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3PayDetail_instances, "m", _PayslipV3PayDetail_printableValues).call(this);
|
|
115
|
+
return ("Gross Salary: " +
|
|
116
|
+
printable.grossSalary +
|
|
117
|
+
", Gross Salary YTD: " +
|
|
118
|
+
printable.grossSalaryYtd +
|
|
119
|
+
", Income Tax Rate: " +
|
|
120
|
+
printable.incomeTaxRate +
|
|
121
|
+
", Income Tax Withheld: " +
|
|
122
|
+
printable.incomeTaxWithheld +
|
|
123
|
+
", Net Paid: " +
|
|
124
|
+
printable.netPaid +
|
|
125
|
+
", Net Paid Before Tax: " +
|
|
126
|
+
printable.netPaidBeforeTax +
|
|
127
|
+
", Net Taxable: " +
|
|
128
|
+
printable.netTaxable +
|
|
129
|
+
", Net Taxable YTD: " +
|
|
130
|
+
printable.netTaxableYtd +
|
|
131
|
+
", Total Cost Employer: " +
|
|
132
|
+
printable.totalCostEmployer +
|
|
133
|
+
", Total Taxes and Deductions: " +
|
|
134
|
+
printable.totalTaxesAndDeductions);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Output in a format suitable for inclusion in a field list.
|
|
138
|
+
*/
|
|
139
|
+
toFieldList() {
|
|
140
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3PayDetail_instances, "m", _PayslipV3PayDetail_printableValues).call(this);
|
|
141
|
+
return `
|
|
142
|
+
:Gross Salary: ${printable.grossSalary}
|
|
143
|
+
:Gross Salary YTD: ${printable.grossSalaryYtd}
|
|
144
|
+
:Income Tax Rate: ${printable.incomeTaxRate}
|
|
145
|
+
:Income Tax Withheld: ${printable.incomeTaxWithheld}
|
|
146
|
+
:Net Paid: ${printable.netPaid}
|
|
147
|
+
:Net Paid Before Tax: ${printable.netPaidBeforeTax}
|
|
148
|
+
:Net Taxable: ${printable.netTaxable}
|
|
149
|
+
:Net Taxable YTD: ${printable.netTaxableYtd}
|
|
150
|
+
:Total Cost Employer: ${printable.totalCostEmployer}
|
|
151
|
+
:Total Taxes and Deductions: ${printable.totalTaxesAndDeductions}`.trimEnd();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
exports.PayslipV3PayDetail = PayslipV3PayDetail;
|
|
155
|
+
_PayslipV3PayDetail_instances = new WeakSet(), _PayslipV3PayDetail_printableValues = function _PayslipV3PayDetail_printableValues() {
|
|
156
|
+
return {
|
|
157
|
+
grossSalary: this.grossSalary !== undefined ? (0, common_1.floatToString)(this.grossSalary) : "",
|
|
158
|
+
grossSalaryYtd: this.grossSalaryYtd !== undefined ? (0, common_1.floatToString)(this.grossSalaryYtd) : "",
|
|
159
|
+
incomeTaxRate: this.incomeTaxRate !== undefined ? (0, common_1.floatToString)(this.incomeTaxRate) : "",
|
|
160
|
+
incomeTaxWithheld: this.incomeTaxWithheld !== undefined ? (0, common_1.floatToString)(this.incomeTaxWithheld) : "",
|
|
161
|
+
netPaid: this.netPaid !== undefined ? (0, common_1.floatToString)(this.netPaid) : "",
|
|
162
|
+
netPaidBeforeTax: this.netPaidBeforeTax !== undefined ? (0, common_1.floatToString)(this.netPaidBeforeTax) : "",
|
|
163
|
+
netTaxable: this.netTaxable !== undefined ? (0, common_1.floatToString)(this.netTaxable) : "",
|
|
164
|
+
netTaxableYtd: this.netTaxableYtd !== undefined ? (0, common_1.floatToString)(this.netTaxableYtd) : "",
|
|
165
|
+
totalCostEmployer: this.totalCostEmployer !== undefined ? (0, common_1.floatToString)(this.totalCostEmployer) : "",
|
|
166
|
+
totalTaxesAndDeductions: this.totalTaxesAndDeductions !== undefined ? (0, common_1.floatToString)(this.totalTaxesAndDeductions) : "",
|
|
167
|
+
};
|
|
168
|
+
};
|
|
@@ -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 PayslipV3PayPeriod {
|
|
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 _PayslipV3PayPeriod_instances, _PayslipV3PayPeriod_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PayslipV3PayPeriod = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Information about the pay period.
|
|
12
|
+
*/
|
|
13
|
+
class PayslipV3PayPeriod {
|
|
14
|
+
constructor({ prediction = {} }) {
|
|
15
|
+
_PayslipV3PayPeriod_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, _PayslipV3PayPeriod_instances, "m", _PayslipV3PayPeriod_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, _PayslipV3PayPeriod_instances, "m", _PayslipV3PayPeriod_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.PayslipV3PayPeriod = PayslipV3PayPeriod;
|
|
64
|
+
_PayslipV3PayPeriod_instances = new WeakSet(), _PayslipV3PayPeriod_printableValues = function _PayslipV3PayPeriod_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,36 @@
|
|
|
1
|
+
import { StringDict } from "../../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* Detailed information about the earnings.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PayslipV3SalaryDetail {
|
|
7
|
+
#private;
|
|
8
|
+
/** The amount of the earning. */
|
|
9
|
+
amount: number | null;
|
|
10
|
+
/** The base rate value of the earning. */
|
|
11
|
+
base: number | null;
|
|
12
|
+
/** The description of the earnings. */
|
|
13
|
+
description: string | null;
|
|
14
|
+
/** The number of units in the earning. */
|
|
15
|
+
number: number | null;
|
|
16
|
+
/** The rate of the earning. */
|
|
17
|
+
rate: number | 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 an rST table.
|
|
34
|
+
*/
|
|
35
|
+
toTableLine(): string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
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 _PayslipV3SalaryDetail_instances, _PayslipV3SalaryDetail_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PayslipV3SalaryDetail = void 0;
|
|
10
|
+
const common_1 = require("../../../parsing/common");
|
|
11
|
+
/**
|
|
12
|
+
* Detailed information about the earnings.
|
|
13
|
+
*/
|
|
14
|
+
class PayslipV3SalaryDetail {
|
|
15
|
+
constructor({ prediction = {} }) {
|
|
16
|
+
_PayslipV3SalaryDetail_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["number"] !== undefined &&
|
|
42
|
+
prediction["number"] !== null &&
|
|
43
|
+
!isNaN(prediction["number"])) {
|
|
44
|
+
this.number = +parseFloat(prediction["number"]);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.number = null;
|
|
48
|
+
}
|
|
49
|
+
if (prediction["rate"] !== undefined &&
|
|
50
|
+
prediction["rate"] !== null &&
|
|
51
|
+
!isNaN(prediction["rate"])) {
|
|
52
|
+
this.rate = +parseFloat(prediction["rate"]);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
this.rate = null;
|
|
56
|
+
}
|
|
57
|
+
this.pageId = prediction["page_id"];
|
|
58
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
59
|
+
if (prediction["polygon"]) {
|
|
60
|
+
this.polygon = prediction.polygon;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Default string representation.
|
|
65
|
+
*/
|
|
66
|
+
toString() {
|
|
67
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3SalaryDetail_instances, "m", _PayslipV3SalaryDetail_printableValues).call(this);
|
|
68
|
+
return ("Amount: " +
|
|
69
|
+
printable.amount +
|
|
70
|
+
", Base: " +
|
|
71
|
+
printable.base +
|
|
72
|
+
", Description: " +
|
|
73
|
+
printable.description +
|
|
74
|
+
", Number: " +
|
|
75
|
+
printable.number +
|
|
76
|
+
", Rate: " +
|
|
77
|
+
printable.rate);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
81
|
+
*/
|
|
82
|
+
toTableLine() {
|
|
83
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3SalaryDetail_instances, "m", _PayslipV3SalaryDetail_printableValues).call(this);
|
|
84
|
+
return ("| " +
|
|
85
|
+
printable.amount.padEnd(12) +
|
|
86
|
+
" | " +
|
|
87
|
+
printable.base.padEnd(9) +
|
|
88
|
+
" | " +
|
|
89
|
+
printable.description.padEnd(36) +
|
|
90
|
+
" | " +
|
|
91
|
+
printable.number.padEnd(6) +
|
|
92
|
+
" | " +
|
|
93
|
+
printable.rate.padEnd(9) +
|
|
94
|
+
" |");
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.PayslipV3SalaryDetail = PayslipV3SalaryDetail;
|
|
98
|
+
_PayslipV3SalaryDetail_instances = new WeakSet(), _PayslipV3SalaryDetail_printableValues = function _PayslipV3SalaryDetail_printableValues() {
|
|
99
|
+
return {
|
|
100
|
+
amount: this.amount !== undefined ? (0, common_1.floatToString)(this.amount) : "",
|
|
101
|
+
base: this.base !== undefined ? (0, common_1.floatToString)(this.base) : "",
|
|
102
|
+
description: this.description ?
|
|
103
|
+
this.description.length <= 36 ?
|
|
104
|
+
(0, common_1.cleanSpecialChars)(this.description) :
|
|
105
|
+
(0, common_1.cleanSpecialChars)(this.description).slice(0, 33) + "..." :
|
|
106
|
+
"",
|
|
107
|
+
number: this.number !== undefined ? (0, common_1.floatToString)(this.number) : "",
|
|
108
|
+
rate: this.rate !== undefined ? (0, common_1.floatToString)(this.rate) : "",
|
|
109
|
+
};
|
|
110
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Prediction, StringDict } from "../../../parsing/common";
|
|
2
2
|
import { ClassificationField, DateField, StringField } from "../../../parsing/standard";
|
|
3
3
|
/**
|
|
4
|
-
* Passport - India API version 1.
|
|
4
|
+
* Passport - India API version 1.1 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class IndianPassportV1Document implements Prediction {
|
|
7
7
|
/** The first line of the address of the passport holder. */
|
|
@@ -4,7 +4,7 @@ exports.IndianPassportV1Document = void 0;
|
|
|
4
4
|
const common_1 = require("../../../parsing/common");
|
|
5
5
|
const standard_1 = require("../../../parsing/standard");
|
|
6
6
|
/**
|
|
7
|
-
* Passport - India API version 1.
|
|
7
|
+
* Passport - India API version 1.1 document data.
|
|
8
8
|
*/
|
|
9
9
|
class IndianPassportV1Document {
|
|
10
10
|
constructor(rawPrediction, pageId) {
|
package/src/product/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { BusinessCardV1 } from "./businessCard/businessCardV1";
|
|
|
4
4
|
export { CropperV1 } from "./cropper/cropperV1";
|
|
5
5
|
export { CustomV1 } from "./custom/customV1";
|
|
6
6
|
export { DeliveryNoteV1 } from "./deliveryNote/deliveryNoteV1";
|
|
7
|
+
export { DriverLicenseV1 } from "./driverLicense/driverLicenseV1";
|
|
7
8
|
export { FinancialDocumentV1 } from "./financialDocument/financialDocumentV1";
|
|
8
9
|
export { GeneratedV1 } from "./generated/generatedV1";
|
|
9
10
|
export { InternationalIdV2 } from "./internationalId/internationalIdV2";
|
package/src/product/index.js
CHANGED
|
@@ -23,7 +23,7 @@ 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.ind = 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.GeneratedV1 = exports.FinancialDocumentV1 = exports.DeliveryNoteV1 = exports.CustomV1 = exports.CropperV1 = exports.BusinessCardV1 = exports.BillOfLadingV1 = exports.BarcodeReaderV1 = void 0;
|
|
26
|
+
exports.us = exports.ind = 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.GeneratedV1 = exports.FinancialDocumentV1 = exports.DriverLicenseV1 = exports.DeliveryNoteV1 = exports.CustomV1 = exports.CropperV1 = exports.BusinessCardV1 = 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
29
|
var billOfLadingV1_1 = require("./billOfLading/billOfLadingV1");
|
|
@@ -36,6 +36,8 @@ var customV1_1 = require("./custom/customV1");
|
|
|
36
36
|
Object.defineProperty(exports, "CustomV1", { enumerable: true, get: function () { return customV1_1.CustomV1; } });
|
|
37
37
|
var deliveryNoteV1_1 = require("./deliveryNote/deliveryNoteV1");
|
|
38
38
|
Object.defineProperty(exports, "DeliveryNoteV1", { enumerable: true, get: function () { return deliveryNoteV1_1.DeliveryNoteV1; } });
|
|
39
|
+
var driverLicenseV1_1 = require("./driverLicense/driverLicenseV1");
|
|
40
|
+
Object.defineProperty(exports, "DriverLicenseV1", { enumerable: true, get: function () { return driverLicenseV1_1.DriverLicenseV1; } });
|
|
39
41
|
var financialDocumentV1_1 = require("./financialDocument/financialDocumentV1");
|
|
40
42
|
Object.defineProperty(exports, "FinancialDocumentV1", { enumerable: true, get: function () { return financialDocumentV1_1.FinancialDocumentV1; } });
|
|
41
43
|
var generatedV1_1 = require("./generated/generatedV1");
|
|
@@ -4,6 +4,7 @@ export * as businessCard from "./businessCard/internal";
|
|
|
4
4
|
export * as cropper from "./cropper/internal";
|
|
5
5
|
export * as custom from "./custom/internal";
|
|
6
6
|
export * as deliveryNote from "./deliveryNote/internal";
|
|
7
|
+
export * as driverLicense from "./driverLicense/internal";
|
|
7
8
|
export * as eu from "./eu/internal";
|
|
8
9
|
export * as financialDocument from "./financialDocument/internal";
|
|
9
10
|
export * as fr from "./fr/internal";
|
package/src/product/internal.js
CHANGED
|
@@ -23,13 +23,14 @@ 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.nutritionFactsLabel = exports.multiReceiptsDetector = exports.invoiceSplitter = exports.invoice = exports.internationalId = exports.generated = exports.fr = exports.financialDocument = exports.eu = exports.deliveryNote = exports.custom = exports.cropper = exports.businessCard = exports.billOfLading = 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.driverLicense = exports.deliveryNote = exports.custom = exports.cropper = exports.businessCard = exports.billOfLading = exports.barcodeReader = void 0;
|
|
27
27
|
exports.barcodeReader = __importStar(require("./barcodeReader/internal"));
|
|
28
28
|
exports.billOfLading = __importStar(require("./billOfLading/internal"));
|
|
29
29
|
exports.businessCard = __importStar(require("./businessCard/internal"));
|
|
30
30
|
exports.cropper = __importStar(require("./cropper/internal"));
|
|
31
31
|
exports.custom = __importStar(require("./custom/internal"));
|
|
32
32
|
exports.deliveryNote = __importStar(require("./deliveryNote/internal"));
|
|
33
|
+
exports.driverLicense = __importStar(require("./driverLicense/internal"));
|
|
33
34
|
exports.eu = __importStar(require("./eu/internal"));
|
|
34
35
|
exports.financialDocument = __importStar(require("./financialDocument/internal"));
|
|
35
36
|
exports.fr = __importStar(require("./fr/internal"));
|
|
@@ -6,7 +6,7 @@ import { ResumeV1ProfessionalExperience } from "./resumeV1ProfessionalExperience
|
|
|
6
6
|
import { ResumeV1Certificate } from "./resumeV1Certificate";
|
|
7
7
|
import { ClassificationField, StringField } from "../../parsing/standard";
|
|
8
8
|
/**
|
|
9
|
-
* Resume API version 1.
|
|
9
|
+
* Resume API version 1.2 document data.
|
|
10
10
|
*/
|
|
11
11
|
export declare class ResumeV1Document implements Prediction {
|
|
12
12
|
/** The location information of the candidate, including city, state, and country. */
|