@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.
Files changed (111) hide show
  1. package/README.md +17 -0
  2. package/dist/types/asset-category-field.d.ts +23 -0
  3. package/dist/types/asset-category.d.ts +10 -0
  4. package/dist/types/asset-type.d.ts +6 -0
  5. package/dist/types/asset-value.d.ts +16 -0
  6. package/dist/types/asset.d.ts +17 -0
  7. package/dist/types/attendance-count.d.ts +8 -0
  8. package/dist/types/attendance-leave-reason.d.ts +11 -0
  9. package/dist/types/attendance-presence-check.d.ts +11 -0
  10. package/dist/types/attendance.d.ts +42 -0
  11. package/dist/types/building-contact.d.ts +10 -0
  12. package/dist/types/building-lease-payment.d.ts +13 -0
  13. package/dist/types/building-lease.d.ts +12 -0
  14. package/dist/types/building.d.ts +14 -0
  15. package/dist/types/bunk.d.ts +8 -0
  16. package/dist/types/call-log.d.ts +36 -0
  17. package/dist/types/ceiling.d.ts +9 -0
  18. package/dist/types/client-class.d.ts +9 -0
  19. package/dist/types/client-contact.d.ts +13 -0
  20. package/dist/types/client-site.d.ts +18 -0
  21. package/dist/types/client.d.ts +17 -0
  22. package/dist/types/company.d.ts +13 -0
  23. package/dist/types/config.d.ts +11 -0
  24. package/dist/types/contact.d.ts +9 -0
  25. package/dist/types/contract-allowance.d.ts +17 -0
  26. package/dist/types/contract-benefit.d.ts +8 -0
  27. package/dist/types/contract-deduction.d.ts +12 -0
  28. package/dist/types/contract.d.ts +17 -0
  29. package/dist/types/coords.d.ts +4 -0
  30. package/dist/types/dispatch-attendance.d.ts +10 -0
  31. package/dist/types/dispatch-count.d.ts +9 -0
  32. package/dist/types/dispatch.d.ts +13 -0
  33. package/dist/types/employee-comment-reaction.d.ts +10 -0
  34. package/dist/types/employee-comment.d.ts +10 -0
  35. package/dist/types/employee-status.d.ts +6 -0
  36. package/dist/types/employee.d.ts +40 -0
  37. package/dist/types/file.d.ts +18 -0
  38. package/dist/types/gender.d.ts +1 -0
  39. package/dist/types/index.d.ts +147 -0
  40. package/dist/types/loan-installment.d.ts +14 -0
  41. package/dist/types/loan.d.ts +18 -0
  42. package/dist/types/metadata-documents.d.ts +4 -0
  43. package/dist/types/metadata-expiring-documents.d.ts +7 -0
  44. package/dist/types/metadata-missing-documents.d.ts +5 -0
  45. package/dist/types/metadata-status-check.d.ts +14 -0
  46. package/dist/types/metadata.d.ts +14 -0
  47. package/dist/types/models.d.ts +61 -0
  48. package/dist/types/nfc-tag.d.ts +11 -0
  49. package/dist/types/one-time-password.d.ts +16 -0
  50. package/dist/types/payment-cycle.d.ts +6 -0
  51. package/dist/types/permission-group.d.ts +8 -0
  52. package/dist/types/permission.d.ts +7 -0
  53. package/dist/types/phone-line-commitment.d.ts +11 -0
  54. package/dist/types/phone-line-contract.d.ts +14 -0
  55. package/dist/types/phone-line-package.d.ts +14 -0
  56. package/dist/types/phone-line.d.ts +19 -0
  57. package/dist/types/position-version.d.ts +21 -0
  58. package/dist/types/position.d.ts +10 -0
  59. package/dist/types/recruitment-employment-information-history.d.ts +7 -0
  60. package/dist/types/recruitment-employment-information.d.ts +12 -0
  61. package/dist/types/recruitment-medical-information.d.ts +9 -0
  62. package/dist/types/recruitment-national-card-information.d.ts +13 -0
  63. package/dist/types/recruitment-other-information-additional-information.d.ts +4 -0
  64. package/dist/types/recruitment-other-information.d.ts +8 -0
  65. package/dist/types/recruitment-passport-information.d.ts +12 -0
  66. package/dist/types/recruitment-personal-information.d.ts +18 -0
  67. package/dist/types/recruitment-visa-information.d.ts +8 -0
  68. package/dist/types/recruitment.d.ts +12 -0
  69. package/dist/types/region.d.ts +15 -0
  70. package/dist/types/report-category-field.d.ts +23 -0
  71. package/dist/types/report-category.d.ts +10 -0
  72. package/dist/types/report-comment-reaction.d.ts +10 -0
  73. package/dist/types/report-comment.d.ts +11 -0
  74. package/dist/types/report-type.d.ts +7 -0
  75. package/dist/types/report-value.d.ts +16 -0
  76. package/dist/types/report.d.ts +23 -0
  77. package/dist/types/request-action-execution.d.ts +11 -0
  78. package/dist/types/request-action.d.ts +13 -0
  79. package/dist/types/request-category-field.d.ts +26 -0
  80. package/dist/types/request-category.d.ts +12 -0
  81. package/dist/types/request-type.d.ts +10 -0
  82. package/dist/types/request-value.d.ts +15 -0
  83. package/dist/types/request-verification.d.ts +13 -0
  84. package/dist/types/request.d.ts +22 -0
  85. package/dist/types/restriction.d.ts +14 -0
  86. package/dist/types/role.d.ts +6 -0
  87. package/dist/types/schedule-attendance.d.ts +25 -0
  88. package/dist/types/schedule-draft.d.ts +15 -0
  89. package/dist/types/schedule-site.d.ts +16 -0
  90. package/dist/types/schedule.d.ts +13 -0
  91. package/dist/types/shift-type.d.ts +8 -0
  92. package/dist/types/shift.d.ts +24 -0
  93. package/dist/types/signing-mode.d.ts +8 -0
  94. package/dist/types/standard-operating-procedure.d.ts +13 -0
  95. package/dist/types/tag.d.ts +7 -0
  96. package/dist/types/team.d.ts +6 -0
  97. package/dist/types/unit-room.d.ts +8 -0
  98. package/dist/types/unit.d.ts +8 -0
  99. package/dist/types/user.d.ts +20 -0
  100. package/dist/types/vehicle-contract-payment.d.ts +15 -0
  101. package/dist/types/vehicle-contract.d.ts +17 -0
  102. package/dist/types/vehicle-insurance.d.ts +18 -0
  103. package/dist/types/vehicle-make.d.ts +8 -0
  104. package/dist/types/vehicle-model.d.ts +12 -0
  105. package/dist/types/vehicle-registration.d.ts +15 -0
  106. package/dist/types/vehicle.d.ts +23 -0
  107. package/dist/types/vendor-contact.d.ts +13 -0
  108. package/dist/types/vendor.d.ts +13 -0
  109. package/dist/types/zone.d.ts +8 -0
  110. package/package.json +47 -0
  111. 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,10 @@
1
+ import { IAssetCategoryField } from "./asset-category-field";
2
+
3
+ export interface IAssetCategory {
4
+ id: string;
5
+ name: string;
6
+ typeId: string;
7
+ fields: IAssetCategoryField[];
8
+ createdAt: string;
9
+ updatedAt: string;
10
+ }
@@ -0,0 +1,6 @@
1
+ export interface IAssetType {
2
+ id: string;
3
+ name: string;
4
+ createdAt: string;
5
+ updatedAt: string;
6
+ }
@@ -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,8 @@
1
+ export interface IAttendanceCount {
2
+ "Checked In": number;
3
+ "Checked Out": number;
4
+ Approved: number;
5
+ "Pending Dispatch": number;
6
+ "Not Scheduled": number;
7
+ "Missed Dispatch": number;
8
+ }
@@ -0,0 +1,11 @@
1
+ import { IAttendance } from ".";
2
+
3
+ export interface IAttendanceLeaveReason {
4
+ id: string;
5
+ createdAt: string;
6
+ updatedAt: string;
7
+
8
+ name: string;
9
+ description?: string;
10
+ attendances?: IAttendance[];
11
+ }
@@ -0,0 +1,11 @@
1
+ export interface IAttendancePresenceCheck {
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,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,10 @@
1
+ export interface IBuildingContact {
2
+ id: string;
3
+ createdAt: string;
4
+ updatedAt: string;
5
+ name: string;
6
+ number: string;
7
+ email?: string;
8
+ notes?: string;
9
+ buildingId: string;
10
+ }
@@ -0,0 +1,13 @@
1
+ export interface IBuildingLeasePayment {
2
+ id: string;
3
+ createdAt: string;
4
+ updatedAt: string;
5
+
6
+ amount: number;
7
+ date: string;
8
+
9
+ invoiceId?: string;
10
+ leaseId: string;
11
+
12
+ status: "PENDING" | "PAID" | "OVERDUE" | "CANCELLED";
13
+ }
@@ -0,0 +1,12 @@
1
+ export interface IBuildingLease {
2
+ id: string;
3
+ createdAt: string;
4
+ updatedAt: string;
5
+
6
+ buildingId: string;
7
+
8
+ startDate: string;
9
+ endDate: string;
10
+
11
+ status: "ACTIVE" | "INACTIVE";
12
+ }
@@ -0,0 +1,14 @@
1
+ export interface IBuilding {
2
+ id: string;
3
+ createdAt: string;
4
+ updatedAt: string;
5
+ name: string;
6
+ address: string;
7
+ geolocation: {
8
+ lat: number;
9
+ lng: number;
10
+ };
11
+ status: "ACTIVE" | "INACTIVE";
12
+ companyId: string;
13
+ zoneId: string;
14
+ }
@@ -0,0 +1,8 @@
1
+ export interface IBunk {
2
+ id: string;
3
+ createdAt: Date;
4
+ updatedAt: Date;
5
+ name: string;
6
+ roomId: string;
7
+ employeeId: string;
8
+ }
@@ -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,9 @@
1
+ export interface ICeiling {
2
+ createdAt: Date;
3
+ id: string;
4
+ updatedAt: Date;
5
+
6
+ companyId: string;
7
+
8
+ limit: number;
9
+ }
@@ -0,0 +1,9 @@
1
+ export interface IClientClass {
2
+ id: string;
3
+ name: string;
4
+ type: "CLIENT" | "SITE";
5
+ description?: string;
6
+ regionId: string;
7
+ createdAt: string;
8
+ updatedAt: string;
9
+ }
@@ -0,0 +1,13 @@
1
+ import { IClient } from "./client";
2
+
3
+ export interface IClientContact {
4
+ id: string;
5
+ createdAt: string;
6
+ updatedAt: string;
7
+ name: string;
8
+ number: string;
9
+ email?: string;
10
+ notes?: string;
11
+ client: IClient;
12
+ clientId: string;
13
+ }
@@ -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,11 @@
1
+ export interface IConfig {
2
+ id: string;
3
+ createdAt: string;
4
+ updatedAt?: string;
5
+ name: string;
6
+ value: any;
7
+ type: "DEFAULT" | "TEAM" | "REGION" | "COMPANY";
8
+ teamId?: string;
9
+ regionId?: string;
10
+ companyId?: string;
11
+ }
@@ -0,0 +1,9 @@
1
+ export interface IContact {
2
+ createdAt: Date;
3
+ id: string;
4
+ updatedAt: Date;
5
+
6
+ type: "EMAIL" | "PHONE";
7
+ value: string;
8
+ verified: boolean;
9
+ }
@@ -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,8 @@
1
+ export interface IContractBenefit {
2
+ id: string;
3
+ createdAt: Date;
4
+ updatedAt: Date;
5
+ name: string;
6
+ regionId: string;
7
+ companyId?: string;
8
+ }
@@ -0,0 +1,12 @@
1
+ export interface IContractDeduction {
2
+ id: string;
3
+ createdAt: Date;
4
+ updatedAt: Date;
5
+ name: string;
6
+ type: "PERCENTAGE" | "FIXED";
7
+ value: number;
8
+ contractual: boolean;
9
+ regionId: string;
10
+ companyId?: string;
11
+ computedValue: number;
12
+ }
@@ -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,4 @@
1
+ export interface ICoords {
2
+ lat: number;
3
+ lng: number;
4
+ }
@@ -0,0 +1,10 @@
1
+ export interface IDispatchAttendance {
2
+ id: string;
3
+ createdAt: string;
4
+ updatedAt: string;
5
+ deletedAt: string;
6
+ type: "DROP_OFF" | "PICK_UP" | "INSPECTION";
7
+ checked: boolean | null;
8
+ dispatchId: string;
9
+ attendanceId: string;
10
+ }
@@ -0,0 +1,9 @@
1
+ export interface IDispatchCount {
2
+ PENDING: number;
3
+ FLEET_CHECK: number;
4
+ FLEET_CHECK_COMPLETE: number;
5
+ IN_PROGRESS: number;
6
+ COMPLETE: number;
7
+ INTERRUPTED: number;
8
+ NOT_SET: number;
9
+ }
@@ -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,10 @@
1
+ export interface IEmployeeCommentReaction {
2
+ id: string;
3
+ createdAt: Date;
4
+ updatedAt?: Date;
5
+ deletedAt?: Date;
6
+
7
+ userId: string;
8
+ commentId: string;
9
+ reaction: string;
10
+ }
@@ -0,0 +1,10 @@
1
+ export interface IEmployeeComment {
2
+ createdAt: Date;
3
+ updatedAt: Date;
4
+ deletedAt: Date;
5
+
6
+ id: string;
7
+ userId: string;
8
+ employeeId: string;
9
+ comment: string;
10
+ }
@@ -0,0 +1,6 @@
1
+ export interface IEmployeeStatus {
2
+ createdAt: Date;
3
+ id: string;
4
+ name: string;
5
+ updatedAt: Date;
6
+ }
@@ -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";