@automateinc/fleet-types 1.0.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/README.md +17 -0
- package/dist/types/asset-category-field.d.ts +23 -0
- package/dist/types/asset-category.d.ts +10 -0
- package/dist/types/asset-type.d.ts +6 -0
- package/dist/types/asset-value.d.ts +16 -0
- package/dist/types/asset.d.ts +17 -0
- package/dist/types/attendance-count.d.ts +8 -0
- package/dist/types/attendance-leave-reason.d.ts +11 -0
- package/dist/types/attendance-presence-check.d.ts +11 -0
- package/dist/types/attendance.d.ts +42 -0
- package/dist/types/building-contact.d.ts +10 -0
- package/dist/types/building-lease-payment.d.ts +13 -0
- package/dist/types/building-lease.d.ts +12 -0
- package/dist/types/building.d.ts +14 -0
- package/dist/types/bunk.d.ts +8 -0
- package/dist/types/call-log.d.ts +36 -0
- package/dist/types/ceiling.d.ts +9 -0
- package/dist/types/client-class.d.ts +9 -0
- package/dist/types/client-contact.d.ts +13 -0
- package/dist/types/client-site.d.ts +18 -0
- package/dist/types/client.d.ts +17 -0
- package/dist/types/company.d.ts +13 -0
- package/dist/types/config.d.ts +11 -0
- package/dist/types/contact.d.ts +9 -0
- package/dist/types/contract-allowance.d.ts +17 -0
- package/dist/types/contract-benefit.d.ts +8 -0
- package/dist/types/contract-deduction.d.ts +12 -0
- package/dist/types/contract.d.ts +17 -0
- package/dist/types/coords.d.ts +4 -0
- package/dist/types/dispatch-attendance.d.ts +10 -0
- package/dist/types/dispatch-count.d.ts +9 -0
- package/dist/types/dispatch.d.ts +13 -0
- package/dist/types/employee-comment-reaction.d.ts +10 -0
- package/dist/types/employee-comment.d.ts +10 -0
- package/dist/types/employee-status.d.ts +6 -0
- package/dist/types/employee.d.ts +40 -0
- package/dist/types/file.d.ts +18 -0
- package/dist/types/gender.d.ts +1 -0
- package/dist/types/index.d.ts +147 -0
- package/dist/types/loan-installment.d.ts +14 -0
- package/dist/types/loan.d.ts +18 -0
- package/dist/types/metadata-documents.d.ts +4 -0
- package/dist/types/metadata-expiring-documents.d.ts +7 -0
- package/dist/types/metadata-missing-documents.d.ts +5 -0
- package/dist/types/metadata-status-check.d.ts +14 -0
- package/dist/types/metadata.d.ts +14 -0
- package/dist/types/models.d.ts +61 -0
- package/dist/types/nfc-tag.d.ts +11 -0
- package/dist/types/one-time-password.d.ts +16 -0
- package/dist/types/payment-cycle.d.ts +6 -0
- package/dist/types/permission-group.d.ts +8 -0
- package/dist/types/permission.d.ts +7 -0
- package/dist/types/phone-line-commitment.d.ts +11 -0
- package/dist/types/phone-line-contract.d.ts +14 -0
- package/dist/types/phone-line-package.d.ts +14 -0
- package/dist/types/phone-line.d.ts +19 -0
- package/dist/types/position-version.d.ts +21 -0
- package/dist/types/position.d.ts +10 -0
- package/dist/types/recruitment-employment-information-history.d.ts +7 -0
- package/dist/types/recruitment-employment-information.d.ts +12 -0
- package/dist/types/recruitment-medical-information.d.ts +9 -0
- package/dist/types/recruitment-national-card-information.d.ts +13 -0
- package/dist/types/recruitment-other-information-additional-information.d.ts +4 -0
- package/dist/types/recruitment-other-information.d.ts +8 -0
- package/dist/types/recruitment-passport-information.d.ts +12 -0
- package/dist/types/recruitment-personal-information.d.ts +18 -0
- package/dist/types/recruitment-visa-information.d.ts +8 -0
- package/dist/types/recruitment.d.ts +12 -0
- package/dist/types/region.d.ts +15 -0
- package/dist/types/report-category-field.d.ts +23 -0
- package/dist/types/report-category.d.ts +10 -0
- package/dist/types/report-comment-reaction.d.ts +10 -0
- package/dist/types/report-comment.d.ts +11 -0
- package/dist/types/report-type.d.ts +7 -0
- package/dist/types/report-value.d.ts +16 -0
- package/dist/types/report.d.ts +23 -0
- package/dist/types/request-action-execution.d.ts +11 -0
- package/dist/types/request-action.d.ts +13 -0
- package/dist/types/request-category-field.d.ts +26 -0
- package/dist/types/request-category.d.ts +12 -0
- package/dist/types/request-type.d.ts +10 -0
- package/dist/types/request-value.d.ts +15 -0
- package/dist/types/request-verification.d.ts +13 -0
- package/dist/types/request.d.ts +22 -0
- package/dist/types/restriction.d.ts +14 -0
- package/dist/types/role.d.ts +6 -0
- package/dist/types/schedule-attendance.d.ts +25 -0
- package/dist/types/schedule-draft.d.ts +15 -0
- package/dist/types/schedule-site.d.ts +16 -0
- package/dist/types/schedule.d.ts +13 -0
- package/dist/types/shift-type.d.ts +8 -0
- package/dist/types/shift.d.ts +24 -0
- package/dist/types/signing-mode.d.ts +8 -0
- package/dist/types/standard-operating-procedure.d.ts +13 -0
- package/dist/types/tag.d.ts +7 -0
- package/dist/types/team.d.ts +6 -0
- package/dist/types/unit-room.d.ts +8 -0
- package/dist/types/unit.d.ts +8 -0
- package/dist/types/user.d.ts +20 -0
- package/dist/types/vehicle-contract-payment.d.ts +15 -0
- package/dist/types/vehicle-contract.d.ts +17 -0
- package/dist/types/vehicle-insurance.d.ts +18 -0
- package/dist/types/vehicle-make.d.ts +8 -0
- package/dist/types/vehicle-model.d.ts +12 -0
- package/dist/types/vehicle-registration.d.ts +15 -0
- package/dist/types/vehicle.d.ts +23 -0
- package/dist/types/vendor-contact.d.ts +13 -0
- package/dist/types/vendor.d.ts +13 -0
- package/dist/types/zone.d.ts +8 -0
- package/package.json +47 -0
- package/tsconfig.json +11 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Fleet Types
|
|
2
|
+
|
|
3
|
+
##### Reusable TypeScript types and interfaces for Fleet projects.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
To install the package, use npm:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i fleet-types@https://github.com/automateinc/fleet-types.git
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Example Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { IAttendance } from "fleet-types";
|
|
17
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface IAssetCategoryField {
|
|
2
|
+
name: string;
|
|
3
|
+
required: boolean;
|
|
4
|
+
type:
|
|
5
|
+
| "STRING"
|
|
6
|
+
| "NUMBER"
|
|
7
|
+
| "BOOLEAN"
|
|
8
|
+
| "DATE"
|
|
9
|
+
| "DATETIME"
|
|
10
|
+
| "TIME"
|
|
11
|
+
| "UPLOAD"
|
|
12
|
+
| "RELATION"
|
|
13
|
+
| "SINGLE_SELECT"
|
|
14
|
+
| "SIGNATURE";
|
|
15
|
+
model?: "contract" | "company" | "contact";
|
|
16
|
+
config: {
|
|
17
|
+
options: any[];
|
|
18
|
+
optionsUrl: string;
|
|
19
|
+
uploadCategory?: string;
|
|
20
|
+
variant?: string;
|
|
21
|
+
dependencies?: any[];
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IAssetCategoryField, IFile } from ".";
|
|
2
|
+
import { IModel } from "./models";
|
|
3
|
+
|
|
4
|
+
export interface IAssetValue {
|
|
5
|
+
id: string;
|
|
6
|
+
type: IAssetCategoryField["type"];
|
|
7
|
+
name: string;
|
|
8
|
+
value: any;
|
|
9
|
+
model?: IModel;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
relation?: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
relationValue?: string;
|
|
15
|
+
file?: IFile;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface IAsset {
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
updatedAt?: string;
|
|
5
|
+
deletedAt?: string;
|
|
6
|
+
|
|
7
|
+
typeId: string;
|
|
8
|
+
categoryId: string;
|
|
9
|
+
|
|
10
|
+
quantity: number;
|
|
11
|
+
|
|
12
|
+
employeeId?: string;
|
|
13
|
+
userId?: string;
|
|
14
|
+
siteId?: string;
|
|
15
|
+
positionId?: string;
|
|
16
|
+
phoneLineCommitmentId?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IAttendanceLeaveReason, ICoords, IEmployee, IFile } from ".";
|
|
2
|
+
|
|
3
|
+
export interface IAttendance {
|
|
4
|
+
id: string;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
|
|
8
|
+
verified: boolean;
|
|
9
|
+
approved: boolean;
|
|
10
|
+
absenceType?: "DAY_OFF" | "SICK_LEAVE" | "NO_SHOW" | "LEAVE";
|
|
11
|
+
|
|
12
|
+
checkInImage?: IFile;
|
|
13
|
+
checkInImageId?: string;
|
|
14
|
+
checkInLocation?: ICoords;
|
|
15
|
+
checkInTime?: string;
|
|
16
|
+
checkOutLocation?: ICoords;
|
|
17
|
+
checkOutTime?: string;
|
|
18
|
+
|
|
19
|
+
employeeId?: string;
|
|
20
|
+
|
|
21
|
+
employeeStatus?: "PRESENT" | "ABSENT" | "REROUTED";
|
|
22
|
+
leaveReason?: IAttendanceLeaveReason;
|
|
23
|
+
leaveReasonId?: string;
|
|
24
|
+
notes?: string;
|
|
25
|
+
reroutedAttendanceId?: string;
|
|
26
|
+
scheduleDate: string;
|
|
27
|
+
scheduleId: string;
|
|
28
|
+
checkInDistance: number;
|
|
29
|
+
checkOutDistance: number;
|
|
30
|
+
workHours: number;
|
|
31
|
+
status:
|
|
32
|
+
| "PROCESSED"
|
|
33
|
+
| "NOT_SCHEDULED"
|
|
34
|
+
| "MISSED_DISPATCH"
|
|
35
|
+
| "PENDING_DISPATCH"
|
|
36
|
+
| "CHECKED_IN"
|
|
37
|
+
| "CHECKED_OUT"
|
|
38
|
+
| "REQUIRES_ATTENTION"
|
|
39
|
+
| "UNVERIFIED"
|
|
40
|
+
| null;
|
|
41
|
+
type: "SCHEDULED" | "REROUTED" | "REPLACEMENT";
|
|
42
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface ICallLog {
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
updatedAt: string;
|
|
5
|
+
deletedAt?: string;
|
|
6
|
+
|
|
7
|
+
type: "BUILDING" | "CLIENT" | "EMPLOYEE" | "OTHER" | null;
|
|
8
|
+
|
|
9
|
+
direction: "INCOMING" | "OUTGOING";
|
|
10
|
+
|
|
11
|
+
status: "MISSED" | "ANSWERED" | "REJECTED" | "FAILED" | "NO_ANSWER";
|
|
12
|
+
|
|
13
|
+
employeeContactId?: string;
|
|
14
|
+
clientContactId?: string;
|
|
15
|
+
|
|
16
|
+
otherCaller?: string;
|
|
17
|
+
|
|
18
|
+
userId?: string;
|
|
19
|
+
|
|
20
|
+
startedAt: string;
|
|
21
|
+
endedAt: string;
|
|
22
|
+
|
|
23
|
+
number: string;
|
|
24
|
+
|
|
25
|
+
duration: number;
|
|
26
|
+
talkTime: number;
|
|
27
|
+
ringTime: number;
|
|
28
|
+
holdTime: number;
|
|
29
|
+
|
|
30
|
+
referenceId?: string;
|
|
31
|
+
|
|
32
|
+
recordingId?: string;
|
|
33
|
+
reportId?: string;
|
|
34
|
+
|
|
35
|
+
regionId: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IClient, IClientClass, IClientContact, IScheduleSite } from ".";
|
|
2
|
+
|
|
3
|
+
export interface IClientSite {
|
|
4
|
+
id: string;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
name: string;
|
|
8
|
+
address?: string;
|
|
9
|
+
geolocation?: { lat: number; lng: number };
|
|
10
|
+
class: IClientClass;
|
|
11
|
+
classId: string;
|
|
12
|
+
client: IClient;
|
|
13
|
+
clientId: string;
|
|
14
|
+
contact?: IClientContact;
|
|
15
|
+
contactId?: string;
|
|
16
|
+
scheduleSite?: IScheduleSite;
|
|
17
|
+
// Add Zones later
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IClientClass, IClientContact, ICompany, IFile } from ".";
|
|
2
|
+
|
|
3
|
+
export interface IClient {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
status: "ACTIVE" | "INACTIVE";
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
deletedAt: string;
|
|
10
|
+
logo: IFile;
|
|
11
|
+
logoId: string;
|
|
12
|
+
folderKey: string;
|
|
13
|
+
class: IClientClass;
|
|
14
|
+
classId: string;
|
|
15
|
+
companies?: ICompany[];
|
|
16
|
+
contacts?: IClientContact[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ICompany {
|
|
2
|
+
createdAt: Date;
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
abbreviation: string;
|
|
6
|
+
registrationNumber: string;
|
|
7
|
+
primaryKey: string;
|
|
8
|
+
updatedAt: Date;
|
|
9
|
+
folderKey: string;
|
|
10
|
+
parentCompanyId?: string;
|
|
11
|
+
logoId?: string;
|
|
12
|
+
stampId?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface IContractAllowance {
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: Date;
|
|
4
|
+
updatedAt: Date;
|
|
5
|
+
name: string;
|
|
6
|
+
type:
|
|
7
|
+
| "BASE_PERCENTAGE"
|
|
8
|
+
| "FIXED"
|
|
9
|
+
| "BASE_PERCENTAGE_TIMES_DAYS_OFF"
|
|
10
|
+
| "BASE_PERCENTAGE_TIMES_DAILY_HOURS"
|
|
11
|
+
| "RAMADAN";
|
|
12
|
+
value: number;
|
|
13
|
+
contractual: boolean;
|
|
14
|
+
regionId: string;
|
|
15
|
+
companyId?: string;
|
|
16
|
+
computedValue: number;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface IContract {
|
|
2
|
+
basicSalary: number;
|
|
3
|
+
companyId: string;
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
id: string;
|
|
6
|
+
type: "FULL_TIME" | "PART_TIME" | "FREELANCE";
|
|
7
|
+
roleId: string;
|
|
8
|
+
primaryKey: string;
|
|
9
|
+
totalSalary: number;
|
|
10
|
+
updatedAt: Date;
|
|
11
|
+
dailyHours: number;
|
|
12
|
+
monthlyDaysOff: number;
|
|
13
|
+
contractDuration: number;
|
|
14
|
+
overtimeRate: number;
|
|
15
|
+
contractualAllowancesProvided: boolean;
|
|
16
|
+
paymentType: "TRANSFER" | "CASH" | "CHECK" | "UNPAID" | "FORSA" | "OTHER";
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IDispatch {
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
updatedAt: string;
|
|
5
|
+
deletedAt: string;
|
|
6
|
+
status: "PENDING" | "FLEET_CHECK" | "FLEET_CHECK_COMPLETE" | "IN_PROGRESS" | "COMPLETE" | "INTERRUPTED" | "NOT_SET";
|
|
7
|
+
statusUpdatedAt: string;
|
|
8
|
+
date: string;
|
|
9
|
+
verified: boolean;
|
|
10
|
+
// timeOnSite: number;
|
|
11
|
+
zoneId: string;
|
|
12
|
+
primaryKey: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IFile } from ".";
|
|
2
|
+
|
|
3
|
+
export interface IEmployee {
|
|
4
|
+
id: string;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
primaryKey: string;
|
|
8
|
+
companyId: string;
|
|
9
|
+
contractId: string;
|
|
10
|
+
dateOfBirth: string;
|
|
11
|
+
firstName: string;
|
|
12
|
+
fullName: string;
|
|
13
|
+
gender: string;
|
|
14
|
+
lastName: string;
|
|
15
|
+
middleNames: string;
|
|
16
|
+
name: string;
|
|
17
|
+
nationality: string;
|
|
18
|
+
nationalNumber: string;
|
|
19
|
+
passportId: string;
|
|
20
|
+
password: string;
|
|
21
|
+
placeOfBirth: string;
|
|
22
|
+
profilePicture?: IFile;
|
|
23
|
+
statusId: string;
|
|
24
|
+
folderKey: string;
|
|
25
|
+
recruitmentId?: string;
|
|
26
|
+
|
|
27
|
+
primaryId?: string;
|
|
28
|
+
secondaryId?: string;
|
|
29
|
+
|
|
30
|
+
documents: Array<{
|
|
31
|
+
file: IFile;
|
|
32
|
+
name: string;
|
|
33
|
+
}>;
|
|
34
|
+
|
|
35
|
+
fields: {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
[key: string]: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ITag } from ".";
|
|
2
|
+
|
|
3
|
+
export interface IFile {
|
|
4
|
+
id: string;
|
|
5
|
+
updatedAt: Date;
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
|
|
8
|
+
name: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
type: string;
|
|
11
|
+
size: number;
|
|
12
|
+
url: string;
|
|
13
|
+
region: string;
|
|
14
|
+
|
|
15
|
+
thumbnail?: IFile;
|
|
16
|
+
|
|
17
|
+
tags?: ITag[];
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type IGender = "MALE" | "FEMALE";
|