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,62 @@
|
|
|
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 _PayslipV3BankAccountDetail_instances, _PayslipV3BankAccountDetail_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PayslipV3BankAccountDetail = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Information about the employee's bank account.
|
|
12
|
+
*/
|
|
13
|
+
class PayslipV3BankAccountDetail {
|
|
14
|
+
constructor({ prediction = {} }) {
|
|
15
|
+
_PayslipV3BankAccountDetail_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.bankName = prediction["bank_name"];
|
|
24
|
+
this.iban = prediction["iban"];
|
|
25
|
+
this.swift = prediction["swift"];
|
|
26
|
+
this.pageId = prediction["page_id"];
|
|
27
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
28
|
+
if (prediction["polygon"]) {
|
|
29
|
+
this.polygon = prediction.polygon;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Default string representation.
|
|
34
|
+
*/
|
|
35
|
+
toString() {
|
|
36
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3BankAccountDetail_instances, "m", _PayslipV3BankAccountDetail_printableValues).call(this);
|
|
37
|
+
return ("Bank Name: " +
|
|
38
|
+
printable.bankName +
|
|
39
|
+
", IBAN: " +
|
|
40
|
+
printable.iban +
|
|
41
|
+
", SWIFT: " +
|
|
42
|
+
printable.swift);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Output in a format suitable for inclusion in a field list.
|
|
46
|
+
*/
|
|
47
|
+
toFieldList() {
|
|
48
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3BankAccountDetail_instances, "m", _PayslipV3BankAccountDetail_printableValues).call(this);
|
|
49
|
+
return `
|
|
50
|
+
:Bank Name: ${printable.bankName}
|
|
51
|
+
:IBAN: ${printable.iban}
|
|
52
|
+
:SWIFT: ${printable.swift}`.trimEnd();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.PayslipV3BankAccountDetail = PayslipV3BankAccountDetail;
|
|
56
|
+
_PayslipV3BankAccountDetail_instances = new WeakSet(), _PayslipV3BankAccountDetail_printableValues = function _PayslipV3BankAccountDetail_printableValues() {
|
|
57
|
+
return {
|
|
58
|
+
bankName: this.bankName ?? "",
|
|
59
|
+
iban: this.iban ?? "",
|
|
60
|
+
swift: this.swift ?? "",
|
|
61
|
+
};
|
|
62
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Prediction, StringDict } from "../../../parsing/common";
|
|
2
|
+
import { PayslipV3PayPeriod } from "./payslipV3PayPeriod";
|
|
3
|
+
import { PayslipV3Employee } from "./payslipV3Employee";
|
|
4
|
+
import { PayslipV3Employer } from "./payslipV3Employer";
|
|
5
|
+
import { PayslipV3BankAccountDetail } from "./payslipV3BankAccountDetail";
|
|
6
|
+
import { PayslipV3Employment } from "./payslipV3Employment";
|
|
7
|
+
import { PayslipV3SalaryDetail } from "./payslipV3SalaryDetail";
|
|
8
|
+
import { PayslipV3PayDetail } from "./payslipV3PayDetail";
|
|
9
|
+
import { PayslipV3PaidTimeOff } from "./payslipV3PaidTimeOff";
|
|
10
|
+
/**
|
|
11
|
+
* Payslip API version 3.0 document data.
|
|
12
|
+
*/
|
|
13
|
+
export declare class PayslipV3Document implements Prediction {
|
|
14
|
+
/** Information about the employee's bank account. */
|
|
15
|
+
bankAccountDetails: PayslipV3BankAccountDetail;
|
|
16
|
+
/** Information about the employee. */
|
|
17
|
+
employee: PayslipV3Employee;
|
|
18
|
+
/** Information about the employer. */
|
|
19
|
+
employer: PayslipV3Employer;
|
|
20
|
+
/** Information about the employment. */
|
|
21
|
+
employment: PayslipV3Employment;
|
|
22
|
+
/** Information about paid time off. */
|
|
23
|
+
paidTimeOff: PayslipV3PaidTimeOff[];
|
|
24
|
+
/** Detailed information about the pay. */
|
|
25
|
+
payDetail: PayslipV3PayDetail;
|
|
26
|
+
/** Information about the pay period. */
|
|
27
|
+
payPeriod: PayslipV3PayPeriod;
|
|
28
|
+
/** Detailed information about the earnings. */
|
|
29
|
+
salaryDetails: PayslipV3SalaryDetail[];
|
|
30
|
+
constructor(rawPrediction: StringDict, pageId?: number);
|
|
31
|
+
/**
|
|
32
|
+
* Default string representation.
|
|
33
|
+
*/
|
|
34
|
+
toString(): string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PayslipV3Document = void 0;
|
|
4
|
+
const common_1 = require("../../../parsing/common");
|
|
5
|
+
const payslipV3PayPeriod_1 = require("./payslipV3PayPeriod");
|
|
6
|
+
const payslipV3Employee_1 = require("./payslipV3Employee");
|
|
7
|
+
const payslipV3Employer_1 = require("./payslipV3Employer");
|
|
8
|
+
const payslipV3BankAccountDetail_1 = require("./payslipV3BankAccountDetail");
|
|
9
|
+
const payslipV3Employment_1 = require("./payslipV3Employment");
|
|
10
|
+
const payslipV3SalaryDetail_1 = require("./payslipV3SalaryDetail");
|
|
11
|
+
const payslipV3PayDetail_1 = require("./payslipV3PayDetail");
|
|
12
|
+
const payslipV3PaidTimeOff_1 = require("./payslipV3PaidTimeOff");
|
|
13
|
+
/**
|
|
14
|
+
* Payslip API version 3.0 document data.
|
|
15
|
+
*/
|
|
16
|
+
class PayslipV3Document {
|
|
17
|
+
constructor(rawPrediction, pageId) {
|
|
18
|
+
/** Information about paid time off. */
|
|
19
|
+
this.paidTimeOff = [];
|
|
20
|
+
/** Detailed information about the earnings. */
|
|
21
|
+
this.salaryDetails = [];
|
|
22
|
+
this.bankAccountDetails = new payslipV3BankAccountDetail_1.PayslipV3BankAccountDetail({
|
|
23
|
+
prediction: rawPrediction["bank_account_details"],
|
|
24
|
+
pageId: pageId,
|
|
25
|
+
});
|
|
26
|
+
this.employee = new payslipV3Employee_1.PayslipV3Employee({
|
|
27
|
+
prediction: rawPrediction["employee"],
|
|
28
|
+
pageId: pageId,
|
|
29
|
+
});
|
|
30
|
+
this.employer = new payslipV3Employer_1.PayslipV3Employer({
|
|
31
|
+
prediction: rawPrediction["employer"],
|
|
32
|
+
pageId: pageId,
|
|
33
|
+
});
|
|
34
|
+
this.employment = new payslipV3Employment_1.PayslipV3Employment({
|
|
35
|
+
prediction: rawPrediction["employment"],
|
|
36
|
+
pageId: pageId,
|
|
37
|
+
});
|
|
38
|
+
rawPrediction["paid_time_off"] &&
|
|
39
|
+
rawPrediction["paid_time_off"].map((itemPrediction) => this.paidTimeOff.push(new payslipV3PaidTimeOff_1.PayslipV3PaidTimeOff({
|
|
40
|
+
prediction: itemPrediction,
|
|
41
|
+
pageId: pageId,
|
|
42
|
+
})));
|
|
43
|
+
this.payDetail = new payslipV3PayDetail_1.PayslipV3PayDetail({
|
|
44
|
+
prediction: rawPrediction["pay_detail"],
|
|
45
|
+
pageId: pageId,
|
|
46
|
+
});
|
|
47
|
+
this.payPeriod = new payslipV3PayPeriod_1.PayslipV3PayPeriod({
|
|
48
|
+
prediction: rawPrediction["pay_period"],
|
|
49
|
+
pageId: pageId,
|
|
50
|
+
});
|
|
51
|
+
rawPrediction["salary_details"] &&
|
|
52
|
+
rawPrediction["salary_details"].map((itemPrediction) => this.salaryDetails.push(new payslipV3SalaryDetail_1.PayslipV3SalaryDetail({
|
|
53
|
+
prediction: itemPrediction,
|
|
54
|
+
pageId: pageId,
|
|
55
|
+
})));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Default string representation.
|
|
59
|
+
*/
|
|
60
|
+
toString() {
|
|
61
|
+
let salaryDetailsSummary = "";
|
|
62
|
+
if (this.salaryDetails && this.salaryDetails.length > 0) {
|
|
63
|
+
const salaryDetailsColSizes = [14, 11, 38, 8, 11];
|
|
64
|
+
salaryDetailsSummary += "\n" + (0, common_1.lineSeparator)(salaryDetailsColSizes, "-") + "\n ";
|
|
65
|
+
salaryDetailsSummary += "| Amount ";
|
|
66
|
+
salaryDetailsSummary += "| Base ";
|
|
67
|
+
salaryDetailsSummary += "| Description ";
|
|
68
|
+
salaryDetailsSummary += "| Number ";
|
|
69
|
+
salaryDetailsSummary += "| Rate ";
|
|
70
|
+
salaryDetailsSummary += "|\n" + (0, common_1.lineSeparator)(salaryDetailsColSizes, "=");
|
|
71
|
+
salaryDetailsSummary += this.salaryDetails.map((item) => "\n " + item.toTableLine() + "\n" + (0, common_1.lineSeparator)(salaryDetailsColSizes, "-")).join("");
|
|
72
|
+
}
|
|
73
|
+
let paidTimeOffSummary = "";
|
|
74
|
+
if (this.paidTimeOff && this.paidTimeOff.length > 0) {
|
|
75
|
+
const paidTimeOffColSizes = [11, 8, 13, 11, 11];
|
|
76
|
+
paidTimeOffSummary += "\n" + (0, common_1.lineSeparator)(paidTimeOffColSizes, "-") + "\n ";
|
|
77
|
+
paidTimeOffSummary += "| Accrued ";
|
|
78
|
+
paidTimeOffSummary += "| Period ";
|
|
79
|
+
paidTimeOffSummary += "| Type ";
|
|
80
|
+
paidTimeOffSummary += "| Remaining ";
|
|
81
|
+
paidTimeOffSummary += "| Used ";
|
|
82
|
+
paidTimeOffSummary += "|\n" + (0, common_1.lineSeparator)(paidTimeOffColSizes, "=");
|
|
83
|
+
paidTimeOffSummary += this.paidTimeOff.map((item) => "\n " + item.toTableLine() + "\n" + (0, common_1.lineSeparator)(paidTimeOffColSizes, "-")).join("");
|
|
84
|
+
}
|
|
85
|
+
const outStr = `:Pay Period: ${this.payPeriod.toFieldList()}
|
|
86
|
+
:Employee: ${this.employee.toFieldList()}
|
|
87
|
+
:Employer: ${this.employer.toFieldList()}
|
|
88
|
+
:Bank Account Details: ${this.bankAccountDetails.toFieldList()}
|
|
89
|
+
:Employment: ${this.employment.toFieldList()}
|
|
90
|
+
:Salary Details: ${salaryDetailsSummary}
|
|
91
|
+
:Pay Detail: ${this.payDetail.toFieldList()}
|
|
92
|
+
:Paid Time Off: ${paidTimeOffSummary}`.trimEnd();
|
|
93
|
+
return (0, common_1.cleanOutString)(outStr);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.PayslipV3Document = PayslipV3Document;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { StringDict } from "../../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* Information about the employee.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PayslipV3Employee {
|
|
7
|
+
#private;
|
|
8
|
+
/** The address of the employee. */
|
|
9
|
+
address: string | null;
|
|
10
|
+
/** The date of birth of the employee. */
|
|
11
|
+
dateOfBirth: string | null;
|
|
12
|
+
/** The first name of the employee. */
|
|
13
|
+
firstName: string | null;
|
|
14
|
+
/** The last name of the employee. */
|
|
15
|
+
lastName: string | null;
|
|
16
|
+
/** The phone number of the employee. */
|
|
17
|
+
phoneNumber: string | null;
|
|
18
|
+
/** The registration number of the employee. */
|
|
19
|
+
registrationNumber: string | null;
|
|
20
|
+
/** The social security number of the employee. */
|
|
21
|
+
socialSecurityNumber: string | null;
|
|
22
|
+
/** Confidence score */
|
|
23
|
+
confidence: number;
|
|
24
|
+
/** The document page on which the information was found. */
|
|
25
|
+
pageId: number;
|
|
26
|
+
/**
|
|
27
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
28
|
+
* the field in the document.
|
|
29
|
+
*/
|
|
30
|
+
polygon: Polygon;
|
|
31
|
+
constructor({ prediction }: StringDict);
|
|
32
|
+
/**
|
|
33
|
+
* Default string representation.
|
|
34
|
+
*/
|
|
35
|
+
toString(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Output in a format suitable for inclusion in a field list.
|
|
38
|
+
*/
|
|
39
|
+
toFieldList(): string;
|
|
40
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 _PayslipV3Employee_instances, _PayslipV3Employee_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PayslipV3Employee = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Information about the employee.
|
|
12
|
+
*/
|
|
13
|
+
class PayslipV3Employee {
|
|
14
|
+
constructor({ prediction = {} }) {
|
|
15
|
+
_PayslipV3Employee_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.address = prediction["address"];
|
|
24
|
+
this.dateOfBirth = prediction["date_of_birth"];
|
|
25
|
+
this.firstName = prediction["first_name"];
|
|
26
|
+
this.lastName = prediction["last_name"];
|
|
27
|
+
this.phoneNumber = prediction["phone_number"];
|
|
28
|
+
this.registrationNumber = prediction["registration_number"];
|
|
29
|
+
this.socialSecurityNumber = prediction["social_security_number"];
|
|
30
|
+
this.pageId = prediction["page_id"];
|
|
31
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
32
|
+
if (prediction["polygon"]) {
|
|
33
|
+
this.polygon = prediction.polygon;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Default string representation.
|
|
38
|
+
*/
|
|
39
|
+
toString() {
|
|
40
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3Employee_instances, "m", _PayslipV3Employee_printableValues).call(this);
|
|
41
|
+
return ("Address: " +
|
|
42
|
+
printable.address +
|
|
43
|
+
", Date of Birth: " +
|
|
44
|
+
printable.dateOfBirth +
|
|
45
|
+
", First Name: " +
|
|
46
|
+
printable.firstName +
|
|
47
|
+
", Last Name: " +
|
|
48
|
+
printable.lastName +
|
|
49
|
+
", Phone Number: " +
|
|
50
|
+
printable.phoneNumber +
|
|
51
|
+
", Registration Number: " +
|
|
52
|
+
printable.registrationNumber +
|
|
53
|
+
", Social Security Number: " +
|
|
54
|
+
printable.socialSecurityNumber);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Output in a format suitable for inclusion in a field list.
|
|
58
|
+
*/
|
|
59
|
+
toFieldList() {
|
|
60
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3Employee_instances, "m", _PayslipV3Employee_printableValues).call(this);
|
|
61
|
+
return `
|
|
62
|
+
:Address: ${printable.address}
|
|
63
|
+
:Date of Birth: ${printable.dateOfBirth}
|
|
64
|
+
:First Name: ${printable.firstName}
|
|
65
|
+
:Last Name: ${printable.lastName}
|
|
66
|
+
:Phone Number: ${printable.phoneNumber}
|
|
67
|
+
:Registration Number: ${printable.registrationNumber}
|
|
68
|
+
:Social Security Number: ${printable.socialSecurityNumber}`.trimEnd();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.PayslipV3Employee = PayslipV3Employee;
|
|
72
|
+
_PayslipV3Employee_instances = new WeakSet(), _PayslipV3Employee_printableValues = function _PayslipV3Employee_printableValues() {
|
|
73
|
+
return {
|
|
74
|
+
address: this.address ?? "",
|
|
75
|
+
dateOfBirth: this.dateOfBirth ?? "",
|
|
76
|
+
firstName: this.firstName ?? "",
|
|
77
|
+
lastName: this.lastName ?? "",
|
|
78
|
+
phoneNumber: this.phoneNumber ?? "",
|
|
79
|
+
registrationNumber: this.registrationNumber ?? "",
|
|
80
|
+
socialSecurityNumber: this.socialSecurityNumber ?? "",
|
|
81
|
+
};
|
|
82
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { StringDict } from "../../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* Information about the employer.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PayslipV3Employer {
|
|
7
|
+
#private;
|
|
8
|
+
/** The address of the employer. */
|
|
9
|
+
address: string | null;
|
|
10
|
+
/** The company ID of the employer. */
|
|
11
|
+
companyId: string | null;
|
|
12
|
+
/** The site of the company. */
|
|
13
|
+
companySite: string | null;
|
|
14
|
+
/** The NAF code of the employer. */
|
|
15
|
+
nafCode: string | null;
|
|
16
|
+
/** The name of the employer. */
|
|
17
|
+
name: string | null;
|
|
18
|
+
/** The phone number of the employer. */
|
|
19
|
+
phoneNumber: string | null;
|
|
20
|
+
/** The URSSAF number of the employer. */
|
|
21
|
+
urssafNumber: string | null;
|
|
22
|
+
/** Confidence score */
|
|
23
|
+
confidence: number;
|
|
24
|
+
/** The document page on which the information was found. */
|
|
25
|
+
pageId: number;
|
|
26
|
+
/**
|
|
27
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
28
|
+
* the field in the document.
|
|
29
|
+
*/
|
|
30
|
+
polygon: Polygon;
|
|
31
|
+
constructor({ prediction }: StringDict);
|
|
32
|
+
/**
|
|
33
|
+
* Default string representation.
|
|
34
|
+
*/
|
|
35
|
+
toString(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Output in a format suitable for inclusion in a field list.
|
|
38
|
+
*/
|
|
39
|
+
toFieldList(): string;
|
|
40
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 _PayslipV3Employer_instances, _PayslipV3Employer_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PayslipV3Employer = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Information about the employer.
|
|
12
|
+
*/
|
|
13
|
+
class PayslipV3Employer {
|
|
14
|
+
constructor({ prediction = {} }) {
|
|
15
|
+
_PayslipV3Employer_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.address = prediction["address"];
|
|
24
|
+
this.companyId = prediction["company_id"];
|
|
25
|
+
this.companySite = prediction["company_site"];
|
|
26
|
+
this.nafCode = prediction["naf_code"];
|
|
27
|
+
this.name = prediction["name"];
|
|
28
|
+
this.phoneNumber = prediction["phone_number"];
|
|
29
|
+
this.urssafNumber = prediction["urssaf_number"];
|
|
30
|
+
this.pageId = prediction["page_id"];
|
|
31
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
32
|
+
if (prediction["polygon"]) {
|
|
33
|
+
this.polygon = prediction.polygon;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Default string representation.
|
|
38
|
+
*/
|
|
39
|
+
toString() {
|
|
40
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3Employer_instances, "m", _PayslipV3Employer_printableValues).call(this);
|
|
41
|
+
return ("Address: " +
|
|
42
|
+
printable.address +
|
|
43
|
+
", Company ID: " +
|
|
44
|
+
printable.companyId +
|
|
45
|
+
", Company Site: " +
|
|
46
|
+
printable.companySite +
|
|
47
|
+
", NAF Code: " +
|
|
48
|
+
printable.nafCode +
|
|
49
|
+
", Name: " +
|
|
50
|
+
printable.name +
|
|
51
|
+
", Phone Number: " +
|
|
52
|
+
printable.phoneNumber +
|
|
53
|
+
", URSSAF Number: " +
|
|
54
|
+
printable.urssafNumber);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Output in a format suitable for inclusion in a field list.
|
|
58
|
+
*/
|
|
59
|
+
toFieldList() {
|
|
60
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3Employer_instances, "m", _PayslipV3Employer_printableValues).call(this);
|
|
61
|
+
return `
|
|
62
|
+
:Address: ${printable.address}
|
|
63
|
+
:Company ID: ${printable.companyId}
|
|
64
|
+
:Company Site: ${printable.companySite}
|
|
65
|
+
:NAF Code: ${printable.nafCode}
|
|
66
|
+
:Name: ${printable.name}
|
|
67
|
+
:Phone Number: ${printable.phoneNumber}
|
|
68
|
+
:URSSAF Number: ${printable.urssafNumber}`.trimEnd();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.PayslipV3Employer = PayslipV3Employer;
|
|
72
|
+
_PayslipV3Employer_instances = new WeakSet(), _PayslipV3Employer_printableValues = function _PayslipV3Employer_printableValues() {
|
|
73
|
+
return {
|
|
74
|
+
address: this.address ?? "",
|
|
75
|
+
companyId: this.companyId ?? "",
|
|
76
|
+
companySite: this.companySite ?? "",
|
|
77
|
+
nafCode: this.nafCode ?? "",
|
|
78
|
+
name: this.name ?? "",
|
|
79
|
+
phoneNumber: this.phoneNumber ?? "",
|
|
80
|
+
urssafNumber: this.urssafNumber ?? "",
|
|
81
|
+
};
|
|
82
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { StringDict } from "../../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* Information about the employment.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PayslipV3Employment {
|
|
7
|
+
#private;
|
|
8
|
+
/** The category of the employment. */
|
|
9
|
+
category: string | null;
|
|
10
|
+
/** The coefficient of the employment. */
|
|
11
|
+
coefficient: string | null;
|
|
12
|
+
/** The collective agreement of the employment. */
|
|
13
|
+
collectiveAgreement: string | null;
|
|
14
|
+
/** The job title of the employee. */
|
|
15
|
+
jobTitle: string | null;
|
|
16
|
+
/** The position level of the employment. */
|
|
17
|
+
positionLevel: string | null;
|
|
18
|
+
/** The seniority date of the employment. */
|
|
19
|
+
seniorityDate: string | null;
|
|
20
|
+
/** The start date of the employment. */
|
|
21
|
+
startDate: string | null;
|
|
22
|
+
/** Confidence score */
|
|
23
|
+
confidence: number;
|
|
24
|
+
/** The document page on which the information was found. */
|
|
25
|
+
pageId: number;
|
|
26
|
+
/**
|
|
27
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
28
|
+
* the field in the document.
|
|
29
|
+
*/
|
|
30
|
+
polygon: Polygon;
|
|
31
|
+
constructor({ prediction }: StringDict);
|
|
32
|
+
/**
|
|
33
|
+
* Default string representation.
|
|
34
|
+
*/
|
|
35
|
+
toString(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Output in a format suitable for inclusion in a field list.
|
|
38
|
+
*/
|
|
39
|
+
toFieldList(): string;
|
|
40
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 _PayslipV3Employment_instances, _PayslipV3Employment_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PayslipV3Employment = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Information about the employment.
|
|
12
|
+
*/
|
|
13
|
+
class PayslipV3Employment {
|
|
14
|
+
constructor({ prediction = {} }) {
|
|
15
|
+
_PayslipV3Employment_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.category = prediction["category"];
|
|
24
|
+
this.coefficient = prediction["coefficient"];
|
|
25
|
+
this.collectiveAgreement = prediction["collective_agreement"];
|
|
26
|
+
this.jobTitle = prediction["job_title"];
|
|
27
|
+
this.positionLevel = prediction["position_level"];
|
|
28
|
+
this.seniorityDate = prediction["seniority_date"];
|
|
29
|
+
this.startDate = prediction["start_date"];
|
|
30
|
+
this.pageId = prediction["page_id"];
|
|
31
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
32
|
+
if (prediction["polygon"]) {
|
|
33
|
+
this.polygon = prediction.polygon;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Default string representation.
|
|
38
|
+
*/
|
|
39
|
+
toString() {
|
|
40
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3Employment_instances, "m", _PayslipV3Employment_printableValues).call(this);
|
|
41
|
+
return ("Category: " +
|
|
42
|
+
printable.category +
|
|
43
|
+
", Coefficient: " +
|
|
44
|
+
printable.coefficient +
|
|
45
|
+
", Collective Agreement: " +
|
|
46
|
+
printable.collectiveAgreement +
|
|
47
|
+
", Job Title: " +
|
|
48
|
+
printable.jobTitle +
|
|
49
|
+
", Position Level: " +
|
|
50
|
+
printable.positionLevel +
|
|
51
|
+
", Seniority Date: " +
|
|
52
|
+
printable.seniorityDate +
|
|
53
|
+
", Start Date: " +
|
|
54
|
+
printable.startDate);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Output in a format suitable for inclusion in a field list.
|
|
58
|
+
*/
|
|
59
|
+
toFieldList() {
|
|
60
|
+
const printable = __classPrivateFieldGet(this, _PayslipV3Employment_instances, "m", _PayslipV3Employment_printableValues).call(this);
|
|
61
|
+
return `
|
|
62
|
+
:Category: ${printable.category}
|
|
63
|
+
:Coefficient: ${printable.coefficient}
|
|
64
|
+
:Collective Agreement: ${printable.collectiveAgreement}
|
|
65
|
+
:Job Title: ${printable.jobTitle}
|
|
66
|
+
:Position Level: ${printable.positionLevel}
|
|
67
|
+
:Seniority Date: ${printable.seniorityDate}
|
|
68
|
+
:Start Date: ${printable.startDate}`.trimEnd();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.PayslipV3Employment = PayslipV3Employment;
|
|
72
|
+
_PayslipV3Employment_instances = new WeakSet(), _PayslipV3Employment_printableValues = function _PayslipV3Employment_printableValues() {
|
|
73
|
+
return {
|
|
74
|
+
category: this.category ?? "",
|
|
75
|
+
coefficient: this.coefficient ?? "",
|
|
76
|
+
collectiveAgreement: this.collectiveAgreement ?? "",
|
|
77
|
+
jobTitle: this.jobTitle ?? "",
|
|
78
|
+
positionLevel: this.positionLevel ?? "",
|
|
79
|
+
seniorityDate: this.seniorityDate ?? "",
|
|
80
|
+
startDate: this.startDate ?? "",
|
|
81
|
+
};
|
|
82
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { StringDict } from "../../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* Information about paid time off.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PayslipV3PaidTimeOff {
|
|
7
|
+
#private;
|
|
8
|
+
/** The amount of paid time off accrued in the period. */
|
|
9
|
+
accrued: number | null;
|
|
10
|
+
/** The paid time off period. */
|
|
11
|
+
period: string | null;
|
|
12
|
+
/** The type of paid time off. */
|
|
13
|
+
ptoType: string | null;
|
|
14
|
+
/** The remaining amount of paid time off at the end of the period. */
|
|
15
|
+
remaining: number | null;
|
|
16
|
+
/** The amount of paid time off used in the period. */
|
|
17
|
+
used: 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
|
+
}
|