@iveri/contracts 0.82.1 → 0.84.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 (69) hide show
  1. package/README.md +8 -0
  2. package/dist/api/conduit/connect-attempt-status.enum.d.ts +26 -0
  3. package/dist/api/conduit/connect-attempt-status.enum.js +27 -0
  4. package/dist/api/conduit/connect.type.d.ts +72 -0
  5. package/dist/api/conduit/connect.type.js +8 -0
  6. package/dist/api/conduit/connection.type.d.ts +32 -1
  7. package/dist/api/conduit/connector-auth-type.enum.d.ts +37 -1
  8. package/dist/api/conduit/connector-auth-type.enum.js +36 -0
  9. package/dist/api/conduit/connector.type.d.ts +85 -0
  10. package/dist/api/conduit/connector.type.js +12 -0
  11. package/dist/api/conduit/dispatch.type.d.ts +23 -1
  12. package/dist/api/conduit/index.d.ts +2 -0
  13. package/dist/api/conduit/index.js +2 -0
  14. package/dist/api/hr/hr-celebration.type.d.ts +22 -0
  15. package/dist/api/hr/hr-celebration.type.js +1 -0
  16. package/dist/api/hr/hr-course-assignment-state.enum.d.ts +11 -0
  17. package/dist/api/hr/hr-course-assignment-state.enum.js +12 -0
  18. package/dist/api/hr/hr-course-completion-source.enum.d.ts +5 -0
  19. package/dist/api/hr/hr-course-completion-source.enum.js +6 -0
  20. package/dist/api/hr/hr-employee.type.d.ts +2 -0
  21. package/dist/api/hr/hr-equipment-category.enum.d.ts +11 -0
  22. package/dist/api/hr/hr-equipment-category.enum.js +12 -0
  23. package/dist/api/hr/hr-equipment-state.enum.d.ts +10 -0
  24. package/dist/api/hr/hr-equipment-state.enum.js +11 -0
  25. package/dist/api/hr/hr-equipment.type.d.ts +71 -0
  26. package/dist/api/hr/hr-equipment.type.js +1 -0
  27. package/dist/api/hr/hr-expense-claim-status.enum.d.ts +8 -0
  28. package/dist/api/hr/hr-expense-claim-status.enum.js +9 -0
  29. package/dist/api/hr/hr-expense-paid-via.enum.d.ts +5 -0
  30. package/dist/api/hr/hr-expense-paid-via.enum.js +6 -0
  31. package/dist/api/hr/hr-expense.type.d.ts +75 -0
  32. package/dist/api/hr/hr-expense.type.js +1 -0
  33. package/dist/api/hr/hr-learning.type.d.ts +83 -0
  34. package/dist/api/hr/hr-learning.type.js +1 -0
  35. package/dist/api/hr/hr-leave-allowance-period.enum.d.ts +7 -0
  36. package/dist/api/hr/hr-leave-allowance-period.enum.js +8 -0
  37. package/dist/api/hr/hr-leave-eligibility-exception-kind.enum.d.ts +9 -0
  38. package/dist/api/hr/hr-leave-eligibility-exception-kind.enum.js +10 -0
  39. package/dist/api/hr/hr-letter-kind.enum.d.ts +7 -0
  40. package/dist/api/hr/hr-letter-kind.enum.js +8 -0
  41. package/dist/api/hr/hr-letter-request-status.enum.d.ts +7 -0
  42. package/dist/api/hr/hr-letter-request-status.enum.js +8 -0
  43. package/dist/api/hr/hr-letter.type.d.ts +38 -0
  44. package/dist/api/hr/hr-letter.type.js +1 -0
  45. package/dist/api/hr/hr-me.type.d.ts +1 -0
  46. package/dist/api/hr/hr-payroll.type.d.ts +2 -0
  47. package/dist/api/hr/hr-planning.type.d.ts +2 -0
  48. package/dist/api/hr/hr-probation-outcome.enum.d.ts +6 -0
  49. package/dist/api/hr/hr-probation-outcome.enum.js +7 -0
  50. package/dist/api/hr/hr-probation.type.d.ts +41 -0
  51. package/dist/api/hr/hr-probation.type.js +1 -0
  52. package/dist/api/hr/hr-report.type.d.ts +54 -0
  53. package/dist/api/hr/hr-report.type.js +1 -0
  54. package/dist/api/hr/hr-survey-audience.enum.d.ts +6 -0
  55. package/dist/api/hr/hr-survey-audience.enum.js +7 -0
  56. package/dist/api/hr/hr-survey-group-kind.enum.d.ts +5 -0
  57. package/dist/api/hr/hr-survey-group-kind.enum.js +6 -0
  58. package/dist/api/hr/hr-survey-question-kind.enum.d.ts +8 -0
  59. package/dist/api/hr/hr-survey-question-kind.enum.js +9 -0
  60. package/dist/api/hr/hr-survey-state.enum.d.ts +7 -0
  61. package/dist/api/hr/hr-survey-state.enum.js +8 -0
  62. package/dist/api/hr/hr-survey.type.d.ts +98 -0
  63. package/dist/api/hr/hr-survey.type.js +1 -0
  64. package/dist/api/hr/hr-thanks.type.d.ts +50 -0
  65. package/dist/api/hr/hr-thanks.type.js +1 -0
  66. package/dist/api/hr/hr-time-off.type.d.ts +42 -0
  67. package/dist/api/hr/index.d.ts +24 -0
  68. package/dist/api/hr/index.js +24 -0
  69. package/package.json +1 -1
@@ -0,0 +1,71 @@
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 { HrEquipmentCategory } from './hr-equipment-category.enum.js';
5
+ import type { HrEquipmentState } from './hr-equipment-state.enum.js';
6
+ export interface HrEquipmentAssignment {
7
+ id: UUID;
8
+ itemId: UUID;
9
+ itemName: string;
10
+ itemCategory: HrEquipmentCategory;
11
+ serialNumber: Nullable<string>;
12
+ employeeId: UUID;
13
+ employeeName: string;
14
+ /** The holder's last day, set when they are leaving. */
15
+ employeeLastDay: Nullable<string>;
16
+ assignedOn: string;
17
+ assignedCondition: Nullable<string>;
18
+ receivedConfirmedAt: Nullable<IsoDateTime>;
19
+ /** Null while it is still with them. */
20
+ returnedOn: Nullable<string>;
21
+ returnedCondition: Nullable<string>;
22
+ }
23
+ export interface HrEquipmentItemDetail {
24
+ item: HrEquipmentItem;
25
+ /** Every hand-over, newest first. */
26
+ history: HrEquipmentAssignment[];
27
+ }
28
+ export interface HrEquipmentItem {
29
+ id: UUID;
30
+ name: string;
31
+ category: HrEquipmentCategory;
32
+ serialNumber: Nullable<string>;
33
+ purchasedOn: Nullable<string>;
34
+ purchaseCostMinor: Nullable<number>;
35
+ currency: Nullable<string>;
36
+ /** `assigned` while a hand-over is open, otherwise what HR last said about the item. */
37
+ state: HrEquipmentState;
38
+ notes: Nullable<string>;
39
+ holderEmployeeId: Nullable<UUID>;
40
+ holderName: Nullable<string>;
41
+ heldSince: Nullable<string>;
42
+ createdAt: IsoDateTime;
43
+ }
44
+ export interface HrAssignEquipmentRequest {
45
+ employeeId: UUID;
46
+ assignedOn: string;
47
+ condition?: Nullable<string>;
48
+ }
49
+ export interface HrReturnEquipmentRequest {
50
+ returnedOn: string;
51
+ condition?: Nullable<string>;
52
+ status?: HrEquipmentState;
53
+ }
54
+ export interface HrSaveEquipmentItemRequest {
55
+ name: string;
56
+ category: HrEquipmentCategory;
57
+ serialNumber?: Nullable<string>;
58
+ purchasedOn?: Nullable<string>;
59
+ /** In minor units of the company's currency. */
60
+ purchaseCostMinor?: Nullable<number>;
61
+ notes?: Nullable<string>;
62
+ }
63
+ export interface UpdateHrEquipmentItemRequest {
64
+ name?: string;
65
+ category?: HrEquipmentCategory;
66
+ serialNumber?: Nullable<string>;
67
+ purchasedOn?: Nullable<string>;
68
+ purchaseCostMinor?: Nullable<number>;
69
+ notes?: Nullable<string>;
70
+ status?: HrEquipmentState;
71
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ /** Where a claim for money spent on the company's behalf has got to. */
2
+ export declare enum HrExpenseClaimStatus {
3
+ DRAFT = "draft",
4
+ SUBMITTED = "submitted",
5
+ APPROVED = "approved",
6
+ REJECTED = "rejected",
7
+ PAID = "paid"
8
+ }
@@ -0,0 +1,9 @@
1
+ /** Where a claim for money spent on the company's behalf has got to. */
2
+ export var HrExpenseClaimStatus;
3
+ (function (HrExpenseClaimStatus) {
4
+ HrExpenseClaimStatus["DRAFT"] = "draft";
5
+ HrExpenseClaimStatus["SUBMITTED"] = "submitted";
6
+ HrExpenseClaimStatus["APPROVED"] = "approved";
7
+ HrExpenseClaimStatus["REJECTED"] = "rejected";
8
+ HrExpenseClaimStatus["PAID"] = "paid";
9
+ })(HrExpenseClaimStatus || (HrExpenseClaimStatus = {}));
@@ -0,0 +1,5 @@
1
+ /** How an agreed claim was paid back: on a payslip, or by HR some other way. */
2
+ export declare enum HrExpensePaidVia {
3
+ PAYROLL = "payroll",
4
+ OUTSIDE_PAYROLL = "outside-payroll"
5
+ }
@@ -0,0 +1,6 @@
1
+ /** How an agreed claim was paid back: on a payslip, or by HR some other way. */
2
+ export var HrExpensePaidVia;
3
+ (function (HrExpensePaidVia) {
4
+ HrExpensePaidVia["PAYROLL"] = "payroll";
5
+ HrExpensePaidVia["OUTSIDE_PAYROLL"] = "outside-payroll";
6
+ })(HrExpensePaidVia || (HrExpensePaidVia = {}));
@@ -0,0 +1,75 @@
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 { HrExpenseClaimStatus } from './hr-expense-claim-status.enum.js';
5
+ import type { HrExpensePaidVia } from './hr-expense-paid-via.enum.js';
6
+ import type { HrResourceStatus } from './hr-resource-status.enum.js';
7
+ import type { LocalizedText } from './localized-text.type.js';
8
+ export interface HrExpenseCategory {
9
+ id: UUID;
10
+ code: string;
11
+ name: LocalizedText;
12
+ sortOrder: number;
13
+ status: HrResourceStatus;
14
+ }
15
+ export interface HrExpenseClaim {
16
+ id: UUID;
17
+ employeeId: UUID;
18
+ employeeName: string;
19
+ departmentName: Nullable<string>;
20
+ categoryId: UUID;
21
+ categoryName: LocalizedText;
22
+ spentOn: string;
23
+ /** In minor units of `currency`. */
24
+ amountMinor: number;
25
+ currency: string;
26
+ description: string;
27
+ /** Null while a draft has no receipt yet. Every sent claim has one. */
28
+ receiptFileName: Nullable<string>;
29
+ receiptContentType: Nullable<string>;
30
+ status: HrExpenseClaimStatus;
31
+ submittedAt: Nullable<IsoDateTime>;
32
+ decidedAt: Nullable<IsoDateTime>;
33
+ decidedByName: Nullable<string>;
34
+ decisionNote: Nullable<string>;
35
+ /** The month of the pay run that has taken this claim, paid or not yet. */
36
+ payrollPeriod: Nullable<string>;
37
+ paidVia: Nullable<HrExpensePaidVia>;
38
+ paidOn: Nullable<string>;
39
+ createdAt: IsoDateTime;
40
+ }
41
+ export interface HrExpenseClaimsPage {
42
+ items: HrExpenseClaim[];
43
+ total: number;
44
+ limit: number;
45
+ offset: number;
46
+ }
47
+ export interface CreateHrExpenseClaimRequest {
48
+ categoryId: UUID;
49
+ spentOn: string;
50
+ amountMinor: number;
51
+ description: string;
52
+ submit?: string;
53
+ }
54
+ export interface DecideHrExpenseClaimRequest {
55
+ note?: Nullable<string>;
56
+ }
57
+ export interface HrPayExpenseClaimRequest {
58
+ paidOn: string;
59
+ }
60
+ export interface HrSaveExpenseCategoryRequest {
61
+ name: LocalizedText;
62
+ code: string;
63
+ sortOrder?: number;
64
+ }
65
+ export interface UpdateHrExpenseCategoryRequest {
66
+ name?: LocalizedText;
67
+ sortOrder?: number;
68
+ status?: HrResourceStatus;
69
+ }
70
+ export interface UpdateHrExpenseClaimRequest {
71
+ categoryId?: UUID;
72
+ spentOn?: string;
73
+ amountMinor?: number;
74
+ description?: string;
75
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,83 @@
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 { HrCourseAssignmentState } from './hr-course-assignment-state.enum.js';
5
+ import type { HrCourseCompletionSource } from './hr-course-completion-source.enum.js';
6
+ import type { HrResourceStatus } from './hr-resource-status.enum.js';
7
+ export interface HrCourseAssignment {
8
+ id: UUID;
9
+ courseId: UUID;
10
+ courseTitle: string;
11
+ courseProvider: Nullable<string>;
12
+ courseUrl: Nullable<string>;
13
+ issuesCertificate: boolean;
14
+ employeeId: UUID;
15
+ employeeName: string;
16
+ dueOn: string;
17
+ /** Worked out from the dates on this read. */
18
+ state: HrCourseAssignmentState;
19
+ lastCompletedOn: Nullable<string>;
20
+ expiresOn: Nullable<string>;
21
+ /** When it has to be done next, or null once done for good. */
22
+ nextDueOn: Nullable<string>;
23
+ /** Newest first, turned-down ones included. */
24
+ completions: HrCourseCompletion[];
25
+ }
26
+ export interface HrCourseCompletion {
27
+ id: UUID;
28
+ completedOn: string;
29
+ source: HrCourseCompletionSource;
30
+ certificateFileName: Nullable<string>;
31
+ recordedAt: IsoDateTime;
32
+ /** Set when HR turned it down; it then no longer counts. */
33
+ rejectedAt: Nullable<IsoDateTime>;
34
+ rejectionReason: Nullable<string>;
35
+ }
36
+ export interface HrCourseDetail {
37
+ course: HrCourse;
38
+ assignments: HrCourseAssignment[];
39
+ }
40
+ export interface HrCourse {
41
+ id: UUID;
42
+ title: string;
43
+ provider: Nullable<string>;
44
+ url: Nullable<string>;
45
+ description: Nullable<string>;
46
+ issuesCertificate: boolean;
47
+ /** Null for a certificate that never lapses, or a course with none. */
48
+ certificateValidMonths: Nullable<number>;
49
+ status: HrResourceStatus;
50
+ assignedCount: number;
51
+ createdAt: IsoDateTime;
52
+ }
53
+ export interface HrAssignCourseRequest {
54
+ employeeIds?: UUID[];
55
+ departmentId?: UUID;
56
+ jobTitleId?: UUID;
57
+ teamId?: UUID;
58
+ dueOn: string;
59
+ }
60
+ export interface HrRecordCompletionRequest {
61
+ completedOn: string;
62
+ }
63
+ export interface HrRejectCompletionRequest {
64
+ reason: string;
65
+ }
66
+ export interface HrSaveCourseRequest {
67
+ title: string;
68
+ provider?: Nullable<string>;
69
+ url?: Nullable<string>;
70
+ description?: Nullable<string>;
71
+ issuesCertificate?: boolean;
72
+ /** How many months the certificate lasts; left out or null, it never lapses. */
73
+ certificateValidMonths?: Nullable<number>;
74
+ }
75
+ export interface UpdateHrCourseRequest {
76
+ title?: string;
77
+ provider?: Nullable<string>;
78
+ url?: Nullable<string>;
79
+ description?: Nullable<string>;
80
+ issuesCertificate?: boolean;
81
+ certificateValidMonths?: Nullable<number>;
82
+ status?: HrResourceStatus;
83
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ /** How often a leave type's allowance arrives. */
2
+ export declare enum HrLeaveAllowancePeriod {
3
+ /** As the type's accrual says: all at once on 1 January, or a twelfth a month. */
4
+ YEAR = "year",
5
+ /** A quarter of the year's allowance at the start of each quarter, and nothing carried into the next. */
6
+ QUARTER = "quarter"
7
+ }
@@ -0,0 +1,8 @@
1
+ /** How often a leave type's allowance arrives. */
2
+ export var HrLeaveAllowancePeriod;
3
+ (function (HrLeaveAllowancePeriod) {
4
+ /** As the type's accrual says: all at once on 1 January, or a twelfth a month. */
5
+ HrLeaveAllowancePeriod["YEAR"] = "year";
6
+ /** A quarter of the year's allowance at the start of each quarter, and nothing carried into the next. */
7
+ HrLeaveAllowancePeriod["QUARTER"] = "quarter";
8
+ })(HrLeaveAllowancePeriod || (HrLeaveAllowancePeriod = {}));
@@ -0,0 +1,9 @@
1
+ /** What HR said about when one person may take one kind of leave, against the type's waiting period. */
2
+ export declare enum HrLeaveEligibilityExceptionKind {
3
+ /** From a date before the waiting period ends, or from the first day when no date is given. */
4
+ ALLOW_EARLY = "allow-early",
5
+ /** Not before a date later than the waiting period ends. */
6
+ HOLD_BACK = "hold-back",
7
+ /** Back to the type's own waiting period. */
8
+ FOLLOW_RULE = "follow-rule"
9
+ }
@@ -0,0 +1,10 @@
1
+ /** What HR said about when one person may take one kind of leave, against the type's waiting period. */
2
+ export var HrLeaveEligibilityExceptionKind;
3
+ (function (HrLeaveEligibilityExceptionKind) {
4
+ /** From a date before the waiting period ends, or from the first day when no date is given. */
5
+ HrLeaveEligibilityExceptionKind["ALLOW_EARLY"] = "allow-early";
6
+ /** Not before a date later than the waiting period ends. */
7
+ HrLeaveEligibilityExceptionKind["HOLD_BACK"] = "hold-back";
8
+ /** Back to the type's own waiting period. */
9
+ HrLeaveEligibilityExceptionKind["FOLLOW_RULE"] = "follow-rule";
10
+ })(HrLeaveEligibilityExceptionKind || (HrLeaveEligibilityExceptionKind = {}));
@@ -0,0 +1,7 @@
1
+ /** What a person asks HR to write for them. */
2
+ export declare enum HrLetterKind {
3
+ EMPLOYMENT = "employment",
4
+ SALARY = "salary",
5
+ VISA = "visa",
6
+ OTHER = "other"
7
+ }
@@ -0,0 +1,8 @@
1
+ /** What a person asks HR to write for them. */
2
+ export var HrLetterKind;
3
+ (function (HrLetterKind) {
4
+ HrLetterKind["EMPLOYMENT"] = "employment";
5
+ HrLetterKind["SALARY"] = "salary";
6
+ HrLetterKind["VISA"] = "visa";
7
+ HrLetterKind["OTHER"] = "other";
8
+ })(HrLetterKind || (HrLetterKind = {}));
@@ -0,0 +1,7 @@
1
+ /** Where a request for a letter has got to. */
2
+ export declare enum HrLetterRequestStatus {
3
+ PENDING = "pending",
4
+ COMPLETED = "completed",
5
+ DECLINED = "declined",
6
+ WITHDRAWN = "withdrawn"
7
+ }
@@ -0,0 +1,8 @@
1
+ /** Where a request for a letter has got to. */
2
+ export var HrLetterRequestStatus;
3
+ (function (HrLetterRequestStatus) {
4
+ HrLetterRequestStatus["PENDING"] = "pending";
5
+ HrLetterRequestStatus["COMPLETED"] = "completed";
6
+ HrLetterRequestStatus["DECLINED"] = "declined";
7
+ HrLetterRequestStatus["WITHDRAWN"] = "withdrawn";
8
+ })(HrLetterRequestStatus || (HrLetterRequestStatus = {}));
@@ -0,0 +1,38 @@
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 { HrLetterKind } from './hr-letter-kind.enum.js';
5
+ import type { HrLetterRequestStatus } from './hr-letter-request-status.enum.js';
6
+ export interface HrLetterRequest {
7
+ id: UUID;
8
+ employeeId: UUID;
9
+ employeeName: string;
10
+ departmentName: Nullable<string>;
11
+ kind: HrLetterKind;
12
+ purpose: string;
13
+ language: string;
14
+ status: HrLetterRequestStatus;
15
+ decidedAt: Nullable<IsoDateTime>;
16
+ decidedByName: Nullable<string>;
17
+ declineReason: Nullable<string>;
18
+ /** The letter among the person's documents, downloadable from `/me/documents/:documentId/download`. */
19
+ documentId: Nullable<UUID>;
20
+ createdAt: IsoDateTime;
21
+ }
22
+ export interface HrLetterRequestsPage {
23
+ items: HrLetterRequest[];
24
+ total: number;
25
+ limit: number;
26
+ offset: number;
27
+ }
28
+ export interface HrAnswerLetterRequest {
29
+ title?: string;
30
+ }
31
+ export interface HrAskLetterRequest {
32
+ kind: HrLetterKind;
33
+ purpose: string;
34
+ language: string;
35
+ }
36
+ export interface HrDeclineLetterRequest {
37
+ reason: string;
38
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -82,4 +82,5 @@ export interface UpdateHrMyEmployeeRequest {
82
82
  emergencyContactPhone?: Nullable<string>;
83
83
  emergencyContactRelation?: Nullable<string>;
84
84
  localeCode?: string;
85
+ sharesBirthday?: boolean;
85
86
  }
@@ -33,6 +33,8 @@ export interface HrPayrollRun {
33
33
  export interface HrPayslipLine {
34
34
  label: string;
35
35
  amountMinor: number;
36
+ /** The expense claim this line pays back, or null for anything else on a payslip. */
37
+ expenseClaimId: Nullable<UUID>;
36
38
  }
37
39
  export interface HrPayslip {
38
40
  id: UUID;
@@ -46,6 +46,8 @@ export interface HrLeavePreviewWithClashes {
46
46
  halfDays: number;
47
47
  availableHalfDays: Nullable<number>;
48
48
  isEnough: boolean;
49
+ /** When these days start before the person may take this kind of leave, the first day they may. */
50
+ availableFrom: Nullable<string>;
49
51
  clashes: HrLeaveClash[];
50
52
  }
51
53
  export interface HrLeaveRequestClashes {
@@ -0,0 +1,6 @@
1
+ /** How a probation ended: kept on, given longer, or not kept, which leads into the leaving flow. */
2
+ export declare enum HrProbationOutcome {
3
+ PASSED = "passed",
4
+ EXTENDED = "extended",
5
+ NOT_PASSED = "not-passed"
6
+ }
@@ -0,0 +1,7 @@
1
+ /** How a probation ended: kept on, given longer, or not kept, which leads into the leaving flow. */
2
+ export var HrProbationOutcome;
3
+ (function (HrProbationOutcome) {
4
+ HrProbationOutcome["PASSED"] = "passed";
5
+ HrProbationOutcome["EXTENDED"] = "extended";
6
+ HrProbationOutcome["NOT_PASSED"] = "not-passed";
7
+ })(HrProbationOutcome || (HrProbationOutcome = {}));
@@ -0,0 +1,41 @@
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 { HrProbationOutcome } from './hr-probation-outcome.enum.js';
5
+ export interface HrProbationDecision {
6
+ id: UUID;
7
+ employeeId: UUID;
8
+ probationEndDate: string;
9
+ outcome: HrProbationOutcome;
10
+ extendedTo: Nullable<string>;
11
+ note: Nullable<string>;
12
+ decidedByName: Nullable<string>;
13
+ createdAt: IsoDateTime;
14
+ }
15
+ export interface HrProbationDue {
16
+ employeeId: UUID;
17
+ employeeName: string;
18
+ jobTitleName: Nullable<string>;
19
+ departmentName: Nullable<string>;
20
+ managerName: Nullable<string>;
21
+ hireDate: string;
22
+ probationEndDate: string;
23
+ /** Days until it ends; below zero, it has ended with nothing decided. */
24
+ daysLeft: number;
25
+ }
26
+ export interface HrProbation {
27
+ employeeId: UUID;
28
+ probationEndDate: Nullable<string>;
29
+ /** Whether the end date they are on now has been decided. */
30
+ isDecided: boolean;
31
+ /** Newest first. */
32
+ decisions: HrProbationDecision[];
33
+ }
34
+ export interface DecideHrProbationRequest {
35
+ /** The end date being decided, as the decider saw it, so a decision made on a date since moved is refused. */
36
+ probationEndDate: string;
37
+ outcome: HrProbationOutcome;
38
+ /** The new end date, for an extension only. */
39
+ extendedTo?: Nullable<string>;
40
+ note?: Nullable<string>;
41
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,54 @@
1
+ import type { Nullable } from '../../type/nil.type.js';
2
+ import type { UUID } from '../../type/uuid.type.js';
3
+ import type { LocalizedText } from './localized-text.type.js';
4
+ export interface HrAbsenceMonth {
5
+ month: string;
6
+ /** Everybody's working half-days while they worked here, public holidays out. */
7
+ workingHalfDays: number;
8
+ /** Sick and unpaid working half-days. */
9
+ absentHalfDays: number;
10
+ absenceRatePercent: Nullable<number>;
11
+ }
12
+ export interface HrAbsenceReport {
13
+ from: string;
14
+ to: string;
15
+ workingHalfDays: number;
16
+ absentHalfDays: number;
17
+ absenceRatePercent: Nullable<number>;
18
+ months: HrAbsenceMonth[];
19
+ }
20
+ export interface HrHeadcountMonth {
21
+ month: string;
22
+ /** On the month's last day, or today for this month. */
23
+ headcount: number;
24
+ joiners: number;
25
+ leavers: number;
26
+ /** Leavers over the average of the headcount at the month's start and end. */
27
+ turnoverPercent: Nullable<number>;
28
+ }
29
+ export interface HrHeadcountReport {
30
+ from: string;
31
+ to: string;
32
+ /** Today. */
33
+ headcount: number;
34
+ joiners: number;
35
+ leavers: number;
36
+ /** Leavers over the twelve months, over the average monthly headcount. */
37
+ turnoverPercent: Nullable<number>;
38
+ /** Of everybody here today, in days. */
39
+ averageTenureDays: Nullable<number>;
40
+ months: HrHeadcountMonth[];
41
+ }
42
+ export interface HrTimeOffReport {
43
+ from: string;
44
+ to: string;
45
+ /** Most taken first. */
46
+ byType: HrTimeOffTaken[];
47
+ }
48
+ export interface HrTimeOffTaken {
49
+ leaveTypeId: UUID;
50
+ leaveTypeName: LocalizedText;
51
+ isPaid: boolean;
52
+ halfDays: number;
53
+ peopleCount: number;
54
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /** Who a survey asks. */
2
+ export declare enum HrSurveyAudience {
3
+ EVERYBODY = "everybody",
4
+ DEPARTMENT = "department",
5
+ TEAM = "team"
6
+ }
@@ -0,0 +1,7 @@
1
+ /** Who a survey asks. */
2
+ export var HrSurveyAudience;
3
+ (function (HrSurveyAudience) {
4
+ HrSurveyAudience["EVERYBODY"] = "everybody";
5
+ HrSurveyAudience["DEPARTMENT"] = "department";
6
+ HrSurveyAudience["TEAM"] = "team";
7
+ })(HrSurveyAudience || (HrSurveyAudience = {}));
@@ -0,0 +1,5 @@
1
+ /** What a slice of a survey's results is a slice by. */
2
+ export declare enum HrSurveyGroupKind {
3
+ DEPARTMENT = "department",
4
+ TEAM = "team"
5
+ }
@@ -0,0 +1,6 @@
1
+ /** What a slice of a survey's results is a slice by. */
2
+ export var HrSurveyGroupKind;
3
+ (function (HrSurveyGroupKind) {
4
+ HrSurveyGroupKind["DEPARTMENT"] = "department";
5
+ HrSurveyGroupKind["TEAM"] = "team";
6
+ })(HrSurveyGroupKind || (HrSurveyGroupKind = {}));
@@ -0,0 +1,8 @@
1
+ /** How a survey question is answered. */
2
+ export declare enum HrSurveyQuestionKind {
3
+ /** "How likely are you to recommend working here?", 0 to 10. */
4
+ ENPS = "enps",
5
+ /** 1 to 5. */
6
+ SCALE = "scale",
7
+ TEXT = "text"
8
+ }
@@ -0,0 +1,9 @@
1
+ /** How a survey question is answered. */
2
+ export var HrSurveyQuestionKind;
3
+ (function (HrSurveyQuestionKind) {
4
+ /** "How likely are you to recommend working here?", 0 to 10. */
5
+ HrSurveyQuestionKind["ENPS"] = "enps";
6
+ /** 1 to 5. */
7
+ HrSurveyQuestionKind["SCALE"] = "scale";
8
+ HrSurveyQuestionKind["TEXT"] = "text";
9
+ })(HrSurveyQuestionKind || (HrSurveyQuestionKind = {}));
@@ -0,0 +1,7 @@
1
+ /** Where a survey is, worked out from whether it is published and from its dates. */
2
+ export declare enum HrSurveyState {
3
+ DRAFT = "draft",
4
+ SCHEDULED = "scheduled",
5
+ OPEN = "open",
6
+ CLOSED = "closed"
7
+ }
@@ -0,0 +1,8 @@
1
+ /** Where a survey is, worked out from whether it is published and from its dates. */
2
+ export var HrSurveyState;
3
+ (function (HrSurveyState) {
4
+ HrSurveyState["DRAFT"] = "draft";
5
+ HrSurveyState["SCHEDULED"] = "scheduled";
6
+ HrSurveyState["OPEN"] = "open";
7
+ HrSurveyState["CLOSED"] = "closed";
8
+ })(HrSurveyState || (HrSurveyState = {}));