@recruitnepal/shared-packages 1.4.0 → 1.5.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.
@@ -26,7 +26,7 @@ export declare const easyApplyUserSchema: z.ZodObject<{
26
26
  email: z.ZodString;
27
27
  phone_no: z.ZodString;
28
28
  current_address: z.ZodString;
29
- current_status: z.ZodString;
29
+ current_status: z.ZodEnum<["open to work", "open to switch", "part time", "freelance", "not looking"]>;
30
30
  two_wheeler: z.ZodDefault<z.ZodBoolean>;
31
31
  driving_license: z.ZodDefault<z.ZodBoolean>;
32
32
  salary_expectation: z.ZodEffects<z.ZodObject<{
@@ -62,7 +62,7 @@ export declare const easyApplyUserSchema: z.ZodObject<{
62
62
  email: string;
63
63
  phone_no: string;
64
64
  current_address: string;
65
- current_status: string;
65
+ current_status: "open to work" | "open to switch" | "part time" | "freelance" | "not looking";
66
66
  two_wheeler: boolean;
67
67
  driving_license: boolean;
68
68
  salary_expectation: {
@@ -80,7 +80,7 @@ export declare const easyApplyUserSchema: z.ZodObject<{
80
80
  email: string;
81
81
  phone_no: string;
82
82
  current_address: string;
83
- current_status: string;
83
+ current_status: "open to work" | "open to switch" | "part time" | "freelance" | "not looking";
84
84
  salary_expectation: {
85
85
  min: number;
86
86
  max: number;
@@ -111,7 +111,7 @@ export declare const useEasyApplyFormHook: ({ vacancyId, isIntern, token, onSucc
111
111
  email: string;
112
112
  phone_no: string;
113
113
  current_address: string;
114
- current_status: string;
114
+ current_status: "open to work" | "open to switch" | "part time" | "freelance" | "not looking";
115
115
  two_wheeler: boolean;
116
116
  driving_license: boolean;
117
117
  salary_expectation: {
@@ -129,7 +129,7 @@ export declare const useEasyApplyFormHook: ({ vacancyId, isIntern, token, onSucc
129
129
  email: string;
130
130
  phone_no: string;
131
131
  current_address: string;
132
- current_status: string;
132
+ current_status: "open to work" | "open to switch" | "part time" | "freelance" | "not looking";
133
133
  two_wheeler: boolean;
134
134
  driving_license: boolean;
135
135
  salary_expectation: {
@@ -1 +1 @@
1
- {"version":3,"file":"useEasyApplyFormHook.d.ts","sourceRoot":"","sources":["../../src/hooks/useEasyApplyFormHook.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;WAAiC,CAAC;AAErE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsB9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC7E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AA+B/E,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,0HAA0H;IAC1H,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACtD,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,qDAMlC,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAqDV,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoErC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"useEasyApplyFormHook.d.ts","sourceRoot":"","sources":["../../src/hooks/useEasyApplyFormHook.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;WAAiC,CAAC;AAErE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwB9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC7E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AA+B/E,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,0HAA0H;IAC1H,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACtD,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,qDAMlC,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAqDV,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoErC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -4,6 +4,7 @@ import { useForm } from 'react-hook-form';
4
4
  import { zodResolver } from '@hookform/resolvers/zod';
5
5
  import { z } from 'zod';
6
6
  import { useEasyApplyMutations } from './useEasyApplyMutations';
7
+ import { WORK_STATUS_VALUES } from '../types/easy-apply';
7
8
  // Schemas
8
9
  const salaryExpectationSchema = z
9
10
  .object({
@@ -36,7 +37,9 @@ export const easyApplyUserSchema = z.object({
36
37
  current_address: z
37
38
  .string()
38
39
  .min(1, { message: 'Current address is required' }),
39
- current_status: z.string().min(1, { message: 'Current status is required' }),
40
+ current_status: z.enum(WORK_STATUS_VALUES, {
41
+ errorMap: () => ({ message: 'Please select a valid current status' }),
42
+ }),
40
43
  two_wheeler: z.boolean().default(false),
41
44
  driving_license: z.boolean().default(false),
42
45
  salary_expectation: salaryExpectationSchema,
@@ -82,7 +85,7 @@ export const useEasyApplyFormHook = ({ vacancyId, isIntern = false, token, onSuc
82
85
  email: '',
83
86
  phone_no: '',
84
87
  current_address: '',
85
- current_status: '',
88
+ current_status: 'open to work',
86
89
  two_wheeler: false,
87
90
  driving_license: false,
88
91
  salary_expectation: { min: 10000, max: 20000 },
package/dist/index.d.ts CHANGED
@@ -3,7 +3,8 @@ export type { SingleVacancyRes, VacancyApiRes, Pagination, ExperienceLevel, } fr
3
3
  export type { ApplicantItem, ApplicantApiResponse, ApplicantPayload, } from './types/applicant';
4
4
  export type { SavedVacancyItem, SavedVacancyApiResponse, SavedVacancyPayload, } from './types/saved-vacancy';
5
5
  export type { Question, AnswerOption, VacancyQuestionsResponse, } from './types/questions';
6
- export type { QuestionsAPIRes, ScreeningAnswersApiResNew, } from './types/easy-apply';
6
+ export { WORKSTATUS, WORK_STATUS_VALUES, } from './types/easy-apply';
7
+ export type { WorkStatusValue, QuestionsAPIRes, ScreeningAnswersApiResNew, } from './types/easy-apply';
7
8
  export { apiRequest } from './utils/api-request';
8
9
  export type { ApiResponse } from './utils/api-request';
9
10
  export { useGetAllVacancy } from './hooks/useGetAllVacancy';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGx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E,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,YAAY,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,YAAY,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // API Client
2
2
  export { initApi, getBaseURL, API } from './api-client';
3
+ export { WORKSTATUS, WORK_STATUS_VALUES, } from './types/easy-apply';
3
4
  // Utils
4
5
  export { apiRequest } from './utils/api-request';
5
6
  // Hooks
@@ -1,3 +1,11 @@
1
+ /** Allowed values for current status (work status) in easy apply */
2
+ export declare const WORK_STATUS_VALUES: readonly ["open to work", "open to switch", "part time", "freelance", "not looking"];
3
+ export type WorkStatusValue = (typeof WORK_STATUS_VALUES)[number];
4
+ export declare const WORKSTATUS: Array<{
5
+ label: string;
6
+ value: WorkStatusValue;
7
+ description: string;
8
+ }>;
1
9
  /** API response for application questions (used by easy apply) */
2
10
  export interface QuestionsAPIRes {
3
11
  data: Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"easy-apply.d.ts","sourceRoot":"","sources":["../../src/types/easy-apply.ts"],"names":[],"mapp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B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,eAAe,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,CA2BA,CAAC;AAEF,kEAAkE;AAClE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,KAAK,CAAC;QACV,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,mBAAmB,CAAC,EAAE,KAAK,CAAC;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAA;SAAE,CAAC,CAAC;QACtF,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAA;SAAE,CAAC,CAAC;KAC3E,CAAC,CAAC;IACH,UAAU,CAAC,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC;CACH;AAED,mDAAmD;AACnD,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,KAAK,CAAC;QACV,EAAE,EAAE,MAAM,CAAC;QACX,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;QACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC,CAAC;CACJ"}
@@ -1 +1,35 @@
1
- export {};
1
+ /** Allowed values for current status (work status) in easy apply */
2
+ export const WORK_STATUS_VALUES = [
3
+ 'open to work',
4
+ 'open to switch',
5
+ 'part time',
6
+ 'freelance',
7
+ 'not looking',
8
+ ];
9
+ export const WORKSTATUS = [
10
+ {
11
+ label: 'Open to work',
12
+ value: 'open to work',
13
+ description: 'Looking for new opportunities and available to join immediately.',
14
+ },
15
+ {
16
+ label: 'Open to Switch',
17
+ value: 'open to switch',
18
+ description: 'Currently employed but open to better roles and growth opportunities',
19
+ },
20
+ {
21
+ label: 'Part Time',
22
+ value: 'part time',
23
+ description: 'Seeking part-time roles or project-based work with flexible hours.',
24
+ },
25
+ {
26
+ label: 'Freelance',
27
+ value: 'freelance',
28
+ description: 'Available for freelance, remote, or project-based assignments.',
29
+ },
30
+ {
31
+ label: 'Not Looking',
32
+ value: 'not looking',
33
+ description: 'Currently engaged in a role and not seeking new opportunities.',
34
+ },
35
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recruitnepal/shared-packages",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Shared UI components and hooks for Recruit Nepal projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",