@jobloo/shared 1.0.3 → 1.0.5
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/dist/types/user.d.ts +6 -0
- package/dist/utils/htmlCleaner.d.ts +15 -0
- package/dist/utils/htmlCleaner.js +17 -0
- package/package.json +1 -1
package/dist/types/user.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export interface User {
|
|
|
8
8
|
firstName?: string;
|
|
9
9
|
lastName?: string;
|
|
10
10
|
phone: string;
|
|
11
|
+
phoneCountryCode?: string;
|
|
11
12
|
gender?: 'male' | 'female' | 'other' | 'prefer-not-to-say';
|
|
12
13
|
race?: 'asian' | 'black-african-american' | 'white-caucasian' | 'hispanic' | 'native-american-pacific-islander' | 'other' | 'prefer-not-to-say';
|
|
13
14
|
isProtectedVeteran?: 'yes' | 'no' | 'prefer-not-to-say';
|
|
@@ -28,6 +29,9 @@ export interface User {
|
|
|
28
29
|
resumeUri?: string;
|
|
29
30
|
resumeFileName?: string;
|
|
30
31
|
cvFileName?: string;
|
|
32
|
+
cvFileUrl?: string;
|
|
33
|
+
cvExtracted?: boolean;
|
|
34
|
+
cvData?: any;
|
|
31
35
|
googleDriveResumeLink?: string;
|
|
32
36
|
jobPreferences: {
|
|
33
37
|
titles: string[];
|
|
@@ -39,6 +43,7 @@ export interface User {
|
|
|
39
43
|
minSalary?: number;
|
|
40
44
|
maxSalary?: number;
|
|
41
45
|
salaryCurrency?: string;
|
|
46
|
+
generateCoverLetter?: boolean;
|
|
42
47
|
};
|
|
43
48
|
authorizedCountries: Array<{
|
|
44
49
|
country: string;
|
|
@@ -53,6 +58,7 @@ export interface User {
|
|
|
53
58
|
referredBy?: string;
|
|
54
59
|
referralAdvanceUsed?: boolean;
|
|
55
60
|
subscription_tier?: 'FREE' | 'STANDARD' | 'PRO' | 'LEGACY';
|
|
61
|
+
emailVerified?: boolean;
|
|
56
62
|
}
|
|
57
63
|
/**
|
|
58
64
|
* Minimal user data for initial creation
|
|
@@ -20,3 +20,18 @@ export declare function getBestDescription(job: {
|
|
|
20
20
|
description?: string | null;
|
|
21
21
|
descriptionBody?: string | null;
|
|
22
22
|
}): string;
|
|
23
|
+
/**
|
|
24
|
+
* Get raw HTML description for rich rendering
|
|
25
|
+
* Only decodes HTML entities but preserves structure tags
|
|
26
|
+
*/
|
|
27
|
+
export declare function getRawDescription(job: {
|
|
28
|
+
source?: string;
|
|
29
|
+
title?: string;
|
|
30
|
+
company?: string;
|
|
31
|
+
openingPlain?: string | null;
|
|
32
|
+
descriptionPlain?: string | null;
|
|
33
|
+
descriptionBodyPlain?: string | null;
|
|
34
|
+
opening?: string | null;
|
|
35
|
+
description?: string | null;
|
|
36
|
+
descriptionBody?: string | null;
|
|
37
|
+
}): string;
|
|
@@ -135,3 +135,20 @@ export function getBestDescription(job) {
|
|
|
135
135
|
}
|
|
136
136
|
return '';
|
|
137
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* Get raw HTML description for rich rendering
|
|
140
|
+
* Only decodes HTML entities but preserves structure tags
|
|
141
|
+
*/
|
|
142
|
+
export function getRawDescription(job) {
|
|
143
|
+
// For LEVER: Combine opening + description_body
|
|
144
|
+
if (job.source === 'lever') {
|
|
145
|
+
const opening = job.opening || '';
|
|
146
|
+
const body = job.descriptionBody || '';
|
|
147
|
+
if (opening && body) {
|
|
148
|
+
return opening + '<br/><br/>' + body;
|
|
149
|
+
}
|
|
150
|
+
return body || opening || '';
|
|
151
|
+
}
|
|
152
|
+
// For other sources: Use description field
|
|
153
|
+
return job.description || job.descriptionBody || job.opening || '';
|
|
154
|
+
}
|