@iveri/contracts 0.53.0 → 0.54.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,7 @@
1
+ /** What somebody did with pay or identity numbers, as written to the access log. */
2
+ export declare enum HrAccessAction {
3
+ READ_SENSITIVE = "read-sensitive",
4
+ CHANGE_SENSITIVE = "change-sensitive",
5
+ READ_PAY = "read-pay",
6
+ CHANGE_PAY = "change-pay"
7
+ }
@@ -0,0 +1,8 @@
1
+ /** What somebody did with pay or identity numbers, as written to the access log. */
2
+ export var HrAccessAction;
3
+ (function (HrAccessAction) {
4
+ HrAccessAction["READ_SENSITIVE"] = "read-sensitive";
5
+ HrAccessAction["CHANGE_SENSITIVE"] = "change-sensitive";
6
+ HrAccessAction["READ_PAY"] = "read-pay";
7
+ HrAccessAction["CHANGE_PAY"] = "change-pay";
8
+ })(HrAccessAction || (HrAccessAction = {}));
@@ -0,0 +1,8 @@
1
+ export declare enum HrEmploymentEventKind {
2
+ HIRED = "hired",
3
+ /** Their department, job title, location, manager or employment type changed. */
4
+ JOB_CHANGED = "job-changed",
5
+ LEFT = "left",
6
+ /** A last day that was set has been withdrawn. */
7
+ STAYED = "stayed"
8
+ }
@@ -0,0 +1,9 @@
1
+ export var HrEmploymentEventKind;
2
+ (function (HrEmploymentEventKind) {
3
+ HrEmploymentEventKind["HIRED"] = "hired";
4
+ /** Their department, job title, location, manager or employment type changed. */
5
+ HrEmploymentEventKind["JOB_CHANGED"] = "job-changed";
6
+ HrEmploymentEventKind["LEFT"] = "left";
7
+ /** A last day that was set has been withdrawn. */
8
+ HrEmploymentEventKind["STAYED"] = "stayed";
9
+ })(HrEmploymentEventKind || (HrEmploymentEventKind = {}));
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Where somebody is in their employment, worked out from their dates on every read.
3
+ *
4
+ * Never stored: a column would need a sweep to stay true, and would be wrong whenever the sweep was late.
5
+ */
6
+ export declare enum HrEmploymentStatus {
7
+ /** Their first day is still to come. */
8
+ UPCOMING = "upcoming",
9
+ ACTIVE = "active",
10
+ /** A last day is set and has not passed. */
11
+ LEAVING = "leaving",
12
+ FORMER = "former"
13
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Where somebody is in their employment, worked out from their dates on every read.
3
+ *
4
+ * Never stored: a column would need a sweep to stay true, and would be wrong whenever the sweep was late.
5
+ */
6
+ export var HrEmploymentStatus;
7
+ (function (HrEmploymentStatus) {
8
+ /** Their first day is still to come. */
9
+ HrEmploymentStatus["UPCOMING"] = "upcoming";
10
+ HrEmploymentStatus["ACTIVE"] = "active";
11
+ /** A last day is set and has not passed. */
12
+ HrEmploymentStatus["LEAVING"] = "leaving";
13
+ HrEmploymentStatus["FORMER"] = "former";
14
+ })(HrEmploymentStatus || (HrEmploymentStatus = {}));
@@ -0,0 +1,6 @@
1
+ export declare enum HrEmploymentType {
2
+ FULL_TIME = "full-time",
3
+ PART_TIME = "part-time",
4
+ CONTRACTOR = "contractor",
5
+ INTERN = "intern"
6
+ }
@@ -0,0 +1,7 @@
1
+ export var HrEmploymentType;
2
+ (function (HrEmploymentType) {
3
+ HrEmploymentType["FULL_TIME"] = "full-time";
4
+ HrEmploymentType["PART_TIME"] = "part-time";
5
+ HrEmploymentType["CONTRACTOR"] = "contractor";
6
+ HrEmploymentType["INTERN"] = "intern";
7
+ })(HrEmploymentType || (HrEmploymentType = {}));
@@ -0,0 +1,7 @@
1
+ /** How a leave type's yearly allowance arrives. */
2
+ export declare enum HrLeaveAccrual {
3
+ /** All of it on the first day of the year. */
4
+ UPFRONT = "upfront",
5
+ /** A twelfth each month. */
6
+ MONTHLY = "monthly"
7
+ }
@@ -0,0 +1,8 @@
1
+ /** How a leave type's yearly allowance arrives. */
2
+ export var HrLeaveAccrual;
3
+ (function (HrLeaveAccrual) {
4
+ /** All of it on the first day of the year. */
5
+ HrLeaveAccrual["UPFRONT"] = "upfront";
6
+ /** A twelfth each month. */
7
+ HrLeaveAccrual["MONTHLY"] = "monthly";
8
+ })(HrLeaveAccrual || (HrLeaveAccrual = {}));
@@ -0,0 +1,9 @@
1
+ /** Why a leave balance moved. A balance is the sum of these and is never stored. */
2
+ export declare enum HrLeaveLedgerKind {
3
+ ALLOWANCE = "allowance",
4
+ ACCRUAL = "accrual",
5
+ CARRY_OVER = "carry-over",
6
+ ADJUSTMENT = "adjustment",
7
+ TAKEN = "taken",
8
+ RETURNED = "returned"
9
+ }
@@ -0,0 +1,10 @@
1
+ /** Why a leave balance moved. A balance is the sum of these and is never stored. */
2
+ export var HrLeaveLedgerKind;
3
+ (function (HrLeaveLedgerKind) {
4
+ HrLeaveLedgerKind["ALLOWANCE"] = "allowance";
5
+ HrLeaveLedgerKind["ACCRUAL"] = "accrual";
6
+ HrLeaveLedgerKind["CARRY_OVER"] = "carry-over";
7
+ HrLeaveLedgerKind["ADJUSTMENT"] = "adjustment";
8
+ HrLeaveLedgerKind["TAKEN"] = "taken";
9
+ HrLeaveLedgerKind["RETURNED"] = "returned";
10
+ })(HrLeaveLedgerKind || (HrLeaveLedgerKind = {}));
@@ -0,0 +1,6 @@
1
+ export declare enum HrLeaveRequestStatus {
2
+ PENDING = "pending",
3
+ APPROVED = "approved",
4
+ REJECTED = "rejected",
5
+ CANCELLED = "cancelled"
6
+ }
@@ -0,0 +1,7 @@
1
+ export var HrLeaveRequestStatus;
2
+ (function (HrLeaveRequestStatus) {
3
+ HrLeaveRequestStatus["PENDING"] = "pending";
4
+ HrLeaveRequestStatus["APPROVED"] = "approved";
5
+ HrLeaveRequestStatus["REJECTED"] = "rejected";
6
+ HrLeaveRequestStatus["CANCELLED"] = "cancelled";
7
+ })(HrLeaveRequestStatus || (HrLeaveRequestStatus = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum HrPayPeriod {
2
+ MONTH = "month",
3
+ HOUR = "hour"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var HrPayPeriod;
2
+ (function (HrPayPeriod) {
3
+ HrPayPeriod["MONTH"] = "month";
4
+ HrPayPeriod["HOUR"] = "hour";
5
+ })(HrPayPeriod || (HrPayPeriod = {}));
@@ -0,0 +1,5 @@
1
+ /** Whether a location, department, job title or leave type is still offered. Records that name one keep it. */
2
+ export declare enum HrResourceStatus {
3
+ ACTIVE = "active",
4
+ INACTIVE = "inactive"
5
+ }
@@ -0,0 +1,6 @@
1
+ /** Whether a location, department, job title or leave type is still offered. Records that name one keep it. */
2
+ export var HrResourceStatus;
3
+ (function (HrResourceStatus) {
4
+ HrResourceStatus["ACTIVE"] = "active";
5
+ HrResourceStatus["INACTIVE"] = "inactive";
6
+ })(HrResourceStatus || (HrResourceStatus = {}));
@@ -0,0 +1,10 @@
1
+ export * from './hr-access-action.enum.js';
2
+ export * from './hr-employment-event-kind.enum.js';
3
+ export * from './hr-employment-status.enum.js';
4
+ export * from './hr-employment-type.enum.js';
5
+ export * from './hr-leave-accrual.enum.js';
6
+ export * from './hr-leave-ledger-kind.enum.js';
7
+ export * from './hr-leave-request-status.enum.js';
8
+ export * from './hr-pay-period.enum.js';
9
+ export * from './hr-resource-status.enum.js';
10
+ export * from './localized-text.type.js';
@@ -0,0 +1,10 @@
1
+ export * from './hr-access-action.enum.js';
2
+ export * from './hr-employment-event-kind.enum.js';
3
+ export * from './hr-employment-status.enum.js';
4
+ export * from './hr-employment-type.enum.js';
5
+ export * from './hr-leave-accrual.enum.js';
6
+ export * from './hr-leave-ledger-kind.enum.js';
7
+ export * from './hr-leave-request-status.enum.js';
8
+ export * from './hr-pay-period.enum.js';
9
+ export * from './hr-resource-status.enum.js';
10
+ export * from './localized-text.type.js';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Text written in each language it has been written in, keyed by locale.
3
+ *
4
+ * Used for what ships in three languages and a company may change, such as a leave type or a
5
+ * public holiday. What a company types for its own staff, such as a department, is plain text.
6
+ */
7
+ export type LocalizedText = Record<string, string>;
@@ -0,0 +1 @@
1
+ export {};
@@ -498,7 +498,53 @@ export declare enum UserPermission {
498
498
  /** Change promotions and moderate reviews. */
499
499
  RESTAURANT_MARKETING_MANAGE = "restaurant:marketing:manage",
500
500
  /** See sales reports. */
501
- RESTAURANT_REPORT_READ = "restaurant:report:read"
501
+ RESTAURANT_REPORT_READ = "restaurant:report:read",
502
+ /** Read a company's HR settings, locations, departments and job titles. */
503
+ HR_ORG_READ = "hr:org:read",
504
+ /** Change them. */
505
+ HR_ORG_MANAGE = "hr:org:manage",
506
+ /** Read employee records, without pay or identity numbers. */
507
+ HR_EMPLOYEE_READ = "hr:employee:read",
508
+ /** Add and change employee records, record a job change, and end somebody's employment. */
509
+ HR_EMPLOYEE_MANAGE = "hr:employee:manage",
510
+ /** Read pay, identity numbers and bank details. Its own permission, because keeping a directory right does not need them. */
511
+ HR_COMPENSATION_READ = "hr:compensation:read",
512
+ /** Change them. */
513
+ HR_COMPENSATION_MANAGE = "hr:compensation:manage",
514
+ /** See who read or changed pay and identity numbers, which reading them does not show. */
515
+ HR_AUDIT_READ = "hr:audit:read",
516
+ /** See everybody's time off, balances and the holiday calendar. A manager sees their own reports without this. */
517
+ HR_TIME_OFF_READ = "hr:time-off:read",
518
+ /** Decide anybody's time off, adjust balances, and change leave types and holidays. */
519
+ HR_TIME_OFF_MANAGE = "hr:time-off:manage",
520
+ /** See everybody's attendance and timesheets. */
521
+ HR_ATTENDANCE_READ = "hr:attendance:read",
522
+ /** Change attendance and decide corrections. */
523
+ HR_ATTENDANCE_MANAGE = "hr:attendance:manage",
524
+ /** Read employee documents and company policies. */
525
+ HR_DOCUMENT_READ = "hr:document:read",
526
+ /** Upload, change and remove them. */
527
+ HR_DOCUMENT_MANAGE = "hr:document:manage",
528
+ /** See onboarding and offboarding checklists. */
529
+ HR_ONBOARDING_READ = "hr:onboarding:read",
530
+ /** Change the templates and start a checklist for somebody. */
531
+ HR_ONBOARDING_MANAGE = "hr:onboarding:manage",
532
+ /** Post and withdraw company announcements. */
533
+ HR_ANNOUNCEMENT_MANAGE = "hr:announcement:manage",
534
+ /** See payroll runs and payslips. */
535
+ HR_PAYROLL_READ = "hr:payroll:read",
536
+ /** Prepare a payroll run. */
537
+ HR_PAYROLL_MANAGE = "hr:payroll:manage",
538
+ /** Approve a payroll run, which freezes every payslip in it. Its own permission, so one person cannot both prepare and sign off. */
539
+ HR_PAYROLL_APPROVE = "hr:payroll:approve",
540
+ /** See job openings and applicants. */
541
+ HR_HIRING_READ = "hr:hiring:read",
542
+ /** Change job openings and move applicants through the pipeline. */
543
+ HR_HIRING_MANAGE = "hr:hiring:manage",
544
+ /** See goals and reviews across the company. A manager sees their own reports without this. */
545
+ HR_PERFORMANCE_READ = "hr:performance:read",
546
+ /** Run review cycles. */
547
+ HR_PERFORMANCE_MANAGE = "hr:performance:manage"
502
548
  }
503
549
  /**
504
550
  * Every member, for seeding the owner role and validating custom-role input.
@@ -562,6 +562,53 @@ export var UserPermission;
562
562
  UserPermission["RESTAURANT_MARKETING_MANAGE"] = "restaurant:marketing:manage";
563
563
  /** See sales reports. */
564
564
  UserPermission["RESTAURANT_REPORT_READ"] = "restaurant:report:read";
565
+ // HR
566
+ /** Read a company's HR settings, locations, departments and job titles. */
567
+ UserPermission["HR_ORG_READ"] = "hr:org:read";
568
+ /** Change them. */
569
+ UserPermission["HR_ORG_MANAGE"] = "hr:org:manage";
570
+ /** Read employee records, without pay or identity numbers. */
571
+ UserPermission["HR_EMPLOYEE_READ"] = "hr:employee:read";
572
+ /** Add and change employee records, record a job change, and end somebody's employment. */
573
+ UserPermission["HR_EMPLOYEE_MANAGE"] = "hr:employee:manage";
574
+ /** Read pay, identity numbers and bank details. Its own permission, because keeping a directory right does not need them. */
575
+ UserPermission["HR_COMPENSATION_READ"] = "hr:compensation:read";
576
+ /** Change them. */
577
+ UserPermission["HR_COMPENSATION_MANAGE"] = "hr:compensation:manage";
578
+ /** See who read or changed pay and identity numbers, which reading them does not show. */
579
+ UserPermission["HR_AUDIT_READ"] = "hr:audit:read";
580
+ /** See everybody's time off, balances and the holiday calendar. A manager sees their own reports without this. */
581
+ UserPermission["HR_TIME_OFF_READ"] = "hr:time-off:read";
582
+ /** Decide anybody's time off, adjust balances, and change leave types and holidays. */
583
+ UserPermission["HR_TIME_OFF_MANAGE"] = "hr:time-off:manage";
584
+ /** See everybody's attendance and timesheets. */
585
+ UserPermission["HR_ATTENDANCE_READ"] = "hr:attendance:read";
586
+ /** Change attendance and decide corrections. */
587
+ UserPermission["HR_ATTENDANCE_MANAGE"] = "hr:attendance:manage";
588
+ /** Read employee documents and company policies. */
589
+ UserPermission["HR_DOCUMENT_READ"] = "hr:document:read";
590
+ /** Upload, change and remove them. */
591
+ UserPermission["HR_DOCUMENT_MANAGE"] = "hr:document:manage";
592
+ /** See onboarding and offboarding checklists. */
593
+ UserPermission["HR_ONBOARDING_READ"] = "hr:onboarding:read";
594
+ /** Change the templates and start a checklist for somebody. */
595
+ UserPermission["HR_ONBOARDING_MANAGE"] = "hr:onboarding:manage";
596
+ /** Post and withdraw company announcements. */
597
+ UserPermission["HR_ANNOUNCEMENT_MANAGE"] = "hr:announcement:manage";
598
+ /** See payroll runs and payslips. */
599
+ UserPermission["HR_PAYROLL_READ"] = "hr:payroll:read";
600
+ /** Prepare a payroll run. */
601
+ UserPermission["HR_PAYROLL_MANAGE"] = "hr:payroll:manage";
602
+ /** Approve a payroll run, which freezes every payslip in it. Its own permission, so one person cannot both prepare and sign off. */
603
+ UserPermission["HR_PAYROLL_APPROVE"] = "hr:payroll:approve";
604
+ /** See job openings and applicants. */
605
+ UserPermission["HR_HIRING_READ"] = "hr:hiring:read";
606
+ /** Change job openings and move applicants through the pipeline. */
607
+ UserPermission["HR_HIRING_MANAGE"] = "hr:hiring:manage";
608
+ /** See goals and reviews across the company. A manager sees their own reports without this. */
609
+ UserPermission["HR_PERFORMANCE_READ"] = "hr:performance:read";
610
+ /** Run review cycles. */
611
+ UserPermission["HR_PERFORMANCE_MANAGE"] = "hr:performance:manage";
565
612
  })(UserPermission || (UserPermission = {}));
566
613
  /**
567
614
  * Every member, for seeding the owner role and validating custom-role input.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.53.0",
3
+ "version": "0.54.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -52,6 +52,10 @@
52
52
  "types": "./dist/api/clinic/index.d.ts",
53
53
  "default": "./dist/api/clinic/index.js"
54
54
  },
55
+ "./hr": {
56
+ "types": "./dist/api/hr/index.d.ts",
57
+ "default": "./dist/api/hr/index.js"
58
+ },
55
59
  "./restaurant": {
56
60
  "types": "./dist/api/restaurant/index.d.ts",
57
61
  "default": "./dist/api/restaurant/index.js"