@automateinc/fleet-types 1.0.0 → 1.0.2
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/.eslintrc.json +25 -0
- package/.husky/pre-commit +5 -0
- package/README.md +2 -2
- package/dist/types/attendance-presence-check.d.ts +10 -10
- package/dist/types/attendance.d.ts +1 -1
- package/dist/types/employee-monthly-payroll.d.ts +62 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/metadata.d.ts +11 -3
- package/dist/types/recruitment-national-card-information.d.ts +0 -2
- package/dist/types/request-value.d.ts +4 -1
- package/dist/types/request.d.ts +3 -0
- package/package.json +14 -1
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@404-software/eslint-config",
|
|
3
|
+
"rules": {
|
|
4
|
+
"prettier/prettier": [
|
|
5
|
+
"error",
|
|
6
|
+
{
|
|
7
|
+
"bracketSameLine": false,
|
|
8
|
+
"arrowParens": "avoid",
|
|
9
|
+
"quoteProps": "as-needed",
|
|
10
|
+
"singleQuote": false,
|
|
11
|
+
"trailingComma": "all",
|
|
12
|
+
"useTabs": true,
|
|
13
|
+
"bracketSpacing": true,
|
|
14
|
+
"tabWidth": 2,
|
|
15
|
+
"semi": true,
|
|
16
|
+
"jsxSingleQuote": false,
|
|
17
|
+
"printWidth": 120,
|
|
18
|
+
"endOfLine": "auto"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"no-console": "off",
|
|
22
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
23
|
+
"@typescript-eslint/no-empty-function": "off"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/README.md
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
To install the package, use npm:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm i
|
|
10
|
+
npm i @automateinc/fleet-types
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Example Usage
|
|
14
14
|
|
|
15
15
|
```js
|
|
16
|
-
import { IAttendance } from "fleet-types";
|
|
16
|
+
import { IAttendance } from "@automateinc/fleet-types";
|
|
17
17
|
```
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export interface IAttendancePresenceCheck {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
updatedAt: string;
|
|
5
|
+
|
|
6
|
+
status: "PENDING" | "CONFIRMED" | "EXPIRED";
|
|
7
|
+
createdBy: "USER" | "SYSTEM";
|
|
8
|
+
attendanceId: string;
|
|
9
|
+
userId?: string;
|
|
10
|
+
imageId?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
interface Value<T = number> {
|
|
2
|
+
format?: string;
|
|
3
|
+
value: T;
|
|
4
|
+
postfix?: string;
|
|
5
|
+
defaultHidden?: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface EmployeeMonthlyPayroll {
|
|
9
|
+
status: Value<string>;
|
|
10
|
+
company: Value<string>;
|
|
11
|
+
role: Value<string>;
|
|
12
|
+
salaryHold: Value<boolean>;
|
|
13
|
+
contractStartDate: Value<string>;
|
|
14
|
+
contractType: Value<string>;
|
|
15
|
+
totalAllowances: Value;
|
|
16
|
+
otherPay: Value;
|
|
17
|
+
fixedAllowances: Value;
|
|
18
|
+
foodAllowances: Value;
|
|
19
|
+
daysOffOvertime: Value;
|
|
20
|
+
daysOffOvertimeAllowance: Value;
|
|
21
|
+
siteAllowances: Value;
|
|
22
|
+
monthlyDays: Value;
|
|
23
|
+
maxNormalHours: Value;
|
|
24
|
+
increments: Value;
|
|
25
|
+
dailyTransportAndRiskAllowances: Value;
|
|
26
|
+
dailyTeamLeaderAllowance: Value;
|
|
27
|
+
dailySiteAllowances: Value;
|
|
28
|
+
dailyShiftAllowances: Value;
|
|
29
|
+
dailyOtherPay: Value;
|
|
30
|
+
dailyFixedAllowances: Value;
|
|
31
|
+
performanceIncrement: Value;
|
|
32
|
+
otherIncrements: Value;
|
|
33
|
+
dailyOtherAllowances: Value;
|
|
34
|
+
basicSalary: Value;
|
|
35
|
+
totalGrossSalary: Value;
|
|
36
|
+
totalNetPay: Value;
|
|
37
|
+
contractualDailyHours: Value;
|
|
38
|
+
totalAbsentDays: Value;
|
|
39
|
+
totalWorkedDays: Value;
|
|
40
|
+
sickLeaveDays: Value;
|
|
41
|
+
totalHours: Value;
|
|
42
|
+
normalHours: Value;
|
|
43
|
+
overtimeHours: Value;
|
|
44
|
+
dailyRate: Value;
|
|
45
|
+
hourlyRate: Value;
|
|
46
|
+
normalPay: Value;
|
|
47
|
+
overtimePay: Value;
|
|
48
|
+
normalRatio: Value;
|
|
49
|
+
overtimeRatio: Value;
|
|
50
|
+
SIODeductions: Value;
|
|
51
|
+
adjustmentsPlus: Value;
|
|
52
|
+
adjustmentsMinus: Value;
|
|
53
|
+
otherDeductions: Value;
|
|
54
|
+
totalDeductions: Value;
|
|
55
|
+
contractTotalSalary: Value;
|
|
56
|
+
iban: Value<string>;
|
|
57
|
+
retired: Value<boolean>;
|
|
58
|
+
bankTransfer: Value;
|
|
59
|
+
bankUpload1: Value;
|
|
60
|
+
bankUpload2: Value;
|
|
61
|
+
cashPayment: Value;
|
|
62
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export * from "./dispatch-count";
|
|
|
44
44
|
export * from "./employee";
|
|
45
45
|
export * from "./nfc-tag";
|
|
46
46
|
export * from "./employee-status";
|
|
47
|
+
export * from "./employee-monthly-payroll";
|
|
47
48
|
export * from "./region";
|
|
48
49
|
export * from "./request";
|
|
49
50
|
export * from "./request-verification";
|
package/dist/types/metadata.d.ts
CHANGED
|
@@ -2,13 +2,21 @@ import { IMetadataDocuments, IMetadataExpiringDocuments, IMetadataMissingDocumen
|
|
|
2
2
|
|
|
3
3
|
export interface IMetadata {
|
|
4
4
|
expiringDocuments?: {
|
|
5
|
-
[key:
|
|
5
|
+
[key: PropertyKey]: IMetadataExpiringDocuments;
|
|
6
6
|
};
|
|
7
7
|
statusCheck?: IMetadataStatusCheck;
|
|
8
8
|
documents?: {
|
|
9
|
-
[key:
|
|
9
|
+
[key: PropertyKey]: IMetadataDocuments;
|
|
10
10
|
};
|
|
11
11
|
missingDocuments?: {
|
|
12
|
-
[key:
|
|
12
|
+
[key: PropertyKey]: IMetadataMissingDocuments;
|
|
13
|
+
};
|
|
14
|
+
fields?: {
|
|
15
|
+
[key: PropertyKey]: any;
|
|
16
|
+
};
|
|
17
|
+
payroll?: {
|
|
18
|
+
iban: string;
|
|
19
|
+
increment: number;
|
|
20
|
+
contractType: "TRANSFER" | "CASH" | "CHECK" | "UNPAID" | "FORSA" | "OTHER";
|
|
13
21
|
};
|
|
14
22
|
}
|
|
@@ -6,9 +6,12 @@ export interface IRequestValue {
|
|
|
6
6
|
name: string;
|
|
7
7
|
value: any;
|
|
8
8
|
model?: IModel;
|
|
9
|
+
config?: {
|
|
10
|
+
[key: PropertyKey]: any;
|
|
11
|
+
};
|
|
9
12
|
required?: boolean;
|
|
10
13
|
relation?: {
|
|
11
|
-
[key:
|
|
14
|
+
[key: PropertyKey]: any;
|
|
12
15
|
};
|
|
13
16
|
relationValue?: string;
|
|
14
17
|
file?: IFile;
|
package/dist/types/request.d.ts
CHANGED
|
@@ -17,6 +17,9 @@ export interface IRequest {
|
|
|
17
17
|
verifiedById?: string;
|
|
18
18
|
rejectedById?: string;
|
|
19
19
|
withdrawnAt?: string;
|
|
20
|
+
folderKey?: string | null;
|
|
21
|
+
archivedAt?: string | null;
|
|
22
|
+
employeeId: string;
|
|
20
23
|
status: "PENDING_APPROVAL" | "APPROVED" | "REJECTED" | "WITHDRAWN" | "PENDING_VERIFICATION" | "ARCHIVED";
|
|
21
24
|
actionsExecutionStatus: "PENDING" | "COMPLETED" | "PROCESSING" | "FAILED" | "SKIPPED";
|
|
22
25
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automateinc/fleet-types",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"description": "Reusable TypeScript types and interfaces for Fleet API.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
+
"prepare": "husky install",
|
|
9
10
|
"build": "tsc && cp -R src/types dist/",
|
|
10
11
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
12
|
},
|
|
13
|
+
"eslintConfig": {
|
|
14
|
+
"extends": "@404-software/eslint-config"
|
|
15
|
+
},
|
|
12
16
|
"keywords": [
|
|
13
17
|
"typescript",
|
|
14
18
|
"types",
|
|
@@ -22,10 +26,19 @@
|
|
|
22
26
|
"author": "Automate Inc. <hello@automate.bh> (https://automate.bh)",
|
|
23
27
|
"license": "MIT",
|
|
24
28
|
"devDependencies": {
|
|
29
|
+
"@404-software/eslint-config": "^1.0.20",
|
|
25
30
|
"@tanstack/react-query": "^4.36.1",
|
|
26
31
|
"axios": "^1.7.9",
|
|
32
|
+
"eslint": "^8.18.0",
|
|
33
|
+
"husky": "^9.1.7",
|
|
34
|
+
"prettier": "^2.7.1",
|
|
27
35
|
"typescript": "5.1.6"
|
|
28
36
|
},
|
|
37
|
+
"lint-staged": {
|
|
38
|
+
"src/**/*.ts": [
|
|
39
|
+
"eslint --fix"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
29
42
|
"dependencies": {
|
|
30
43
|
"asynckit": "^0.4.0",
|
|
31
44
|
"combined-stream": "^1.0.8",
|