hvp-shared 6.65.0 → 6.67.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/dist/contracts/employment/responses.d.ts +9 -0
- package/dist/types/employment-sections.types.d.ts +128 -0
- package/dist/types/employment-sections.types.js +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/job-snapshot.types.d.ts +1 -2
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EmploymentType, CompensationType, PayrollStampingMode, ScheduleType, AttendanceSource } from '../../constants/employment.enums';
|
|
2
2
|
import { JobSnapshot } from '../../types/job-snapshot.types';
|
|
3
|
+
import { EmploymentConfig, EmploymentSchedule, EmploymentSeniority, EmploymentSalaryData, EmploymentHourlyData, EmploymentBenefits, EmploymentImss, EmploymentCfdi } from '../../types/employment-sections.types';
|
|
3
4
|
/**
|
|
4
5
|
* Public Employment Response
|
|
5
6
|
*
|
|
@@ -81,6 +82,14 @@ export interface AdminEmploymentResponse extends EmploymentViewResponse {
|
|
|
81
82
|
physicalActivitySupport?: number;
|
|
82
83
|
createdBy?: string;
|
|
83
84
|
updatedBy?: string;
|
|
85
|
+
config?: EmploymentConfig;
|
|
86
|
+
schedule?: EmploymentSchedule;
|
|
87
|
+
seniority?: EmploymentSeniority;
|
|
88
|
+
salaryData?: EmploymentSalaryData;
|
|
89
|
+
hourlyData?: EmploymentHourlyData;
|
|
90
|
+
benefits?: EmploymentBenefits;
|
|
91
|
+
imss?: EmploymentImss;
|
|
92
|
+
cfdi?: EmploymentCfdi;
|
|
84
93
|
}
|
|
85
94
|
/**
|
|
86
95
|
* Union type for all employment response types
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { EmploymentType, CompensationType, PayrollStampingMode, ScheduleType, AttendanceSource } from '../constants/employment.enums';
|
|
2
|
+
/**
|
|
3
|
+
* A fixed concept with a name and amount.
|
|
4
|
+
* Used for additional incomes and deductions.
|
|
5
|
+
*/
|
|
6
|
+
export interface FixedConcept {
|
|
7
|
+
concept: string;
|
|
8
|
+
amount: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Employment Config
|
|
12
|
+
*
|
|
13
|
+
* User-set classification fields. Changing any triggers recalculation.
|
|
14
|
+
* Present on ALL employment types.
|
|
15
|
+
*/
|
|
16
|
+
export interface EmploymentConfig {
|
|
17
|
+
employmentType: EmploymentType;
|
|
18
|
+
compensationType: CompensationType;
|
|
19
|
+
weeklyHours: number;
|
|
20
|
+
scheduleType: ScheduleType;
|
|
21
|
+
attendanceSource: AttendanceSource;
|
|
22
|
+
hasCommissions: boolean;
|
|
23
|
+
hasImss: boolean;
|
|
24
|
+
payrollStampingMode: PayrollStampingMode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Employment Schedule
|
|
28
|
+
*
|
|
29
|
+
* Derived from config.weeklyHours. ONLY present when scheduleType = "fixed".
|
|
30
|
+
* Absent for flexible, on_demand, none.
|
|
31
|
+
*/
|
|
32
|
+
export interface EmploymentSchedule {
|
|
33
|
+
workWeekRatio: number;
|
|
34
|
+
dailyWorkingHours: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Employment Seniority
|
|
38
|
+
*
|
|
39
|
+
* Derived from collaborator start date. Always calculated, no overrides.
|
|
40
|
+
* Present for: payroll, payroll_draft, intern, hourly_agreed, casual.
|
|
41
|
+
* Absent for: contractor, coverage_only.
|
|
42
|
+
*/
|
|
43
|
+
export interface EmploymentSeniority {
|
|
44
|
+
bonusPercentage: number;
|
|
45
|
+
commissionBonusPercentage: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Salary Rates
|
|
49
|
+
*
|
|
50
|
+
* Daily and hourly rates derived from totalFixedIncome.
|
|
51
|
+
* Used for CFDI stamping (nominal) and deductions/bonuses (effective).
|
|
52
|
+
*/
|
|
53
|
+
export interface SalaryRates {
|
|
54
|
+
nominalDaily: number;
|
|
55
|
+
nominalHourly: number;
|
|
56
|
+
effectiveDaily: number;
|
|
57
|
+
effectiveHourly: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Salary Data Overrides
|
|
61
|
+
*
|
|
62
|
+
* When the user manually overrides a calculated value.
|
|
63
|
+
* The calculated field always holds the formula result;
|
|
64
|
+
* the override holds the user's intent.
|
|
65
|
+
* Effective value = override ?? calculated.
|
|
66
|
+
*/
|
|
67
|
+
export interface SalaryDataOverrides {
|
|
68
|
+
guaranteedIncome?: number;
|
|
69
|
+
adjustedJobIncome?: number;
|
|
70
|
+
totalFixedIncome?: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Employment Salary Data
|
|
74
|
+
*
|
|
75
|
+
* Full income chain + rates for salary-based employments.
|
|
76
|
+
* ONLY for: payroll, payroll_draft, intern.
|
|
77
|
+
* Mutually exclusive with hourlyData.
|
|
78
|
+
*/
|
|
79
|
+
export interface EmploymentSalaryData {
|
|
80
|
+
guaranteedIncome: number;
|
|
81
|
+
adjustedJobIncome: number;
|
|
82
|
+
totalFixedIncome: number;
|
|
83
|
+
rates: SalaryRates;
|
|
84
|
+
overrides?: SalaryDataOverrides;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Employment Hourly Data
|
|
88
|
+
*
|
|
89
|
+
* Pay rate + hours tracking for hourly-based employments.
|
|
90
|
+
* ONLY for: hourly_agreed, casual.
|
|
91
|
+
* Mutually exclusive with salaryData.
|
|
92
|
+
*/
|
|
93
|
+
export interface EmploymentHourlyData {
|
|
94
|
+
adjustedHourlyRate: number;
|
|
95
|
+
averageDailyHoursWorked: number;
|
|
96
|
+
adjustedHourlyRateOverride?: number;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Employment Benefits
|
|
100
|
+
*
|
|
101
|
+
* Monthly support amounts (user-entered).
|
|
102
|
+
* Present for: payroll, payroll_draft, intern, hourly_agreed, casual.
|
|
103
|
+
* Absent for: contractor, coverage_only.
|
|
104
|
+
*/
|
|
105
|
+
export interface EmploymentBenefits {
|
|
106
|
+
trainingSupport: number;
|
|
107
|
+
physicalActivitySupport: number;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Employment IMSS
|
|
111
|
+
*
|
|
112
|
+
* Social security contribution data.
|
|
113
|
+
* Only present when config.hasImss = true.
|
|
114
|
+
*/
|
|
115
|
+
export interface EmploymentImss {
|
|
116
|
+
contributionBaseSalary: number;
|
|
117
|
+
integratedDailySalary: number;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Employment CFDI
|
|
121
|
+
*
|
|
122
|
+
* Fiscal stamping configuration.
|
|
123
|
+
* Only present when config.payrollStampingMode !== "none".
|
|
124
|
+
*/
|
|
125
|
+
export interface EmploymentCfdi {
|
|
126
|
+
journeyType: string;
|
|
127
|
+
paymentFrequency: string;
|
|
128
|
+
}
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -31,3 +31,4 @@ __exportStar(require("./cash-reconciliation.types"), exports);
|
|
|
31
31
|
__exportStar(require("./coverage.types"), exports);
|
|
32
32
|
__exportStar(require("./job-promotion-stats.types"), exports);
|
|
33
33
|
__exportStar(require("./job-snapshot.types"), exports);
|
|
34
|
+
__exportStar(require("./employment-sections.types"), exports);
|
|
@@ -10,10 +10,9 @@ import { JobCategory } from '../constants/job-category.constants';
|
|
|
10
10
|
export interface JobSnapshot {
|
|
11
11
|
title: string;
|
|
12
12
|
category?: JobCategory;
|
|
13
|
-
positionFactor: number;
|
|
14
13
|
guaranteedJobIncome: number;
|
|
15
14
|
jobFixedIncome: number;
|
|
16
|
-
isCommissionAdjusted: boolean;
|
|
17
15
|
commissionRateAdjustment: number;
|
|
18
16
|
expressBranchCompensation: number;
|
|
17
|
+
hourlyRate?: number;
|
|
19
18
|
}
|