@iveri/contracts 0.61.0 → 0.63.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.
@@ -0,0 +1,46 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { UUID } from '../../type/uuid.type.js';
4
+ import type { HrAccessAction } from './hr-access-action.enum.js';
5
+ import type { HrPayPeriod } from './hr-pay-period.enum.js';
6
+ export interface HrAccessLogEntry {
7
+ id: UUID;
8
+ action: HrAccessAction;
9
+ actorUserId: UUID;
10
+ actorName: Nullable<string>;
11
+ occurredAt: IsoDateTime;
12
+ }
13
+ export interface HrAccessLogPage {
14
+ items: HrAccessLogEntry[];
15
+ nextCursor: Nullable<string>;
16
+ }
17
+ export interface HrPayEntry {
18
+ id: UUID;
19
+ amountMinor: number;
20
+ currency: string;
21
+ payPeriod: HrPayPeriod;
22
+ effectiveFrom: string;
23
+ reason: Nullable<string>;
24
+ createdAt: IsoDateTime;
25
+ }
26
+ export interface HrPay {
27
+ current: Nullable<HrPayEntry>;
28
+ history: HrPayEntry[];
29
+ }
30
+ export interface HrPrivateDetails {
31
+ personalNumber: Nullable<string>;
32
+ bankIban: Nullable<string>;
33
+ isPensionParticipant: boolean;
34
+ }
35
+ export interface AddHrPayRequest {
36
+ amountMinor: number;
37
+ payPeriod: HrPayPeriod;
38
+ effectiveFrom: string;
39
+ currency?: string;
40
+ reason?: string;
41
+ }
42
+ export interface UpdateHrPrivateRequest {
43
+ personalNumber?: Nullable<string>;
44
+ bankIban?: Nullable<string>;
45
+ isPensionParticipant?: boolean;
46
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,176 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { UUID } from '../../type/uuid.type.js';
4
+ import type { HrEmploymentEventKind } from './hr-employment-event-kind.enum.js';
5
+ import type { HrEmploymentStatus } from './hr-employment-status.enum.js';
6
+ import type { HrEmploymentType } from './hr-employment-type.enum.js';
7
+ export interface HrEmployee {
8
+ id: UUID;
9
+ employeeNumber: string;
10
+ firstName: string;
11
+ lastName: string;
12
+ displayName: string;
13
+ workEmail: string;
14
+ phone: Nullable<string>;
15
+ departmentId: Nullable<UUID>;
16
+ departmentName: Nullable<string>;
17
+ jobTitleId: Nullable<UUID>;
18
+ jobTitleName: Nullable<string>;
19
+ locationId: Nullable<UUID>;
20
+ locationName: Nullable<string>;
21
+ managerId: Nullable<UUID>;
22
+ managerName: Nullable<string>;
23
+ employmentType: HrEmploymentType;
24
+ status: HrEmploymentStatus;
25
+ hireDate: string;
26
+ terminationDate: Nullable<string>;
27
+ hasAccount: boolean;
28
+ userId: Nullable<UUID>;
29
+ personalEmail: Nullable<string>;
30
+ dateOfBirth: Nullable<string>;
31
+ nationality: Nullable<string>;
32
+ address: Nullable<string>;
33
+ emergencyContactName: Nullable<string>;
34
+ emergencyContactPhone: Nullable<string>;
35
+ emergencyContactRelation: Nullable<string>;
36
+ probationEndDate: Nullable<string>;
37
+ terminationReason: Nullable<string>;
38
+ createdAt: IsoDateTime;
39
+ updatedAt: IsoDateTime;
40
+ }
41
+ export interface HrEmployeeSummary {
42
+ id: UUID;
43
+ employeeNumber: string;
44
+ firstName: string;
45
+ lastName: string;
46
+ displayName: string;
47
+ workEmail: string;
48
+ phone: Nullable<string>;
49
+ departmentId: Nullable<UUID>;
50
+ departmentName: Nullable<string>;
51
+ jobTitleId: Nullable<UUID>;
52
+ jobTitleName: Nullable<string>;
53
+ locationId: Nullable<UUID>;
54
+ locationName: Nullable<string>;
55
+ managerId: Nullable<UUID>;
56
+ managerName: Nullable<string>;
57
+ employmentType: HrEmploymentType;
58
+ status: HrEmploymentStatus;
59
+ hireDate: string;
60
+ terminationDate: Nullable<string>;
61
+ hasAccount: boolean;
62
+ }
63
+ export interface HrEmployeesPage {
64
+ items: HrEmployeeSummary[];
65
+ total: number;
66
+ limit: number;
67
+ offset: number;
68
+ }
69
+ export interface HrEmploymentEvent {
70
+ id: UUID;
71
+ kind: HrEmploymentEventKind;
72
+ effectiveDate: string;
73
+ before: unknown;
74
+ after: unknown;
75
+ note: Nullable<string>;
76
+ createdAt: IsoDateTime;
77
+ }
78
+ export interface HrImportRowResult {
79
+ row: number;
80
+ isCreated: boolean;
81
+ employeeId: Nullable<UUID>;
82
+ message: Nullable<string>;
83
+ }
84
+ export interface HrInvitation {
85
+ userId: UUID;
86
+ invitationToken: string;
87
+ invitationExpiresAt: string;
88
+ isEmailSent: boolean;
89
+ }
90
+ export interface HrOrgChartNode {
91
+ id: UUID;
92
+ displayName: string;
93
+ jobTitleName: Nullable<string>;
94
+ departmentName: Nullable<string>;
95
+ locationName: Nullable<string>;
96
+ managerId: Nullable<UUID>;
97
+ reportCount: number;
98
+ }
99
+ export interface HrOverviewDepartment {
100
+ departmentId: Nullable<UUID>;
101
+ departmentName: Nullable<string>;
102
+ count: number;
103
+ }
104
+ export interface ChangeHrJobRequest {
105
+ effectiveDate: string;
106
+ departmentId?: Nullable<UUID>;
107
+ jobTitleId?: Nullable<UUID>;
108
+ locationId?: Nullable<UUID>;
109
+ managerId?: Nullable<UUID>;
110
+ employmentType?: HrEmploymentType;
111
+ note?: string;
112
+ }
113
+ export interface CreateHrEmployeeRequest {
114
+ firstName: string;
115
+ lastName: string;
116
+ workEmail: string;
117
+ employmentType: HrEmploymentType;
118
+ hireDate: string;
119
+ employeeNumber?: string;
120
+ personalEmail?: Nullable<string>;
121
+ phone?: Nullable<string>;
122
+ dateOfBirth?: Nullable<string>;
123
+ nationality?: Nullable<string>;
124
+ address?: Nullable<string>;
125
+ emergencyContactName?: Nullable<string>;
126
+ emergencyContactPhone?: Nullable<string>;
127
+ emergencyContactRelation?: Nullable<string>;
128
+ departmentId?: Nullable<UUID>;
129
+ jobTitleId?: Nullable<UUID>;
130
+ locationId?: Nullable<UUID>;
131
+ managerId?: Nullable<UUID>;
132
+ probationEndDate?: Nullable<string>;
133
+ }
134
+ export interface ImportHrEmployeeRowRequest {
135
+ firstName?: string;
136
+ lastName?: string;
137
+ workEmail?: string;
138
+ hireDate?: string;
139
+ employmentType?: string;
140
+ employeeNumber?: string;
141
+ phone?: string;
142
+ personalEmail?: string;
143
+ dateOfBirth?: string;
144
+ departmentName?: string;
145
+ jobTitleName?: string;
146
+ locationName?: string;
147
+ managerEmail?: string;
148
+ }
149
+ export interface ImportHrEmployeesRequest {
150
+ rows: ImportHrEmployeeRowRequest[];
151
+ dryRun?: boolean;
152
+ }
153
+ export interface LinkHrAccountRequest {
154
+ userId: Nullable<UUID>;
155
+ }
156
+ export interface SetHrTerminationRequest {
157
+ lastDay: string;
158
+ reason?: string;
159
+ reportsMoveToEmployeeId?: UUID;
160
+ }
161
+ export interface UpdateHrEmployeeRequest {
162
+ firstName?: string;
163
+ lastName?: string;
164
+ workEmail?: string;
165
+ employeeNumber?: string;
166
+ hireDate?: string;
167
+ personalEmail?: Nullable<string>;
168
+ phone?: Nullable<string>;
169
+ dateOfBirth?: Nullable<string>;
170
+ nationality?: Nullable<string>;
171
+ address?: Nullable<string>;
172
+ emergencyContactName?: Nullable<string>;
173
+ emergencyContactPhone?: Nullable<string>;
174
+ emergencyContactRelation?: Nullable<string>;
175
+ probationEndDate?: Nullable<string>;
176
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,74 @@
1
+ import type { Nullable } from '../../type/nil.type.js';
2
+ import type { UUID } from '../../type/uuid.type.js';
3
+ import type { HrEmployeeSummary } from './hr-employee.type.js';
4
+ import type { HrEmploymentStatus } from './hr-employment-status.enum.js';
5
+ import type { HrLeaveBalance, HrLeaveRequest, HrLeaveType } from './hr-time-off.type.js';
6
+ import type { LocalizedText } from './localized-text.type.js';
7
+ export interface HrDirectoryEntry {
8
+ id: UUID;
9
+ displayName: string;
10
+ jobTitleName: Nullable<string>;
11
+ departmentName: Nullable<string>;
12
+ locationName: Nullable<string>;
13
+ workEmail: string;
14
+ managerId: Nullable<UUID>;
15
+ managerName: Nullable<string>;
16
+ }
17
+ export interface HrDirectoryPage {
18
+ items: HrDirectoryEntry[];
19
+ total: number;
20
+ limit: number;
21
+ offset: number;
22
+ }
23
+ export interface HrMyHome {
24
+ employee: HrEmployeeSummary;
25
+ isManager: boolean;
26
+ pendingApprovalCount: number;
27
+ balances: HrLeaveBalance[];
28
+ nextTimeOff: Nullable<HrLeaveRequest>;
29
+ nextHoliday: Nullable<HrPublicHolidayEntry>;
30
+ awayToday: HrTeamAbsence[];
31
+ }
32
+ export interface HrMyTimeOff {
33
+ year: number;
34
+ balances: HrLeaveBalance[];
35
+ types: HrLeaveType[];
36
+ upcoming: HrLeaveRequest[];
37
+ }
38
+ export interface HrPublicHolidayEntry {
39
+ id: UUID;
40
+ date: string;
41
+ name: LocalizedText;
42
+ }
43
+ export interface HrTeamAbsence {
44
+ employeeId: UUID;
45
+ employeeName: string;
46
+ departmentName: Nullable<string>;
47
+ startDate: string;
48
+ endDate: string;
49
+ startsAfternoon: boolean;
50
+ endsAtNoon: boolean;
51
+ }
52
+ export interface HrTeamCalendar {
53
+ holidays: HrPublicHolidayEntry[];
54
+ absences: HrTeamAbsence[];
55
+ }
56
+ export interface HrTeamMember {
57
+ id: UUID;
58
+ displayName: string;
59
+ jobTitleName: Nullable<string>;
60
+ departmentName: Nullable<string>;
61
+ workEmail: string;
62
+ hireDate: string;
63
+ status: HrEmploymentStatus;
64
+ isAwayToday: boolean;
65
+ }
66
+ export interface UpdateHrMyEmployeeRequest {
67
+ personalEmail?: Nullable<string>;
68
+ phone?: Nullable<string>;
69
+ address?: Nullable<string>;
70
+ emergencyContactName?: Nullable<string>;
71
+ emergencyContactPhone?: Nullable<string>;
72
+ emergencyContactRelation?: Nullable<string>;
73
+ localeCode?: string;
74
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,80 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { UUID } from '../../type/uuid.type.js';
4
+ import type { HrResourceStatus } from './hr-resource-status.enum.js';
5
+ export interface HrCompany {
6
+ companyName: string;
7
+ countryCode: string;
8
+ timeZone: string;
9
+ currency: string;
10
+ workingWeekdays: number[];
11
+ workdayMinutes: number;
12
+ capturesClockLocation: boolean;
13
+ }
14
+ export interface HrDepartment {
15
+ id: UUID;
16
+ name: string;
17
+ parentId: Nullable<UUID>;
18
+ headEmployeeId: Nullable<UUID>;
19
+ headName: Nullable<string>;
20
+ status: HrResourceStatus;
21
+ employeeCount: number;
22
+ createdAt: IsoDateTime;
23
+ updatedAt: IsoDateTime;
24
+ }
25
+ export interface HrJobTitle {
26
+ id: UUID;
27
+ name: string;
28
+ status: HrResourceStatus;
29
+ employeeCount: number;
30
+ createdAt: IsoDateTime;
31
+ updatedAt: IsoDateTime;
32
+ }
33
+ export interface HrLocation {
34
+ id: UUID;
35
+ name: string;
36
+ city: Nullable<string>;
37
+ address: Nullable<string>;
38
+ status: HrResourceStatus;
39
+ employeeCount: number;
40
+ createdAt: IsoDateTime;
41
+ updatedAt: IsoDateTime;
42
+ }
43
+ export interface CreateHrDepartmentRequest {
44
+ name: string;
45
+ parentId?: Nullable<UUID>;
46
+ headEmployeeId?: Nullable<UUID>;
47
+ }
48
+ export interface CreateHrJobTitleRequest {
49
+ name: string;
50
+ }
51
+ export interface CreateHrLocationRequest {
52
+ name: string;
53
+ city?: Nullable<string>;
54
+ address?: Nullable<string>;
55
+ }
56
+ export interface UpdateHrCompanyRequest {
57
+ companyName?: string;
58
+ countryCode?: string;
59
+ timeZone?: string;
60
+ currency?: string;
61
+ workingWeekdays?: number[];
62
+ workdayMinutes?: number;
63
+ capturesClockLocation?: boolean;
64
+ }
65
+ export interface UpdateHrDepartmentRequest {
66
+ name?: string;
67
+ parentId?: Nullable<UUID>;
68
+ headEmployeeId?: Nullable<UUID>;
69
+ status?: HrResourceStatus;
70
+ }
71
+ export interface UpdateHrJobTitleRequest {
72
+ name?: string;
73
+ status?: HrResourceStatus;
74
+ }
75
+ export interface UpdateHrLocationRequest {
76
+ name?: string;
77
+ city?: Nullable<string>;
78
+ address?: Nullable<string>;
79
+ status?: HrResourceStatus;
80
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,147 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { UUID } from '../../type/uuid.type.js';
4
+ import type { HrLeaveAccrual } from './hr-leave-accrual.enum.js';
5
+ import type { HrLeaveLedgerKind } from './hr-leave-ledger-kind.enum.js';
6
+ import type { HrLeaveRequestStatus } from './hr-leave-request-status.enum.js';
7
+ import type { HrResourceStatus } from './hr-resource-status.enum.js';
8
+ import type { LocalizedText } from './localized-text.type.js';
9
+ export interface HrAbsence {
10
+ requestId: UUID;
11
+ employeeId: UUID;
12
+ employeeName: string;
13
+ departmentName: Nullable<string>;
14
+ leaveTypeName: LocalizedText;
15
+ startDate: string;
16
+ endDate: string;
17
+ startsAfternoon: boolean;
18
+ endsAtNoon: boolean;
19
+ }
20
+ export interface HrEmployeeTimeOff {
21
+ year: number;
22
+ balances: HrLeaveBalance[];
23
+ ledger: HrLedgerEntry[];
24
+ }
25
+ export interface HrLeaveBalance {
26
+ leaveTypeId: UUID;
27
+ leaveTypeName: LocalizedText;
28
+ year: number;
29
+ isPaid: boolean;
30
+ tracksBalance: boolean;
31
+ grantedHalfDays: number;
32
+ takenHalfDays: number;
33
+ pendingHalfDays: number;
34
+ availableHalfDays: number;
35
+ }
36
+ export interface HrLeavePreview {
37
+ halfDays: number;
38
+ availableHalfDays: Nullable<number>;
39
+ isEnough: boolean;
40
+ }
41
+ export interface HrLeaveRequest {
42
+ id: UUID;
43
+ employeeId: UUID;
44
+ employeeName: string;
45
+ departmentName: Nullable<string>;
46
+ jobTitleName: Nullable<string>;
47
+ leaveTypeId: UUID;
48
+ leaveTypeName: LocalizedText;
49
+ isPaid: boolean;
50
+ startDate: string;
51
+ endDate: string;
52
+ startsAfternoon: boolean;
53
+ endsAtNoon: boolean;
54
+ halfDays: number;
55
+ reason: Nullable<string>;
56
+ status: HrLeaveRequestStatus;
57
+ decidedByName: Nullable<string>;
58
+ decidedAt: Nullable<IsoDateTime>;
59
+ decisionNote: Nullable<string>;
60
+ createdAt: IsoDateTime;
61
+ }
62
+ export interface HrLeaveRequestsPage {
63
+ items: HrLeaveRequest[];
64
+ total: number;
65
+ limit: number;
66
+ offset: number;
67
+ }
68
+ export interface HrLeaveType {
69
+ id: UUID;
70
+ name: LocalizedText;
71
+ code: string;
72
+ isPaid: boolean;
73
+ tracksBalance: boolean;
74
+ annualAllowanceHalfDays: number;
75
+ accrual: HrLeaveAccrual;
76
+ carryOverMaxHalfDays: number;
77
+ requiresApproval: boolean;
78
+ requiresDocument: boolean;
79
+ minNoticeDays: number;
80
+ sortOrder: number;
81
+ status: HrResourceStatus;
82
+ }
83
+ export interface HrLedgerEntry {
84
+ id: UUID;
85
+ leaveTypeId: UUID;
86
+ leaveTypeName: LocalizedText;
87
+ year: number;
88
+ kind: HrLeaveLedgerKind;
89
+ halfDays: number;
90
+ note: Nullable<string>;
91
+ createdAt: IsoDateTime;
92
+ }
93
+ export interface HrPublicHoliday {
94
+ id: UUID;
95
+ date: string;
96
+ name: LocalizedText;
97
+ }
98
+ export interface HrTimeOffCalendar {
99
+ holidays: HrPublicHoliday[];
100
+ absences: HrAbsence[];
101
+ }
102
+ export interface HrTimeOffSummary {
103
+ pendingCount: number;
104
+ awayToday: HrAbsence[];
105
+ }
106
+ export interface AdjustHrBalanceRequest {
107
+ leaveTypeId: UUID;
108
+ year: number;
109
+ halfDays: number;
110
+ note: string;
111
+ }
112
+ export interface CreateHrHolidayRequest {
113
+ date: string;
114
+ name: LocalizedText;
115
+ }
116
+ export interface CreateHrLeaveRequestForEmployeeRequest extends HrLeaveDaysRequest {
117
+ employeeId: UUID;
118
+ isApproved?: boolean;
119
+ }
120
+ export interface CreateHrLeaveTypeRequest {
121
+ name: LocalizedText;
122
+ code: string;
123
+ isPaid?: boolean;
124
+ tracksBalance?: boolean;
125
+ annualAllowanceHalfDays?: number;
126
+ accrual?: HrLeaveAccrual;
127
+ carryOverMaxHalfDays?: number;
128
+ requiresApproval?: boolean;
129
+ requiresDocument?: boolean;
130
+ minNoticeDays?: number;
131
+ sortOrder?: number;
132
+ }
133
+ export interface DecideHrLeaveRequestRequest {
134
+ note?: string;
135
+ }
136
+ export interface ImportHrHolidaysRequest {
137
+ year: number;
138
+ }
139
+ export interface HrLeaveDaysRequest {
140
+ leaveTypeId: UUID;
141
+ startDate: string;
142
+ endDate: string;
143
+ startsAfternoon?: boolean;
144
+ endsAtNoon?: boolean;
145
+ reason?: Nullable<string>;
146
+ }
147
+ export type UpdateHrLeaveTypeRequest = Partial<Omit<CreateHrLeaveTypeRequest, 'code'>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,15 @@
1
1
  export * from './hr-access-action.enum.js';
2
+ export * from './hr-compensation.type.js';
3
+ export * from './hr-employee.type.js';
2
4
  export * from './hr-employment-event-kind.enum.js';
3
5
  export * from './hr-employment-status.enum.js';
4
6
  export * from './hr-employment-type.enum.js';
5
7
  export * from './hr-leave-accrual.enum.js';
6
8
  export * from './hr-leave-ledger-kind.enum.js';
7
9
  export * from './hr-leave-request-status.enum.js';
10
+ export * from './hr-me.type.js';
11
+ export * from './hr-organization.type.js';
8
12
  export * from './hr-pay-period.enum.js';
9
13
  export * from './hr-resource-status.enum.js';
14
+ export * from './hr-time-off.type.js';
10
15
  export * from './localized-text.type.js';
@@ -1,10 +1,15 @@
1
1
  export * from './hr-access-action.enum.js';
2
+ export * from './hr-compensation.type.js';
3
+ export * from './hr-employee.type.js';
2
4
  export * from './hr-employment-event-kind.enum.js';
3
5
  export * from './hr-employment-status.enum.js';
4
6
  export * from './hr-employment-type.enum.js';
5
7
  export * from './hr-leave-accrual.enum.js';
6
8
  export * from './hr-leave-ledger-kind.enum.js';
7
9
  export * from './hr-leave-request-status.enum.js';
10
+ export * from './hr-me.type.js';
11
+ export * from './hr-organization.type.js';
8
12
  export * from './hr-pay-period.enum.js';
9
13
  export * from './hr-resource-status.enum.js';
14
+ export * from './hr-time-off.type.js';
10
15
  export * from './localized-text.type.js';
@@ -39,6 +39,8 @@ export interface RestaurantKitchenBoard {
39
39
  warnMinutes: number;
40
40
  lateMinutes: number;
41
41
  tickets: RestaurantKitchenTicket[];
42
+ /** Tickets just finished, so one can be called back. */
43
+ recent: RestaurantKitchenTicket[];
42
44
  allDay: RestaurantAllDayCount[];
43
45
  }
44
46
  /** Moves every line of a ticket on together. */
@@ -106,6 +106,7 @@ export interface PublicRestaurantTableOrderLine {
106
106
  status: RestaurantLineStatus;
107
107
  }
108
108
  export interface PublicRestaurantTableOrder {
109
+ id: UUID;
109
110
  number: number;
110
111
  status: RestaurantOrderStatus;
111
112
  placedAt: string;
@@ -124,6 +125,10 @@ export interface PublicRestaurantTableBill {
124
125
  orders: PublicRestaurantTableOrder[];
125
126
  openRequests: RestaurantServiceRequestKind[];
126
127
  }
128
+ /** What a table has at the moment. No open bill is an ordinary answer: nobody has ordered yet. */
129
+ export interface PublicRestaurantTableState {
130
+ bill: PublicRestaurantTableBill | null;
131
+ }
127
132
  export interface PublicRestaurantServiceRequestBody {
128
133
  kind: RestaurantServiceRequestKind;
129
134
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.61.0",
3
+ "version": "0.63.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {