@xuulu/xuulu-types 1.0.28 → 1.0.29

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,9 @@
1
+ export type DepartmentCreateRequest = {
2
+ name: string;
3
+ description: string;
4
+ };
5
+
6
+ export type DepartmentEditRequest = {
7
+ name: string;
8
+ description: string;
9
+ };
@@ -0,0 +1,5 @@
1
+ export type DepartmentResponse = {
2
+ id: number;
3
+ name: string;
4
+ description: string;
5
+ };
@@ -0,0 +1,9 @@
1
+ export type FrameworkCreateRequest = {
2
+ name: string;
3
+ description: string;
4
+ };
5
+
6
+ export type FrameworkEditRequest = {
7
+ name: string;
8
+ description: string;
9
+ };
@@ -0,0 +1,13 @@
1
+ export type InterviewCallUpdateRequest =
2
+ | {
3
+ type: 'rating';
4
+ interviewId: number;
5
+ questionId: number;
6
+ answerRating: number;
7
+ }
8
+ | {
9
+ type: 'comment';
10
+ interviewId: number;
11
+ questionId: number;
12
+ answerComment: string;
13
+ };
@@ -1,4 +1,8 @@
1
- export type MeetingDetails = {
1
+ import { InterviewTypeResponse } from "../../interviewTypes/responses";
2
+ import { PositionResponse } from "../../positions/responses";
3
+ import { QuestionResponse } from "../../questions/responses";
4
+
5
+ type MeetingDetails = {
2
6
  participants: {
3
7
  [key: string]:
4
8
  | {
@@ -12,4 +16,19 @@ export type MeetingDetails = {
12
16
  displayName: string;
13
17
  };
14
18
  };
15
- };
19
+ };
20
+
21
+ export type InterviewCallResponse = {
22
+ id: number;
23
+ meetingId: string;
24
+ similarity: number;
25
+ interviewDate: string;
26
+ position: Pick<
27
+ PositionResponse,
28
+ "positionName" | "description" | "qualification" | "niceToHave" | "comment" | 'seniorityLevel'
29
+ >;
30
+ interviewType: InterviewTypeResponse;
31
+ question: (QuestionResponse & { answerRating: number; })[];
32
+ customQuestion: string;
33
+ meetingDetails: MeetingDetails;
34
+ };
@@ -0,0 +1,3 @@
1
+ export type InterviewFeedbackEditRequest = {
2
+ feedback: string;
3
+ };
@@ -0,0 +1,4 @@
1
+ export type InterviewFeedbackResponse = {
2
+ id: number;
3
+ feedback: string;
4
+ };
@@ -13,6 +13,7 @@ export type InterviewSetupResponse = {
13
13
  sections: SectionResponse[];
14
14
  frameworks: FrameworkResponse[];
15
15
  };
16
+ similarityScore: number;
16
17
  requiredQuestions: QuestionResponse[];
17
18
  selectedQuestions: InterviewsQuestionsResponse[];
18
19
  selectedQuestionsCustom: InterviewsQuestionsCustomResponse | {};
@@ -0,0 +1,52 @@
1
+ import { CandidateResponse } from "../../candidates/responses";
2
+ import { InterviewStatusResponse } from "../../interviewStatuses/responses";
3
+ import { InterviewTypeResponse } from "../../interviewTypes/responses";
4
+ import { PositionResponse } from "../../positions/responses";
5
+ import { UsersResponse } from "../../users/responses";
6
+
7
+ /* **************** *
8
+ * Interview Create *
9
+ * **************** */
10
+ type InterviewCreate = {
11
+ position: Pick<PositionResponse, "id" | "positionName">;
12
+ candidate: Pick<
13
+ CandidateResponse,
14
+ "id" | "firstname" | "lastname" | "similarity" | "email"
15
+ >;
16
+ interviewDate: string;
17
+ };
18
+
19
+ type SubInterview = {
20
+ id: number;
21
+ status: InterviewStatusResponse;
22
+ interviewDate: string;
23
+ interviewType: InterviewTypeResponse;
24
+ interviewers: Pick<
25
+ UsersResponse,
26
+ "id" | "firstname" | "lastname" | "username" | "email"
27
+ >[];
28
+ };
29
+
30
+ export type InterviewCreateRequest = InterviewCreate & {
31
+ subInterviews: SubInterview[];
32
+ };
33
+
34
+ /* **************** *
35
+ * Interview update *
36
+ * **************** */
37
+ type InterviewEdit = {
38
+ position: Pick<PositionResponse, 'id' | 'positionName'>;
39
+ candidate: Pick<CandidateResponse, 'id' | 'firstname' | 'lastname' | 'similarity' | 'email'>;
40
+ interviewDate: string;
41
+ status: InterviewStatusResponse;
42
+ };
43
+
44
+ export type InterviewEditRequest = InterviewEdit & {
45
+ subInterviews: {
46
+ id: number;
47
+ interviewDate: string;
48
+ interviewType: InterviewTypeResponse;
49
+ status: InterviewStatusResponse;
50
+ interviewers: Pick<UsersResponse, 'id' | 'firstname' | 'lastname' | 'username' | 'email'>[];
51
+ }[];
52
+ };
@@ -1,27 +1,45 @@
1
1
  import { PositionResponse } from "../../positions/responses";
2
2
  import { CandidateResponse } from "../../candidates/responses";
3
3
  import { InterviewTypeResponse } from "../../interviewTypes/responses";
4
- import { MeetingDetails } from "../../interviewCall/responses";
4
+ import { InterviewCallResponse } from "../../interviewCall/responses";
5
5
  import { InterviewStatusResponse } from "../../interviewStatuses/responses";
6
6
  import { QuestionResponse } from "../../questions/responses";
7
7
  import { UsersResponse } from "../../users/responses";
8
8
 
9
-
10
- type Interview = {
9
+ // ********
10
+ // Get Many
11
+ // ********
12
+ export type InterviewList = {
11
13
  id: number;
12
14
  interviewDate: string;
13
15
  meetingId: string;
14
- candidate: Omit<CandidateResponse, 'comments' | 'cvText' | 'cvFileName'>;
15
- position: Pick<PositionResponse, 'id' | 'positionName'>;
16
+ feedback: string;
16
17
  interviewType: InterviewTypeResponse;
17
18
  status: InterviewStatusResponse;
18
- responsible: Pick<UsersResponse, 'id' | 'email' | 'firstname' | 'lastname' | 'username'>;
19
- questions: Omit<QuestionResponse, 'interviews'>[];
20
- interviewers: Omit<UsersResponse, 'settings'>[];
21
- feedback: string;
22
- meetingDetails: MeetingDetails;
19
+ candidate: Pick<CandidateResponse, 'firstname' | 'lastname'>;
20
+ position: Pick<PositionResponse, 'id' | 'positionName'>;
21
+ responsible: Pick<UsersResponse, 'firstname' | 'lastname' | 'username'>;
22
+ meetingDetails: InterviewCallResponse['meetingDetails'];
23
+ questions: Pick<QuestionResponse, 'id'>[];
24
+ }
25
+
26
+ export type InterviewListResponse = InterviewList & {
27
+ subInterviews: InterviewList[];
23
28
  };
24
29
 
25
- export type InterviewResponse = Interview & {
26
- subInterviews: Interview[];
30
+ // ********
31
+ // Get One
32
+ // ********
33
+ export type InterviewGetOne = {
34
+ id: number;
35
+ interviewDate: string;
36
+ status: InterviewStatusResponse;
37
+ interviewType: InterviewTypeResponse;
38
+ interviewers: Pick<UsersResponse, 'email' | 'firstname' | 'lastname' | 'id' | 'roleId' | 'username'>[];
39
+ position: Pick<PositionResponse, 'id' | 'positionName'>;
40
+ candidate: Pick<CandidateResponse, 'id' | 'firstname' | 'lastname' | 'email' | 'similarity'>;
27
41
  };
42
+
43
+ export type InterviewGetOneResponse = InterviewGetOne & {
44
+ subInterviews: InterviewGetOne[];
45
+ };
@@ -0,0 +1,13 @@
1
+ export type OfficeCreateRequest = {
2
+ city: string;
3
+ name: string;
4
+ state: string;
5
+ description: string;
6
+ };
7
+
8
+ export type OfficeEditRequest = {
9
+ city: string;
10
+ name: string;
11
+ state: string;
12
+ description: string;
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuulu/xuulu-types",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {},
@@ -0,0 +1,21 @@
1
+ import { FrameworkResponse } from "../../frameworks/responses";
2
+ import { SectionResponse } from "../../sections/responses";
3
+ import { SeniorityLevelResponse } from "../../seniorityLevels/responses";
4
+
5
+ export interface QuestionCreateRequest {
6
+ question: string;
7
+ answer: string;
8
+ seniorityLevel: Pick<SeniorityLevelResponse, "id" | "name">;
9
+ framework: Pick<FrameworkResponse, "id" | "name">;
10
+ section: Pick<SectionResponse, "id" | "name">;
11
+ comment: string;
12
+ }
13
+
14
+ export type QuestionEditRequest = {
15
+ question: string;
16
+ answer: string;
17
+ seniorityLevel: Pick<SeniorityLevelResponse, "id" | "name">;
18
+ framework: Pick<FrameworkResponse, "id" | "name">;
19
+ section: Pick<SectionResponse, "id" | "name">;
20
+ comment: string;
21
+ };
@@ -1,4 +1,6 @@
1
+ import { FrameworkResponse } from "../../frameworks/responses";
1
2
  import { SectionResponse } from "../../sections/responses";
3
+ import { SeniorityLevelResponse } from "../../seniorityLevels/responses";
2
4
 
3
5
  export type QuestionResponse = {
4
6
  id: number;
@@ -6,6 +8,6 @@ export type QuestionResponse = {
6
8
  answer: string;
7
9
  comment: string;
8
10
  section: Pick<SectionResponse, "id" | "name">;
9
- seniorityLevel: Pick<SectionResponse, "id" | "name">;
10
- framework: Pick<SectionResponse, "id" | "name">;
11
+ seniorityLevel: Pick<SeniorityLevelResponse, "id" | "name">;
12
+ framework: Pick<FrameworkResponse, "id" | "name">;
11
13
  };
@@ -0,0 +1,20 @@
1
+ export enum ERole {
2
+ ADMIN = 1,
3
+ HR = 2,
4
+ HR_SUPER = 3,
5
+ TECH = 4,
6
+ }
7
+
8
+ export const ROLE_NAME: Record<ERole, string> = {
9
+ [ERole.ADMIN]: 'ADMIN',
10
+ [ERole.HR]: 'HR',
11
+ [ERole.HR_SUPER]: 'HR_SUPER',
12
+ [ERole.TECH]: 'TECH',
13
+ };
14
+
15
+ export enum RolesTypes {
16
+ 'ADMIN' = 'ADMIN',
17
+ 'HR_SUPER' = 'HR_SUPER',
18
+ 'HR' = 'HR',
19
+ 'TECH' = 'TECH',
20
+ }
@@ -0,0 +1,5 @@
1
+ export type RoleResponse = {
2
+ id: number;
3
+ name: string;
4
+ permissions: string[];
5
+ };
@@ -0,0 +1,9 @@
1
+ export type SectionsCreateRequest = {
2
+ name: string;
3
+ description: string;
4
+ };
5
+
6
+ export type SectionsEditRequest = {
7
+ name: string;
8
+ description: string;
9
+ };
@@ -0,0 +1,8 @@
1
+ export type UserCreateRequest = {
2
+ firstname: string;
3
+ lastname: string;
4
+ username: string;
5
+ email: string;
6
+ roleId: number;
7
+ dateOfBirth: Date;
8
+ };