@thejob/schema 1.0.35 → 1.0.37
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/cjs/interfaces.index.d.ts +290 -0
- package/dist/cjs/interfaces.index.d.ts.map +1 -1
- package/dist/cjs/resume/resume.schema.d.ts +279 -258
- package/dist/cjs/resume/resume.schema.d.ts.map +1 -1
- package/dist/cjs/resume/resume.schema.js +57 -48
- package/dist/esm/interfaces.index.d.ts +290 -0
- package/dist/esm/interfaces.index.d.ts.map +1 -1
- package/dist/esm/resume/resume.schema.d.ts +279 -258
- package/dist/esm/resume/resume.schema.d.ts.map +1 -1
- package/dist/esm/resume/resume.schema.js +57 -48
- package/package.json +1 -1
|
@@ -90,54 +90,63 @@ const ResumeLanguageSectionSchema = (0, yup_extended_1.reach)(user_1.UserSchema,
|
|
|
90
90
|
* ResumeSchemaV2 is a lazy schema that dynamically loads the appropriate schema based on the section type.
|
|
91
91
|
*/
|
|
92
92
|
}
|
|
93
|
-
exports.ResumeSchemaV2 = (0, yup_extended_1.
|
|
94
|
-
.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
93
|
+
exports.ResumeSchemaV2 = (0, yup_extended_1.object)()
|
|
94
|
+
.shape({
|
|
95
|
+
userId: (0, yup_extended_1.string)().objectId().required().label("User ID"),
|
|
96
|
+
slug: (0, yup_extended_1.string)().required().label("Slug"),
|
|
97
|
+
sections: (0, yup_extended_1.array)()
|
|
98
|
+
.of((0, yup_extended_1.lazy)((section) => {
|
|
99
|
+
const { id } = section;
|
|
100
|
+
return (0, yup_extended_1.object)({
|
|
101
|
+
id: (0, yup_extended_1.string)()
|
|
102
|
+
.oneOf(resume_constant_1.SupportedResumeSectionTypes)
|
|
103
|
+
.required()
|
|
104
|
+
.label("Section"),
|
|
105
|
+
data: (0, yup_extended_1.lazy)(() => {
|
|
106
|
+
switch (id) {
|
|
107
|
+
case resume_constant_1.ResumeSectionType.GeneralInfo:
|
|
108
|
+
// GeneralInfo schema is a single object schema, use it directly with null default
|
|
109
|
+
return ResumeGeneralInfoSectionSchema.nullable().default(null);
|
|
110
|
+
case resume_constant_1.ResumeSectionType.WorkExperience:
|
|
111
|
+
// WorkExperience schema is already an array schema, use it directly with empty array default
|
|
112
|
+
return ResumeWorkExperienceSectionSchema.default([]);
|
|
113
|
+
case resume_constant_1.ResumeSectionType.Education:
|
|
114
|
+
// Education schema is already an array schema, use it directly with empty array default
|
|
115
|
+
return ResumeEducationSectionSchema.default([]);
|
|
116
|
+
case resume_constant_1.ResumeSectionType.Skill:
|
|
117
|
+
// Skill schema is already an array schema, use it directly with empty array default
|
|
118
|
+
return ResumeSkillSectionSchema.default([]);
|
|
119
|
+
case resume_constant_1.ResumeSectionType.Project:
|
|
120
|
+
// Project schema is already an array schema, use it directly with empty array default
|
|
121
|
+
return ResumeProjectSectionSchema.default([]);
|
|
122
|
+
case resume_constant_1.ResumeSectionType.Certification:
|
|
123
|
+
// Certification schema is already an array schema, use it directly with empty array default
|
|
124
|
+
return ResumeCertificationSectionSchema.default([]);
|
|
125
|
+
case resume_constant_1.ResumeSectionType.Interest:
|
|
126
|
+
// Interest schema is already an array schema, use it directly with empty array default
|
|
127
|
+
return ResumeInterestSectionSchema.default([]);
|
|
128
|
+
case resume_constant_1.ResumeSectionType.Language:
|
|
129
|
+
// Language schema is already an array schema, use it directly with empty array default
|
|
130
|
+
return ResumeLanguageSectionSchema.default([]);
|
|
131
|
+
// case ResumeSectionType.AdditionalInfo:
|
|
132
|
+
// // AdditionalInfo schema is already an array schema, use it directly with empty array default
|
|
133
|
+
// return ResumeAdditionalInfoSectionSchema.default([]);
|
|
134
|
+
// case ResumeSectionType.Reference:
|
|
135
|
+
// return array().of(ResumeReferenceSectionSchema).required().label("Data");
|
|
136
|
+
default:
|
|
137
|
+
throw new yup_extended_1.ValidationError(`Invalid Section Type: ${id}`);
|
|
138
|
+
}
|
|
139
|
+
}),
|
|
140
|
+
});
|
|
141
|
+
}))
|
|
142
|
+
.required()
|
|
143
|
+
.default([])
|
|
144
|
+
.label("Resume sections"),
|
|
145
|
+
})
|
|
146
|
+
.concat(common_1.DbDefaultSchema)
|
|
147
|
+
.noUnknown()
|
|
148
|
+
.strict()
|
|
149
|
+
.label("Resume V2 Schema");
|
|
141
150
|
// export type TResumeSectionMap = {
|
|
142
151
|
// [ResumeSectionType.GeneralInfo]: TResumeGeneralInfoSectionSchema;
|
|
143
152
|
// [ResumeSectionType.WorkExperience]: TResumeWorkExperienceSectionSchema;
|
|
@@ -1556,6 +1556,296 @@ export interface IResumeInterestSectionSchema {
|
|
|
1556
1556
|
export interface IResumeLanguageSectionSchema {
|
|
1557
1557
|
}
|
|
1558
1558
|
export interface IResumeSchemaV2 {
|
|
1559
|
+
updatedBy?: string | undefined;
|
|
1560
|
+
updatedAt?: number | undefined;
|
|
1561
|
+
slug: string;
|
|
1562
|
+
id: string;
|
|
1563
|
+
shortId: string;
|
|
1564
|
+
createdBy: string;
|
|
1565
|
+
createdAt: number;
|
|
1566
|
+
userId: string;
|
|
1567
|
+
sections: {
|
|
1568
|
+
id: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/resume/resume.constant").ResumeSectionType | undefined>;
|
|
1569
|
+
data: {
|
|
1570
|
+
description?: string | undefined;
|
|
1571
|
+
company: NonNullable<{
|
|
1572
|
+
value: "others" | (string | undefined)[];
|
|
1573
|
+
otherValue: string | string[];
|
|
1574
|
+
} | Pick<{
|
|
1575
|
+
headline?: string | undefined;
|
|
1576
|
+
employeeCount?: string | undefined;
|
|
1577
|
+
yearFounded?: string | undefined;
|
|
1578
|
+
locations?: {
|
|
1579
|
+
coverImage?: string | undefined;
|
|
1580
|
+
name: string;
|
|
1581
|
+
isHeadquarters: boolean;
|
|
1582
|
+
contact: {
|
|
1583
|
+
email?: string | undefined;
|
|
1584
|
+
phone?: string | undefined;
|
|
1585
|
+
address: string;
|
|
1586
|
+
};
|
|
1587
|
+
}[] | undefined;
|
|
1588
|
+
contacts?: {
|
|
1589
|
+
label?: string | undefined;
|
|
1590
|
+
type: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/page/page.constant").ContactTypes | undefined>;
|
|
1591
|
+
value: string;
|
|
1592
|
+
isPrimary: boolean;
|
|
1593
|
+
isVerified: boolean;
|
|
1594
|
+
}[] | undefined;
|
|
1595
|
+
verified?: Date | undefined;
|
|
1596
|
+
socialAccounts?: {
|
|
1597
|
+
type: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/common/constants").SocialAccount | undefined>;
|
|
1598
|
+
isNew: boolean;
|
|
1599
|
+
url: string;
|
|
1600
|
+
}[] | undefined;
|
|
1601
|
+
isOwner?: boolean | undefined;
|
|
1602
|
+
equalOpportunityEmployer?: boolean | undefined;
|
|
1603
|
+
perksAndBenefits?: {
|
|
1604
|
+
category?: {
|
|
1605
|
+
logo?: string | undefined;
|
|
1606
|
+
id: string;
|
|
1607
|
+
name: string;
|
|
1608
|
+
} | {
|
|
1609
|
+
value: "others" | (string | undefined)[];
|
|
1610
|
+
otherValue: string | string[];
|
|
1611
|
+
} | undefined;
|
|
1612
|
+
name: string;
|
|
1613
|
+
description: string;
|
|
1614
|
+
}[] | undefined;
|
|
1615
|
+
updatedBy?: string | undefined;
|
|
1616
|
+
updatedAt?: number | undefined;
|
|
1617
|
+
slug: string;
|
|
1618
|
+
id: string;
|
|
1619
|
+
shortId: string;
|
|
1620
|
+
name: string;
|
|
1621
|
+
about: string;
|
|
1622
|
+
website: string;
|
|
1623
|
+
type: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/page/page.constant").PageType | undefined>;
|
|
1624
|
+
logo: {
|
|
1625
|
+
dark?: string | undefined;
|
|
1626
|
+
light: string;
|
|
1627
|
+
} | null;
|
|
1628
|
+
categories: {
|
|
1629
|
+
logo?: string | undefined;
|
|
1630
|
+
id: string;
|
|
1631
|
+
name: string;
|
|
1632
|
+
}[];
|
|
1633
|
+
status: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/page/page.constant").PageStatus | undefined>;
|
|
1634
|
+
createdBy: string;
|
|
1635
|
+
createdAt: number;
|
|
1636
|
+
}, "slug" | "name" | "type" | "logo"> | undefined>;
|
|
1637
|
+
designation: NonNullable<{
|
|
1638
|
+
logo?: string | undefined;
|
|
1639
|
+
id: string;
|
|
1640
|
+
name: string;
|
|
1641
|
+
} | {
|
|
1642
|
+
value: "others" | (string | undefined)[];
|
|
1643
|
+
otherValue: string | string[];
|
|
1644
|
+
} | undefined>;
|
|
1645
|
+
isRemote: boolean;
|
|
1646
|
+
duration: {
|
|
1647
|
+
startDate: string;
|
|
1648
|
+
endDate: string;
|
|
1649
|
+
isActive: boolean;
|
|
1650
|
+
};
|
|
1651
|
+
location: {
|
|
1652
|
+
state?: string | undefined;
|
|
1653
|
+
stateCode?: string | undefined;
|
|
1654
|
+
address: string;
|
|
1655
|
+
country: string;
|
|
1656
|
+
countryCode: string;
|
|
1657
|
+
city: string;
|
|
1658
|
+
latLong: {
|
|
1659
|
+
country?: (number | undefined)[] | undefined;
|
|
1660
|
+
state?: number[] | undefined;
|
|
1661
|
+
city?: number[] | undefined;
|
|
1662
|
+
};
|
|
1663
|
+
};
|
|
1664
|
+
}[] | {
|
|
1665
|
+
description?: string | undefined;
|
|
1666
|
+
duration: {
|
|
1667
|
+
startDate: string;
|
|
1668
|
+
endDate: string;
|
|
1669
|
+
isActive: boolean;
|
|
1670
|
+
};
|
|
1671
|
+
location: {
|
|
1672
|
+
state?: string | undefined;
|
|
1673
|
+
stateCode?: string | undefined;
|
|
1674
|
+
address: string;
|
|
1675
|
+
country: string;
|
|
1676
|
+
countryCode: string;
|
|
1677
|
+
city: string;
|
|
1678
|
+
latLong: {
|
|
1679
|
+
country?: (number | undefined)[] | undefined;
|
|
1680
|
+
state?: number[] | undefined;
|
|
1681
|
+
city?: number[] | undefined;
|
|
1682
|
+
};
|
|
1683
|
+
};
|
|
1684
|
+
institute: NonNullable<{
|
|
1685
|
+
value: "others" | (string | undefined)[];
|
|
1686
|
+
otherValue: string | string[];
|
|
1687
|
+
} | Pick<{
|
|
1688
|
+
headline?: string | undefined;
|
|
1689
|
+
employeeCount?: string | undefined;
|
|
1690
|
+
yearFounded?: string | undefined;
|
|
1691
|
+
locations?: {
|
|
1692
|
+
coverImage?: string | undefined;
|
|
1693
|
+
name: string;
|
|
1694
|
+
isHeadquarters: boolean;
|
|
1695
|
+
contact: {
|
|
1696
|
+
email?: string | undefined;
|
|
1697
|
+
phone?: string | undefined;
|
|
1698
|
+
address: string;
|
|
1699
|
+
};
|
|
1700
|
+
}[] | undefined;
|
|
1701
|
+
contacts?: {
|
|
1702
|
+
label?: string | undefined;
|
|
1703
|
+
type: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/page/page.constant").ContactTypes | undefined>;
|
|
1704
|
+
value: string;
|
|
1705
|
+
isPrimary: boolean;
|
|
1706
|
+
isVerified: boolean;
|
|
1707
|
+
}[] | undefined;
|
|
1708
|
+
verified?: Date | undefined;
|
|
1709
|
+
socialAccounts?: {
|
|
1710
|
+
type: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/common/constants").SocialAccount | undefined>;
|
|
1711
|
+
isNew: boolean;
|
|
1712
|
+
url: string;
|
|
1713
|
+
}[] | undefined;
|
|
1714
|
+
isOwner?: boolean | undefined;
|
|
1715
|
+
equalOpportunityEmployer?: boolean | undefined;
|
|
1716
|
+
perksAndBenefits?: {
|
|
1717
|
+
category?: {
|
|
1718
|
+
logo?: string | undefined;
|
|
1719
|
+
id: string;
|
|
1720
|
+
name: string;
|
|
1721
|
+
} | {
|
|
1722
|
+
value: "others" | (string | undefined)[];
|
|
1723
|
+
otherValue: string | string[];
|
|
1724
|
+
} | undefined;
|
|
1725
|
+
name: string;
|
|
1726
|
+
description: string;
|
|
1727
|
+
}[] | undefined;
|
|
1728
|
+
updatedBy?: string | undefined;
|
|
1729
|
+
updatedAt?: number | undefined;
|
|
1730
|
+
slug: string;
|
|
1731
|
+
id: string;
|
|
1732
|
+
shortId: string;
|
|
1733
|
+
name: string;
|
|
1734
|
+
about: string;
|
|
1735
|
+
website: string;
|
|
1736
|
+
type: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/page/page.constant").PageType | undefined>;
|
|
1737
|
+
logo: {
|
|
1738
|
+
dark?: string | undefined;
|
|
1739
|
+
light: string;
|
|
1740
|
+
} | null;
|
|
1741
|
+
categories: {
|
|
1742
|
+
logo?: string | undefined;
|
|
1743
|
+
id: string;
|
|
1744
|
+
name: string;
|
|
1745
|
+
}[];
|
|
1746
|
+
status: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/page/page.constant").PageStatus | undefined>;
|
|
1747
|
+
createdBy: string;
|
|
1748
|
+
createdAt: number;
|
|
1749
|
+
}, "slug" | "name" | "type" | "logo"> | undefined>;
|
|
1750
|
+
course: NonNullable<{
|
|
1751
|
+
logo?: string | undefined;
|
|
1752
|
+
id: string;
|
|
1753
|
+
name: string;
|
|
1754
|
+
} | {
|
|
1755
|
+
value: "others" | (string | undefined)[];
|
|
1756
|
+
otherValue: string | string[];
|
|
1757
|
+
} | undefined>;
|
|
1758
|
+
fieldOfStudy: NonNullable<NonNullable<{
|
|
1759
|
+
logo?: string | undefined;
|
|
1760
|
+
id: string;
|
|
1761
|
+
name: string;
|
|
1762
|
+
} | {
|
|
1763
|
+
value: "others" | (string | undefined)[];
|
|
1764
|
+
otherValue: string | string[];
|
|
1765
|
+
} | undefined>>;
|
|
1766
|
+
isDistanceLearning: boolean;
|
|
1767
|
+
studyType: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/common/constants").StudyType | undefined>;
|
|
1768
|
+
}[] | {
|
|
1769
|
+
skill: NonNullable<{
|
|
1770
|
+
logo?: string | undefined;
|
|
1771
|
+
id: string;
|
|
1772
|
+
name: string;
|
|
1773
|
+
} | {
|
|
1774
|
+
value: "others" | (string | undefined)[];
|
|
1775
|
+
otherValue: string | string[];
|
|
1776
|
+
} | undefined>;
|
|
1777
|
+
proficiencyLevel: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/common/constants").ProficiencyLevel | undefined>;
|
|
1778
|
+
lastUsed: string;
|
|
1779
|
+
}[] | {
|
|
1780
|
+
url?: string | undefined;
|
|
1781
|
+
name: string;
|
|
1782
|
+
description: string;
|
|
1783
|
+
duration: {
|
|
1784
|
+
startDate: string;
|
|
1785
|
+
endDate: string;
|
|
1786
|
+
isActive: boolean;
|
|
1787
|
+
};
|
|
1788
|
+
}[] | {
|
|
1789
|
+
url?: string | undefined;
|
|
1790
|
+
licenseNumber?: string | undefined;
|
|
1791
|
+
name: string;
|
|
1792
|
+
duration: {
|
|
1793
|
+
startDate: string;
|
|
1794
|
+
endDate: string;
|
|
1795
|
+
isActive: boolean;
|
|
1796
|
+
};
|
|
1797
|
+
authority: string;
|
|
1798
|
+
}[] | {
|
|
1799
|
+
logo?: string | undefined;
|
|
1800
|
+
id: string;
|
|
1801
|
+
name: string;
|
|
1802
|
+
}[] | {
|
|
1803
|
+
isNew: boolean;
|
|
1804
|
+
proficiencyLevel: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/common/constants").ProficiencyLevel | undefined>;
|
|
1805
|
+
language: NonNullable<{
|
|
1806
|
+
logo?: string | undefined;
|
|
1807
|
+
id: string;
|
|
1808
|
+
name: string;
|
|
1809
|
+
} | {
|
|
1810
|
+
value: "others" | (string | undefined)[];
|
|
1811
|
+
otherValue: string | string[];
|
|
1812
|
+
} | undefined>;
|
|
1813
|
+
}[] | {
|
|
1814
|
+
headline?: string | undefined;
|
|
1815
|
+
id?: string | undefined;
|
|
1816
|
+
emailVerified?: string | null | undefined;
|
|
1817
|
+
image?: string | undefined;
|
|
1818
|
+
aboutMe?: string | undefined;
|
|
1819
|
+
name: {
|
|
1820
|
+
last?: string | undefined;
|
|
1821
|
+
first: string;
|
|
1822
|
+
};
|
|
1823
|
+
email: string;
|
|
1824
|
+
experienceLevel: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/common/constants").ExperienceLevel | undefined>;
|
|
1825
|
+
mobile: {
|
|
1826
|
+
number: string;
|
|
1827
|
+
country: {
|
|
1828
|
+
locale?: string | undefined;
|
|
1829
|
+
name: string;
|
|
1830
|
+
dial_code: string;
|
|
1831
|
+
code: string;
|
|
1832
|
+
};
|
|
1833
|
+
};
|
|
1834
|
+
location: {
|
|
1835
|
+
state?: string | undefined;
|
|
1836
|
+
stateCode?: string | undefined;
|
|
1837
|
+
address: string;
|
|
1838
|
+
country: string;
|
|
1839
|
+
countryCode: string;
|
|
1840
|
+
city: string;
|
|
1841
|
+
latLong: {
|
|
1842
|
+
country?: (number | undefined)[] | undefined;
|
|
1843
|
+
state?: number[] | undefined;
|
|
1844
|
+
city?: number[] | undefined;
|
|
1845
|
+
};
|
|
1846
|
+
};
|
|
1847
|
+
} | null;
|
|
1848
|
+
}[];
|
|
1559
1849
|
}
|
|
1560
1850
|
export interface IResumeSchema {
|
|
1561
1851
|
isOwner?: boolean | undefined;
|