@iveri/contracts 0.89.0 → 0.90.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.
@@ -1,5 +1,6 @@
1
- /** How an application arrived: through the careers page, or typed in by HR. */
1
+ /** How an application arrived: through the careers page, typed in by HR, or put forward by a colleague. */
2
2
  export declare enum HrApplicationSource {
3
3
  CAREERS = "careers",
4
- ADDED = "added"
4
+ ADDED = "added",
5
+ REFERRAL = "referral"
5
6
  }
@@ -1,6 +1,7 @@
1
- /** How an application arrived: through the careers page, or typed in by HR. */
1
+ /** How an application arrived: through the careers page, typed in by HR, or put forward by a colleague. */
2
2
  export var HrApplicationSource;
3
3
  (function (HrApplicationSource) {
4
4
  HrApplicationSource["CAREERS"] = "careers";
5
5
  HrApplicationSource["ADDED"] = "added";
6
+ HrApplicationSource["REFERRAL"] = "referral";
6
7
  })(HrApplicationSource || (HrApplicationSource = {}));
@@ -31,9 +31,17 @@ export interface HrApplication {
31
31
  stageChangedAt: IsoDateTime;
32
32
  decidedAt: Nullable<IsoDateTime>;
33
33
  hiredEmployeeId: Nullable<UUID>;
34
+ /** The colleague who put this person forward, when `source` is `referral`. */
35
+ referredBy: Nullable<HrApplicationReferrer>;
36
+ /** Why the colleague thinks they fit. Removed with the applicant's other details. */
37
+ referralNote: Nullable<string>;
34
38
  isRemoved: boolean;
35
39
  createdAt: IsoDateTime;
36
40
  }
41
+ export interface HrApplicationReferrer {
42
+ employeeId: UUID;
43
+ name: string;
44
+ }
37
45
  export interface HrCareersOpening {
38
46
  id: UUID;
39
47
  title: string;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * What somebody who put a colleague forward is told about it.
3
+ *
4
+ * Deliberately coarser than the application's stage: the person who referred them is not part of the hiring, so
5
+ * they learn that it is still going, that the person was hired, or that it has ended, and never why.
6
+ */
7
+ export declare enum HrReferralOutcome {
8
+ IN_PROGRESS = "in-progress",
9
+ HIRED = "hired",
10
+ CLOSED = "closed"
11
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * What somebody who put a colleague forward is told about it.
3
+ *
4
+ * Deliberately coarser than the application's stage: the person who referred them is not part of the hiring, so
5
+ * they learn that it is still going, that the person was hired, or that it has ended, and never why.
6
+ */
7
+ export var HrReferralOutcome;
8
+ (function (HrReferralOutcome) {
9
+ HrReferralOutcome["IN_PROGRESS"] = "in-progress";
10
+ HrReferralOutcome["HIRED"] = "hired";
11
+ HrReferralOutcome["CLOSED"] = "closed";
12
+ })(HrReferralOutcome || (HrReferralOutcome = {}));
@@ -0,0 +1,29 @@
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 { HrReferralOutcome } from './hr-referral-outcome.enum.js';
5
+ /** Somebody the signed-in person put forward, as they are allowed to see it. */
6
+ export interface HrMyReferral {
7
+ id: UUID;
8
+ openingId: UUID;
9
+ openingTitle: string;
10
+ /** Null once the company's retention window has removed the person's details. */
11
+ candidateName: Nullable<string>;
12
+ outcome: HrReferralOutcome;
13
+ referredAt: IsoDateTime;
14
+ }
15
+ /**
16
+ * Putting somebody forward for an open role. Sent as a form, so a CV can come with it.
17
+ *
18
+ * `candidateAgreed` is the referrer saying the person agreed to be put forward, which is what lets their details
19
+ * be kept; it is sent as the string `true`.
20
+ */
21
+ export interface CreateHrReferralRequest {
22
+ openingId: UUID;
23
+ firstName: string;
24
+ lastName: string;
25
+ email: string;
26
+ phone?: string;
27
+ note?: string;
28
+ candidateAgreed: string;
29
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -51,6 +51,8 @@ export * from './hr-planning-entry-kind.enum.js';
51
51
  export * from './hr-planning.type.js';
52
52
  export * from './hr-probation-outcome.enum.js';
53
53
  export * from './hr-probation.type.js';
54
+ export * from './hr-referral-outcome.enum.js';
55
+ export * from './hr-referral.type.js';
54
56
  export * from './hr-report.type.js';
55
57
  export * from './hr-resource-status.enum.js';
56
58
  export * from './hr-review-cycle-status.enum.js';
@@ -51,6 +51,8 @@ export * from './hr-planning-entry-kind.enum.js';
51
51
  export * from './hr-planning.type.js';
52
52
  export * from './hr-probation-outcome.enum.js';
53
53
  export * from './hr-probation.type.js';
54
+ export * from './hr-referral-outcome.enum.js';
55
+ export * from './hr-referral.type.js';
54
56
  export * from './hr-report.type.js';
55
57
  export * from './hr-resource-status.enum.js';
56
58
  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.89.0",
3
+ "version": "0.90.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {