@iveri/contracts 0.122.0 → 0.123.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/README.md CHANGED
@@ -293,6 +293,7 @@ Conduit's outbox.
293
293
  `localization:render` permissions.
294
294
  - Version `0.100.0` adds `notification:send-any`, the password-reset bodies and Conduit's usage metrics.
295
295
  - Version `0.101.0` adds `UsageHistory`, a company's closed months of a product by metric.
296
+ - Version `0.123.0` adds `HrRefusal`, the HR refusals a client says in the reader's language.
296
297
  - Version `0.122.0` adds `RestaurantRefusal`, the restaurant refusals a client says in the reader's language.
297
298
  - Version `0.121.0` adds Conduit's route test: `RouteTestResult`, `TestRouteBody`, `RouteCriterion` and
298
299
  `RouteCriterionMiss`. (Tagged first as `v0.119.0`, which npm refused once 0.120.0 was out; 0.119.0 does not
@@ -0,0 +1,111 @@
1
+ /**
2
+ * An HR refusal a person can act on, sent as `details.reason` so a client says it in the reader's language rather than
3
+ * showing the API's English. A number a sentence needs travels beside it in `details`, named on the member. A refusal
4
+ * nobody meets through a client, such as a malformed body, has no member and keeps its English.
5
+ */
6
+ export declare enum HrRefusal {
7
+ /** There is already time off, waiting or agreed, on some of those days. */
8
+ TIME_OFF_OVERLAP = "time-off-overlap",
9
+ /** That kind of time off is no longer offered. */
10
+ LEAVE_TYPE_RETIRED = "leave-type-retired",
11
+ /** It starts too soon; `details.minNoticeDays` says how much notice it needs. */
12
+ NOTICE_TOO_SHORT = "notice-too-short",
13
+ /** The waiting period for that kind of time off has not ended; `details.availableFrom` is the first day it may start. */
14
+ LEAVE_NOT_YET = "leave-not-yet",
15
+ /** Not enough days are left in the year for it. */
16
+ NOT_ENOUGH_DAYS = "not-enough-days",
17
+ /** Not enough days are left in that quarter for it. */
18
+ NOT_ENOUGH_DAYS_IN_QUARTER = "not-enough-days-in-quarter",
19
+ /** None of the days asked for is a working day. */
20
+ NO_WORKING_DAYS = "no-working-days",
21
+ /** The days fall before the person's first day or after their last. */
22
+ OUTSIDE_EMPLOYMENT = "outside-employment",
23
+ /** The time off has started, so only HR can change it. */
24
+ LEAVE_STARTED = "leave-started",
25
+ /** The request can no longer be cancelled. */
26
+ NOT_CANCELLABLE = "not-cancellable",
27
+ /** Somebody has already decided it: a request, a correction, a letter or a probation. */
28
+ ALREADY_DECIDED = "already-decided",
29
+ /** The person has left the company. */
30
+ PERSON_LEFT = "person-left",
31
+ /** Some of those days are already in a plan. */
32
+ PLAN_OVERLAP = "plan-overlap",
33
+ /** That day has already gone. */
34
+ DAY_PASSED = "day-passed",
35
+ /** That day is not a working day. */
36
+ NOT_A_WORKING_DAY = "not-a-working-day",
37
+ /** Time off already covers that day. */
38
+ TIME_OFF_THAT_DAY = "time-off-that-day",
39
+ /** The week already has as many home days as the company allows; `details.homeDaysPerWeek` says how many. */
40
+ HOME_DAY_LIMIT = "home-day-limit",
41
+ /** Too far ahead; `details.maxDaysAhead` says how far a day may be. */
42
+ TOO_FAR_AHEAD = "too-far-ahead",
43
+ /** The person is not clocked in. */
44
+ NOT_CLOCKED_IN = "not-clocked-in",
45
+ /** An earlier shift was never clocked out of, so that one is corrected first. */
46
+ OPEN_SHIFT = "open-shift",
47
+ /** The shift overlaps another one. */
48
+ SHIFT_OVERLAP = "shift-overlap",
49
+ /** The shift is longer than a shift may be; `details.maxHours` says how long. */
50
+ SHIFT_TOO_LONG = "shift-too-long",
51
+ /** The shift ends in the future. */
52
+ SHIFT_IN_FUTURE = "shift-in-future",
53
+ /** That shift already has a correction waiting. */
54
+ CORRECTION_PENDING = "correction-pending",
55
+ /** Somebody already stands in for the person on some of those days. */
56
+ STAND_IN_OVERLAP = "stand-in-overlap",
57
+ /** The person decides nobody's requests, so there is nothing to hand over. */
58
+ NOTHING_TO_HAND_OVER = "nothing-to-hand-over",
59
+ /** Longer than a stand-in may last; `details.maxDays` says how long. */
60
+ STAND_IN_TOO_LONG = "stand-in-too-long",
61
+ /** A claim is sent with its receipt. */
62
+ RECEIPT_REQUIRED = "receipt-required",
63
+ /** Somebody else decides a person's own claim. */
64
+ OWN_CLAIM = "own-claim",
65
+ /** A pay run has taken the claim; it is removed from the run first. */
66
+ CLAIM_IN_PAY_RUN = "claim-in-pay-run",
67
+ /** That expense category can no longer be claimed for. */
68
+ CATEGORY_RETIRED = "category-retired",
69
+ /** Only a draft can be thrown away. */
70
+ NOT_A_DRAFT = "not-a-draft",
71
+ /** It has already been handed in: a review or a survey's answers. */
72
+ ALREADY_ANSWERED = "already-answered",
73
+ /** It is not open for answers: a review round or a survey. */
74
+ NOT_OPEN = "not-open",
75
+ /** A review is handed in with an overall rating. */
76
+ RATING_REQUIRED = "rating-required",
77
+ /** Every question is answered before it is handed in. */
78
+ ANSWERS_REQUIRED = "answers-required",
79
+ /** The course ends in a certificate, which is attached. */
80
+ CERTIFICATE_REQUIRED = "certificate-required",
81
+ /** The person already works on as many goals as they may; `details.maxGoals` says how many. */
82
+ GOAL_LIMIT = "goal-limit",
83
+ /** The goal is finished; it is reopened before it changes. */
84
+ GOAL_FINISHED = "goal-finished",
85
+ /** The meeting has already happened. */
86
+ MEETING_HAPPENED = "meeting-happened",
87
+ /** The policy changed since it was opened, so it is read again. */
88
+ POLICY_CHANGED = "policy-changed",
89
+ /** Nobody puts themselves forward; they apply through the careers page. */
90
+ SELF_REFERRAL = "self-referral",
91
+ /** The role is not taking applications. */
92
+ OPENING_CLOSED = "opening-closed",
93
+ /** The company's licence covers no more people; `details.seats` says how many it covers. */
94
+ LICENCE_SEATS = "licence-seats",
95
+ /** Something of that kind already has that name: a department, a location, a team or a job title. */
96
+ NAME_TAKEN = "name-taken",
97
+ /** Something of that kind already has that code: a kind of time off or an expense category. */
98
+ CODE_TAKEN = "code-taken",
99
+ /** Somebody here already has that work email. */
100
+ WORK_EMAIL_TAKEN = "work-email-taken",
101
+ /** The person already has a sign-in. */
102
+ HAS_SIGN_IN = "has-sign-in",
103
+ /** People still report to this person; who they move to is said first. */
104
+ REPORTS_REMAIN = "reports-remain",
105
+ /** Somebody has the item, so it is taken back first. */
106
+ EQUIPMENT_HELD = "equipment-held",
107
+ /** There is already a pay run for that month. */
108
+ PAY_RUN_EXISTS = "pay-run-exists",
109
+ /** The pay run has been approved, so it no longer changes. */
110
+ PAY_RUN_APPROVED = "pay-run-approved"
111
+ }
@@ -0,0 +1,119 @@
1
+ /**
2
+ * An HR refusal a person can act on, sent as `details.reason` so a client says it in the reader's language rather than
3
+ * showing the API's English. A number a sentence needs travels beside it in `details`, named on the member. A refusal
4
+ * nobody meets through a client, such as a malformed body, has no member and keeps its English.
5
+ */
6
+ export var HrRefusal;
7
+ (function (HrRefusal) {
8
+ // Time off and plans
9
+ /** There is already time off, waiting or agreed, on some of those days. */
10
+ HrRefusal["TIME_OFF_OVERLAP"] = "time-off-overlap";
11
+ /** That kind of time off is no longer offered. */
12
+ HrRefusal["LEAVE_TYPE_RETIRED"] = "leave-type-retired";
13
+ /** It starts too soon; `details.minNoticeDays` says how much notice it needs. */
14
+ HrRefusal["NOTICE_TOO_SHORT"] = "notice-too-short";
15
+ /** The waiting period for that kind of time off has not ended; `details.availableFrom` is the first day it may start. */
16
+ HrRefusal["LEAVE_NOT_YET"] = "leave-not-yet";
17
+ /** Not enough days are left in the year for it. */
18
+ HrRefusal["NOT_ENOUGH_DAYS"] = "not-enough-days";
19
+ /** Not enough days are left in that quarter for it. */
20
+ HrRefusal["NOT_ENOUGH_DAYS_IN_QUARTER"] = "not-enough-days-in-quarter";
21
+ /** None of the days asked for is a working day. */
22
+ HrRefusal["NO_WORKING_DAYS"] = "no-working-days";
23
+ /** The days fall before the person's first day or after their last. */
24
+ HrRefusal["OUTSIDE_EMPLOYMENT"] = "outside-employment";
25
+ /** The time off has started, so only HR can change it. */
26
+ HrRefusal["LEAVE_STARTED"] = "leave-started";
27
+ /** The request can no longer be cancelled. */
28
+ HrRefusal["NOT_CANCELLABLE"] = "not-cancellable";
29
+ /** Somebody has already decided it: a request, a correction, a letter or a probation. */
30
+ HrRefusal["ALREADY_DECIDED"] = "already-decided";
31
+ /** The person has left the company. */
32
+ HrRefusal["PERSON_LEFT"] = "person-left";
33
+ /** Some of those days are already in a plan. */
34
+ HrRefusal["PLAN_OVERLAP"] = "plan-overlap";
35
+ /** That day has already gone. */
36
+ HrRefusal["DAY_PASSED"] = "day-passed";
37
+ // Office and home days
38
+ /** That day is not a working day. */
39
+ HrRefusal["NOT_A_WORKING_DAY"] = "not-a-working-day";
40
+ /** Time off already covers that day. */
41
+ HrRefusal["TIME_OFF_THAT_DAY"] = "time-off-that-day";
42
+ /** The week already has as many home days as the company allows; `details.homeDaysPerWeek` says how many. */
43
+ HrRefusal["HOME_DAY_LIMIT"] = "home-day-limit";
44
+ /** Too far ahead; `details.maxDaysAhead` says how far a day may be. */
45
+ HrRefusal["TOO_FAR_AHEAD"] = "too-far-ahead";
46
+ // Hours
47
+ /** The person is not clocked in. */
48
+ HrRefusal["NOT_CLOCKED_IN"] = "not-clocked-in";
49
+ /** An earlier shift was never clocked out of, so that one is corrected first. */
50
+ HrRefusal["OPEN_SHIFT"] = "open-shift";
51
+ /** The shift overlaps another one. */
52
+ HrRefusal["SHIFT_OVERLAP"] = "shift-overlap";
53
+ /** The shift is longer than a shift may be; `details.maxHours` says how long. */
54
+ HrRefusal["SHIFT_TOO_LONG"] = "shift-too-long";
55
+ /** The shift ends in the future. */
56
+ HrRefusal["SHIFT_IN_FUTURE"] = "shift-in-future";
57
+ /** That shift already has a correction waiting. */
58
+ HrRefusal["CORRECTION_PENDING"] = "correction-pending";
59
+ // Stand-ins
60
+ /** Somebody already stands in for the person on some of those days. */
61
+ HrRefusal["STAND_IN_OVERLAP"] = "stand-in-overlap";
62
+ /** The person decides nobody's requests, so there is nothing to hand over. */
63
+ HrRefusal["NOTHING_TO_HAND_OVER"] = "nothing-to-hand-over";
64
+ /** Longer than a stand-in may last; `details.maxDays` says how long. */
65
+ HrRefusal["STAND_IN_TOO_LONG"] = "stand-in-too-long";
66
+ // Expenses
67
+ /** A claim is sent with its receipt. */
68
+ HrRefusal["RECEIPT_REQUIRED"] = "receipt-required";
69
+ /** Somebody else decides a person's own claim. */
70
+ HrRefusal["OWN_CLAIM"] = "own-claim";
71
+ /** A pay run has taken the claim; it is removed from the run first. */
72
+ HrRefusal["CLAIM_IN_PAY_RUN"] = "claim-in-pay-run";
73
+ /** That expense category can no longer be claimed for. */
74
+ HrRefusal["CATEGORY_RETIRED"] = "category-retired";
75
+ /** Only a draft can be thrown away. */
76
+ HrRefusal["NOT_A_DRAFT"] = "not-a-draft";
77
+ // Growth, surveys, policies and referrals
78
+ /** It has already been handed in: a review or a survey's answers. */
79
+ HrRefusal["ALREADY_ANSWERED"] = "already-answered";
80
+ /** It is not open for answers: a review round or a survey. */
81
+ HrRefusal["NOT_OPEN"] = "not-open";
82
+ /** A review is handed in with an overall rating. */
83
+ HrRefusal["RATING_REQUIRED"] = "rating-required";
84
+ /** Every question is answered before it is handed in. */
85
+ HrRefusal["ANSWERS_REQUIRED"] = "answers-required";
86
+ /** The course ends in a certificate, which is attached. */
87
+ HrRefusal["CERTIFICATE_REQUIRED"] = "certificate-required";
88
+ /** The person already works on as many goals as they may; `details.maxGoals` says how many. */
89
+ HrRefusal["GOAL_LIMIT"] = "goal-limit";
90
+ /** The goal is finished; it is reopened before it changes. */
91
+ HrRefusal["GOAL_FINISHED"] = "goal-finished";
92
+ /** The meeting has already happened. */
93
+ HrRefusal["MEETING_HAPPENED"] = "meeting-happened";
94
+ /** The policy changed since it was opened, so it is read again. */
95
+ HrRefusal["POLICY_CHANGED"] = "policy-changed";
96
+ /** Nobody puts themselves forward; they apply through the careers page. */
97
+ HrRefusal["SELF_REFERRAL"] = "self-referral";
98
+ /** The role is not taking applications. */
99
+ HrRefusal["OPENING_CLOSED"] = "opening-closed";
100
+ // The company's own records
101
+ /** The company's licence covers no more people; `details.seats` says how many it covers. */
102
+ HrRefusal["LICENCE_SEATS"] = "licence-seats";
103
+ /** Something of that kind already has that name: a department, a location, a team or a job title. */
104
+ HrRefusal["NAME_TAKEN"] = "name-taken";
105
+ /** Something of that kind already has that code: a kind of time off or an expense category. */
106
+ HrRefusal["CODE_TAKEN"] = "code-taken";
107
+ /** Somebody here already has that work email. */
108
+ HrRefusal["WORK_EMAIL_TAKEN"] = "work-email-taken";
109
+ /** The person already has a sign-in. */
110
+ HrRefusal["HAS_SIGN_IN"] = "has-sign-in";
111
+ /** People still report to this person; who they move to is said first. */
112
+ HrRefusal["REPORTS_REMAIN"] = "reports-remain";
113
+ /** Somebody has the item, so it is taken back first. */
114
+ HrRefusal["EQUIPMENT_HELD"] = "equipment-held";
115
+ /** There is already a pay run for that month. */
116
+ HrRefusal["PAY_RUN_EXISTS"] = "pay-run-exists";
117
+ /** The pay run has been approved, so it no longer changes. */
118
+ HrRefusal["PAY_RUN_APPROVED"] = "pay-run-approved";
119
+ })(HrRefusal || (HrRefusal = {}));
@@ -53,6 +53,7 @@ export * from './hr-probation-outcome.enum.js';
53
53
  export * from './hr-probation.type.js';
54
54
  export * from './hr-referral-outcome.enum.js';
55
55
  export * from './hr-referral.type.js';
56
+ export * from './hr-refusal.enum.js';
56
57
  export * from './hr-report.type.js';
57
58
  export * from './hr-resource-status.enum.js';
58
59
  export * from './hr-review-cycle-status.enum.js';
@@ -53,6 +53,7 @@ export * from './hr-probation-outcome.enum.js';
53
53
  export * from './hr-probation.type.js';
54
54
  export * from './hr-referral-outcome.enum.js';
55
55
  export * from './hr-referral.type.js';
56
+ export * from './hr-refusal.enum.js';
56
57
  export * from './hr-report.type.js';
57
58
  export * from './hr-resource-status.enum.js';
58
59
  export * from './hr-review-cycle-status.enum.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.122.0",
3
+ "version": "0.123.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {