udp-schema 2.26.0 → 2.30.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.
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +11 -1
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/onboarding-config.d.ts.map +1 -1
- package/dist/onboarding-config.js +106 -0
- package/dist/onboarding-config.js.map +1 -1
- package/dist/onboarding-form.d.ts +378 -0
- package/dist/onboarding-form.d.ts.map +1 -1
- package/dist/profile-fields/07-employment.d.ts.map +1 -1
- package/dist/profile-fields/07-employment.js +175 -35
- package/dist/profile-fields/07-employment.js.map +1 -1
- package/dist/profile-fields/12-household.d.ts +15 -2
- package/dist/profile-fields/12-household.d.ts.map +1 -1
- package/dist/profile-fields/12-household.js +166 -17
- package/dist/profile-fields/12-household.js.map +1 -1
- package/dist/profile-fields/types.d.ts +12 -3
- package/dist/profile-fields/types.d.ts.map +1 -1
- package/dist/profile-fields/types.js.map +1 -1
- package/dist/progress-fields.d.ts.map +1 -1
- package/dist/progress-fields.js +17 -0
- package/dist/progress-fields.js.map +1 -1
- package/dist/shared-enums.d.ts +78 -0
- package/dist/shared-enums.d.ts.map +1 -0
- package/dist/shared-enums.js +184 -0
- package/dist/shared-enums.js.map +1 -0
- package/dist/step-01.schema.d.ts.map +1 -1
- package/dist/step-01.schema.js +8 -79
- package/dist/step-01.schema.js.map +1 -1
- package/dist/step-06.schema.d.ts.map +1 -1
- package/dist/step-06.schema.js +4 -13
- package/dist/step-06.schema.js.map +1 -1
- package/dist/step-07.schema.d.ts.map +1 -1
- package/dist/step-07.schema.js +8 -114
- package/dist/step-07.schema.js.map +1 -1
- package/dist/step-12.schema.d.ts +434 -3
- package/dist/step-12.schema.d.ts.map +1 -1
- package/dist/step-12.schema.js +72 -3
- package/dist/step-12.schema.js.map +1 -1
- package/package.json +1 -1
- package/dist/field-meta.d.ts +0 -20
- package/dist/field-meta.d.ts.map +0 -1
- package/dist/field-meta.js +0 -19
- package/dist/field-meta.js.map +0 -1
- package/dist/step-13.schema.d.ts +0 -186
- package/dist/step-13.schema.d.ts.map +0 -1
- package/dist/step-13.schema.js +0 -215
- package/dist/step-13.schema.js.map +0 -1
- package/dist/step-14.schema.d.ts +0 -88
- package/dist/step-14.schema.d.ts.map +0 -1
- package/dist/step-14.schema.js +0 -135
- package/dist/step-14.schema.js.map +0 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Enum Catalogues
|
|
3
|
+
* =======================
|
|
4
|
+
* Canonical `as const` value arrays for enums that span more than one
|
|
5
|
+
* service profile (UDP, dating, future jobs / marketplace / homestay).
|
|
6
|
+
* udp-schema is the source of truth; dating-schema imports from here so
|
|
7
|
+
* both packages produce IDENTICAL Zod enum types for the same concept.
|
|
8
|
+
*
|
|
9
|
+
* Why centralise in udp-schema (not a separate `community-enums`
|
|
10
|
+
* package)?
|
|
11
|
+
* - UDP is the canonical identity surface — gender / religion /
|
|
12
|
+
* occupation are identity facts before they are matchmaking facets.
|
|
13
|
+
* - One npm dep edge (dating-schema → udp-schema) is cheaper than a
|
|
14
|
+
* third coordination package today. When a 3rd consumer (jobs,
|
|
15
|
+
* marketplace, homestay) needs these, extract to a standalone
|
|
16
|
+
* `community-enums` package — the shape is the same, just lifted.
|
|
17
|
+
*
|
|
18
|
+
* Scope of this file:
|
|
19
|
+
* - ONLY the enums where a shared concept exists across services.
|
|
20
|
+
* - Service-specific enums (dating's `loveLanguage`, UDP's
|
|
21
|
+
* `reservationStatus`) stay in their owning package.
|
|
22
|
+
*
|
|
23
|
+
* @module udp-schema/shared-enums
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Self-identified gender. 17 values covering the full identity spectrum
|
|
27
|
+
* including trans and South Asian-specific identities (hijra).
|
|
28
|
+
*
|
|
29
|
+
* Use everywhere gender is recorded: UDP step-01, dating-profile,
|
|
30
|
+
* future service profiles. NEVER write `male` / `female` — the older
|
|
31
|
+
* binary vocabulary is intentionally retired in favour of `man` /
|
|
32
|
+
* `woman` (per current inclusive-identity conventions).
|
|
33
|
+
*/
|
|
34
|
+
export declare const GENDER_VALUES: readonly ["man", "woman", "non_binary", "trans_man", "trans_woman", "genderfluid", "genderqueer", "agender", "bigender", "pangender", "androgynous", "intersex", "gender_nonconforming", "two_spirit", "hijra", "other", "prefer_not_to_say"];
|
|
35
|
+
export type Gender = (typeof GENDER_VALUES)[number];
|
|
36
|
+
/**
|
|
37
|
+
* Family or personal religion, denominated to the sect / branch level.
|
|
38
|
+
* 22 values covering the major Indian religious communities plus
|
|
39
|
+
* non-religious / prefer-not-to-say options.
|
|
40
|
+
*
|
|
41
|
+
* The denomination granularity (e.g., `muslim_sunni` vs `muslim_shia`,
|
|
42
|
+
* `jain_digambar` vs `jain_shwetambar`) matters for both:
|
|
43
|
+
* - Population stats: denomination-level rollups for the superadmin
|
|
44
|
+
* dashboard.
|
|
45
|
+
* - Matchmaking: marriage rules within communities are often
|
|
46
|
+
* denomination-specific.
|
|
47
|
+
*/
|
|
48
|
+
export declare const RELIGION_VALUES: readonly ["hindu", "muslim_sunni", "muslim_shia", "muslim_sufi", "muslim_other", "christian_catholic", "christian_protestant", "christian_other", "sikh", "jain_digambar", "jain_shwetambar", "buddhist", "parsi_zoroastrian", "jewish", "bahai", "spiritual", "atheist", "agnostic", "no_religion", "inter_religion", "other", "prefer_not_to_say"];
|
|
49
|
+
export type Religion = (typeof RELIGION_VALUES)[number];
|
|
50
|
+
/**
|
|
51
|
+
* Industry / occupation taxonomy. 39 values covering the main Indian
|
|
52
|
+
* economic sectors plus non-working statuses (student / homemaker /
|
|
53
|
+
* retired / not_working / differently_abled_pension).
|
|
54
|
+
*
|
|
55
|
+
* Used by UDP step-07 (`occupation` + `dreamOccupation`) and
|
|
56
|
+
* dating-profile (`profession`). The two were already aligned in
|
|
57
|
+
* practice — this declaration formalises the canonical list so they
|
|
58
|
+
* can't drift.
|
|
59
|
+
*
|
|
60
|
+
* `prefer_not_to_say` is intentionally placed at the end so UI
|
|
61
|
+
* dropdowns surface it as the final option.
|
|
62
|
+
*/
|
|
63
|
+
export declare const OCCUPATION_VALUES: readonly ["it_software", "engineering", "healthcare_doctor", "healthcare_nursing", "healthcare_pharma", "psychology_therapy", "education_teaching", "science_research", "finance_banking", "chartered_accountant", "business_management", "arts_entertainment", "media_communication", "design_creative", "civil_services", "government_public", "defence_military", "police_law_enforcement", "legal", "skilled_trades", "transport_logistics", "hospitality_travel", "beauty_wellness", "agriculture_farming", "real_estate", "retail_ecommerce", "manufacturing", "merchant_navy", "ngo_social_work", "religious_spiritual", "freelancer_gig", "content_creator", "self_employed", "student", "homemaker", "retired", "not_working", "differently_abled_pension", "other", "prefer_not_to_say"];
|
|
64
|
+
export type Occupation = (typeof OCCUPATION_VALUES)[number];
|
|
65
|
+
/**
|
|
66
|
+
* Highest education attained, on the Indian system. 8 values matching
|
|
67
|
+
* the buckets the dashboard's education-distribution widget rolls up
|
|
68
|
+
* into. The granular education timeline (board, year, degree,
|
|
69
|
+
* currently-studying-or-not) lives in UDP step-06's `education10th`
|
|
70
|
+
* / `education12th` / `graduations[]` / etc.; `highestQualification`
|
|
71
|
+
* is the single-bucket summary.
|
|
72
|
+
*
|
|
73
|
+
* Use for the matchmaking education filter, the dashboard rollup,
|
|
74
|
+
* and any future jobs / counseling profile.
|
|
75
|
+
*/
|
|
76
|
+
export declare const HIGHEST_QUALIFICATION_VALUES: readonly ["CLASS_10", "CLASS_12", "DIPLOMA", "GRADUATION", "POST_GRAD", "PHD", "POST_DOCTORATE", "OTHER"];
|
|
77
|
+
export type HighestQualification = (typeof HIGHEST_QUALIFICATION_VALUES)[number];
|
|
78
|
+
//# sourceMappingURL=shared-enums.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-enums.d.ts","sourceRoot":"","sources":["../src/shared-enums.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,+OAkBhB,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAIpD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,sVAuBlB,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAIxD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,owBAwDpB,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAI5D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,2GAS/B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Enum Catalogues
|
|
3
|
+
* =======================
|
|
4
|
+
* Canonical `as const` value arrays for enums that span more than one
|
|
5
|
+
* service profile (UDP, dating, future jobs / marketplace / homestay).
|
|
6
|
+
* udp-schema is the source of truth; dating-schema imports from here so
|
|
7
|
+
* both packages produce IDENTICAL Zod enum types for the same concept.
|
|
8
|
+
*
|
|
9
|
+
* Why centralise in udp-schema (not a separate `community-enums`
|
|
10
|
+
* package)?
|
|
11
|
+
* - UDP is the canonical identity surface — gender / religion /
|
|
12
|
+
* occupation are identity facts before they are matchmaking facets.
|
|
13
|
+
* - One npm dep edge (dating-schema → udp-schema) is cheaper than a
|
|
14
|
+
* third coordination package today. When a 3rd consumer (jobs,
|
|
15
|
+
* marketplace, homestay) needs these, extract to a standalone
|
|
16
|
+
* `community-enums` package — the shape is the same, just lifted.
|
|
17
|
+
*
|
|
18
|
+
* Scope of this file:
|
|
19
|
+
* - ONLY the enums where a shared concept exists across services.
|
|
20
|
+
* - Service-specific enums (dating's `loveLanguage`, UDP's
|
|
21
|
+
* `reservationStatus`) stay in their owning package.
|
|
22
|
+
*
|
|
23
|
+
* @module udp-schema/shared-enums
|
|
24
|
+
*/
|
|
25
|
+
// ─── Gender ──────────────────────────────────────────────────────────────────
|
|
26
|
+
/**
|
|
27
|
+
* Self-identified gender. 17 values covering the full identity spectrum
|
|
28
|
+
* including trans and South Asian-specific identities (hijra).
|
|
29
|
+
*
|
|
30
|
+
* Use everywhere gender is recorded: UDP step-01, dating-profile,
|
|
31
|
+
* future service profiles. NEVER write `male` / `female` — the older
|
|
32
|
+
* binary vocabulary is intentionally retired in favour of `man` /
|
|
33
|
+
* `woman` (per current inclusive-identity conventions).
|
|
34
|
+
*/
|
|
35
|
+
export const GENDER_VALUES = [
|
|
36
|
+
'man',
|
|
37
|
+
'woman',
|
|
38
|
+
'non_binary',
|
|
39
|
+
'trans_man',
|
|
40
|
+
'trans_woman',
|
|
41
|
+
'genderfluid',
|
|
42
|
+
'genderqueer',
|
|
43
|
+
'agender',
|
|
44
|
+
'bigender',
|
|
45
|
+
'pangender',
|
|
46
|
+
'androgynous',
|
|
47
|
+
'intersex',
|
|
48
|
+
'gender_nonconforming',
|
|
49
|
+
'two_spirit',
|
|
50
|
+
'hijra',
|
|
51
|
+
'other',
|
|
52
|
+
'prefer_not_to_say',
|
|
53
|
+
];
|
|
54
|
+
// ─── Religion ────────────────────────────────────────────────────────────────
|
|
55
|
+
/**
|
|
56
|
+
* Family or personal religion, denominated to the sect / branch level.
|
|
57
|
+
* 22 values covering the major Indian religious communities plus
|
|
58
|
+
* non-religious / prefer-not-to-say options.
|
|
59
|
+
*
|
|
60
|
+
* The denomination granularity (e.g., `muslim_sunni` vs `muslim_shia`,
|
|
61
|
+
* `jain_digambar` vs `jain_shwetambar`) matters for both:
|
|
62
|
+
* - Population stats: denomination-level rollups for the superadmin
|
|
63
|
+
* dashboard.
|
|
64
|
+
* - Matchmaking: marriage rules within communities are often
|
|
65
|
+
* denomination-specific.
|
|
66
|
+
*/
|
|
67
|
+
export const RELIGION_VALUES = [
|
|
68
|
+
'hindu',
|
|
69
|
+
'muslim_sunni',
|
|
70
|
+
'muslim_shia',
|
|
71
|
+
'muslim_sufi',
|
|
72
|
+
'muslim_other',
|
|
73
|
+
'christian_catholic',
|
|
74
|
+
'christian_protestant',
|
|
75
|
+
'christian_other',
|
|
76
|
+
'sikh',
|
|
77
|
+
'jain_digambar',
|
|
78
|
+
'jain_shwetambar',
|
|
79
|
+
'buddhist',
|
|
80
|
+
'parsi_zoroastrian',
|
|
81
|
+
'jewish',
|
|
82
|
+
'bahai',
|
|
83
|
+
'spiritual',
|
|
84
|
+
'atheist',
|
|
85
|
+
'agnostic',
|
|
86
|
+
'no_religion',
|
|
87
|
+
'inter_religion',
|
|
88
|
+
'other',
|
|
89
|
+
'prefer_not_to_say',
|
|
90
|
+
];
|
|
91
|
+
// ─── Occupation ──────────────────────────────────────────────────────────────
|
|
92
|
+
/**
|
|
93
|
+
* Industry / occupation taxonomy. 39 values covering the main Indian
|
|
94
|
+
* economic sectors plus non-working statuses (student / homemaker /
|
|
95
|
+
* retired / not_working / differently_abled_pension).
|
|
96
|
+
*
|
|
97
|
+
* Used by UDP step-07 (`occupation` + `dreamOccupation`) and
|
|
98
|
+
* dating-profile (`profession`). The two were already aligned in
|
|
99
|
+
* practice — this declaration formalises the canonical list so they
|
|
100
|
+
* can't drift.
|
|
101
|
+
*
|
|
102
|
+
* `prefer_not_to_say` is intentionally placed at the end so UI
|
|
103
|
+
* dropdowns surface it as the final option.
|
|
104
|
+
*/
|
|
105
|
+
export const OCCUPATION_VALUES = [
|
|
106
|
+
// Technology
|
|
107
|
+
'it_software',
|
|
108
|
+
'engineering',
|
|
109
|
+
// Healthcare & Medicine
|
|
110
|
+
'healthcare_doctor',
|
|
111
|
+
'healthcare_nursing',
|
|
112
|
+
'healthcare_pharma',
|
|
113
|
+
'psychology_therapy',
|
|
114
|
+
// Education & Research
|
|
115
|
+
'education_teaching',
|
|
116
|
+
'science_research',
|
|
117
|
+
// Finance & Business
|
|
118
|
+
'finance_banking',
|
|
119
|
+
'chartered_accountant',
|
|
120
|
+
'business_management',
|
|
121
|
+
// Creative & Media
|
|
122
|
+
'arts_entertainment',
|
|
123
|
+
'media_communication',
|
|
124
|
+
'design_creative',
|
|
125
|
+
// Government & Public Service
|
|
126
|
+
'civil_services',
|
|
127
|
+
'government_public',
|
|
128
|
+
'defence_military',
|
|
129
|
+
'police_law_enforcement',
|
|
130
|
+
// Legal
|
|
131
|
+
'legal',
|
|
132
|
+
// Trades & Services
|
|
133
|
+
'skilled_trades',
|
|
134
|
+
'transport_logistics',
|
|
135
|
+
'hospitality_travel',
|
|
136
|
+
'beauty_wellness',
|
|
137
|
+
// Agriculture & Rural
|
|
138
|
+
'agriculture_farming',
|
|
139
|
+
// Real Estate & Construction
|
|
140
|
+
'real_estate',
|
|
141
|
+
// Retail & Commerce
|
|
142
|
+
'retail_ecommerce',
|
|
143
|
+
'manufacturing',
|
|
144
|
+
// Maritime
|
|
145
|
+
'merchant_navy',
|
|
146
|
+
// Social & NGO
|
|
147
|
+
'ngo_social_work',
|
|
148
|
+
'religious_spiritual',
|
|
149
|
+
// Independent
|
|
150
|
+
'freelancer_gig',
|
|
151
|
+
'content_creator',
|
|
152
|
+
'self_employed',
|
|
153
|
+
// Non-working
|
|
154
|
+
'student',
|
|
155
|
+
'homemaker',
|
|
156
|
+
'retired',
|
|
157
|
+
'not_working',
|
|
158
|
+
'differently_abled_pension',
|
|
159
|
+
'other',
|
|
160
|
+
'prefer_not_to_say',
|
|
161
|
+
];
|
|
162
|
+
// ─── Highest Qualification ───────────────────────────────────────────────────
|
|
163
|
+
/**
|
|
164
|
+
* Highest education attained, on the Indian system. 8 values matching
|
|
165
|
+
* the buckets the dashboard's education-distribution widget rolls up
|
|
166
|
+
* into. The granular education timeline (board, year, degree,
|
|
167
|
+
* currently-studying-or-not) lives in UDP step-06's `education10th`
|
|
168
|
+
* / `education12th` / `graduations[]` / etc.; `highestQualification`
|
|
169
|
+
* is the single-bucket summary.
|
|
170
|
+
*
|
|
171
|
+
* Use for the matchmaking education filter, the dashboard rollup,
|
|
172
|
+
* and any future jobs / counseling profile.
|
|
173
|
+
*/
|
|
174
|
+
export const HIGHEST_QUALIFICATION_VALUES = [
|
|
175
|
+
'CLASS_10',
|
|
176
|
+
'CLASS_12',
|
|
177
|
+
'DIPLOMA',
|
|
178
|
+
'GRADUATION',
|
|
179
|
+
'POST_GRAD',
|
|
180
|
+
'PHD',
|
|
181
|
+
'POST_DOCTORATE',
|
|
182
|
+
'OTHER',
|
|
183
|
+
];
|
|
184
|
+
//# sourceMappingURL=shared-enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-enums.js","sourceRoot":"","sources":["../src/shared-enums.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,gFAAgF;AAEhF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,KAAK;IACL,OAAO;IACP,YAAY;IACZ,WAAW;IACX,aAAa;IACb,aAAa;IACb,aAAa;IACb,SAAS;IACT,UAAU;IACV,WAAW;IACX,aAAa;IACb,UAAU;IACV,sBAAsB;IACtB,YAAY;IACZ,OAAO;IACP,OAAO;IACP,mBAAmB;CACX,CAAC;AAIX,gFAAgF;AAEhF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,OAAO;IACP,cAAc;IACd,aAAa;IACb,aAAa;IACb,cAAc;IACd,oBAAoB;IACpB,sBAAsB;IACtB,iBAAiB;IACjB,MAAM;IACN,eAAe;IACf,iBAAiB;IACjB,UAAU;IACV,mBAAmB;IACnB,QAAQ;IACR,OAAO;IACP,WAAW;IACX,SAAS;IACT,UAAU;IACV,aAAa;IACb,gBAAgB;IAChB,OAAO;IACP,mBAAmB;CACX,CAAC;AAIX,gFAAgF;AAEhF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,aAAa;IACb,aAAa;IACb,aAAa;IACb,wBAAwB;IACxB,mBAAmB;IACnB,oBAAoB;IACpB,mBAAmB;IACnB,oBAAoB;IACpB,uBAAuB;IACvB,oBAAoB;IACpB,kBAAkB;IAClB,qBAAqB;IACrB,iBAAiB;IACjB,sBAAsB;IACtB,qBAAqB;IACrB,mBAAmB;IACnB,oBAAoB;IACpB,qBAAqB;IACrB,iBAAiB;IACjB,8BAA8B;IAC9B,gBAAgB;IAChB,mBAAmB;IACnB,kBAAkB;IAClB,wBAAwB;IACxB,QAAQ;IACR,OAAO;IACP,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,iBAAiB;IACjB,sBAAsB;IACtB,qBAAqB;IACrB,6BAA6B;IAC7B,aAAa;IACb,oBAAoB;IACpB,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,qBAAqB;IACrB,cAAc;IACd,gBAAgB;IAChB,iBAAiB;IACjB,eAAe;IACf,cAAc;IACd,SAAS;IACT,WAAW;IACX,SAAS;IACT,aAAa;IACb,2BAA2B;IAC3B,OAAO;IACP,mBAAmB;CACX,CAAC;AAIX,gFAAgF;AAEhF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,UAAU;IACV,UAAU;IACV,SAAS;IACT,YAAY;IACZ,WAAW;IACX,KAAK;IACL,gBAAgB;IAChB,OAAO;CACC,CAAC","sourcesContent":["/**\n * Shared Enum Catalogues\n * =======================\n * Canonical `as const` value arrays for enums that span more than one\n * service profile (UDP, dating, future jobs / marketplace / homestay).\n * udp-schema is the source of truth; dating-schema imports from here so\n * both packages produce IDENTICAL Zod enum types for the same concept.\n *\n * Why centralise in udp-schema (not a separate `community-enums`\n * package)?\n * - UDP is the canonical identity surface — gender / religion /\n * occupation are identity facts before they are matchmaking facets.\n * - One npm dep edge (dating-schema → udp-schema) is cheaper than a\n * third coordination package today. When a 3rd consumer (jobs,\n * marketplace, homestay) needs these, extract to a standalone\n * `community-enums` package — the shape is the same, just lifted.\n *\n * Scope of this file:\n * - ONLY the enums where a shared concept exists across services.\n * - Service-specific enums (dating's `loveLanguage`, UDP's\n * `reservationStatus`) stay in their owning package.\n *\n * @module udp-schema/shared-enums\n */\n\n// ─── Gender ──────────────────────────────────────────────────────────────────\n\n/**\n * Self-identified gender. 17 values covering the full identity spectrum\n * including trans and South Asian-specific identities (hijra).\n *\n * Use everywhere gender is recorded: UDP step-01, dating-profile,\n * future service profiles. NEVER write `male` / `female` — the older\n * binary vocabulary is intentionally retired in favour of `man` /\n * `woman` (per current inclusive-identity conventions).\n */\nexport const GENDER_VALUES = [\n 'man',\n 'woman',\n 'non_binary',\n 'trans_man',\n 'trans_woman',\n 'genderfluid',\n 'genderqueer',\n 'agender',\n 'bigender',\n 'pangender',\n 'androgynous',\n 'intersex',\n 'gender_nonconforming',\n 'two_spirit',\n 'hijra',\n 'other',\n 'prefer_not_to_say',\n] as const;\n\nexport type Gender = (typeof GENDER_VALUES)[number];\n\n// ─── Religion ────────────────────────────────────────────────────────────────\n\n/**\n * Family or personal religion, denominated to the sect / branch level.\n * 22 values covering the major Indian religious communities plus\n * non-religious / prefer-not-to-say options.\n *\n * The denomination granularity (e.g., `muslim_sunni` vs `muslim_shia`,\n * `jain_digambar` vs `jain_shwetambar`) matters for both:\n * - Population stats: denomination-level rollups for the superadmin\n * dashboard.\n * - Matchmaking: marriage rules within communities are often\n * denomination-specific.\n */\nexport const RELIGION_VALUES = [\n 'hindu',\n 'muslim_sunni',\n 'muslim_shia',\n 'muslim_sufi',\n 'muslim_other',\n 'christian_catholic',\n 'christian_protestant',\n 'christian_other',\n 'sikh',\n 'jain_digambar',\n 'jain_shwetambar',\n 'buddhist',\n 'parsi_zoroastrian',\n 'jewish',\n 'bahai',\n 'spiritual',\n 'atheist',\n 'agnostic',\n 'no_religion',\n 'inter_religion',\n 'other',\n 'prefer_not_to_say',\n] as const;\n\nexport type Religion = (typeof RELIGION_VALUES)[number];\n\n// ─── Occupation ──────────────────────────────────────────────────────────────\n\n/**\n * Industry / occupation taxonomy. 39 values covering the main Indian\n * economic sectors plus non-working statuses (student / homemaker /\n * retired / not_working / differently_abled_pension).\n *\n * Used by UDP step-07 (`occupation` + `dreamOccupation`) and\n * dating-profile (`profession`). The two were already aligned in\n * practice — this declaration formalises the canonical list so they\n * can't drift.\n *\n * `prefer_not_to_say` is intentionally placed at the end so UI\n * dropdowns surface it as the final option.\n */\nexport const OCCUPATION_VALUES = [\n // Technology\n 'it_software',\n 'engineering',\n // Healthcare & Medicine\n 'healthcare_doctor',\n 'healthcare_nursing',\n 'healthcare_pharma',\n 'psychology_therapy',\n // Education & Research\n 'education_teaching',\n 'science_research',\n // Finance & Business\n 'finance_banking',\n 'chartered_accountant',\n 'business_management',\n // Creative & Media\n 'arts_entertainment',\n 'media_communication',\n 'design_creative',\n // Government & Public Service\n 'civil_services',\n 'government_public',\n 'defence_military',\n 'police_law_enforcement',\n // Legal\n 'legal',\n // Trades & Services\n 'skilled_trades',\n 'transport_logistics',\n 'hospitality_travel',\n 'beauty_wellness',\n // Agriculture & Rural\n 'agriculture_farming',\n // Real Estate & Construction\n 'real_estate',\n // Retail & Commerce\n 'retail_ecommerce',\n 'manufacturing',\n // Maritime\n 'merchant_navy',\n // Social & NGO\n 'ngo_social_work',\n 'religious_spiritual',\n // Independent\n 'freelancer_gig',\n 'content_creator',\n 'self_employed',\n // Non-working\n 'student',\n 'homemaker',\n 'retired',\n 'not_working',\n 'differently_abled_pension',\n 'other',\n 'prefer_not_to_say',\n] as const;\n\nexport type Occupation = (typeof OCCUPATION_VALUES)[number];\n\n// ─── Highest Qualification ───────────────────────────────────────────────────\n\n/**\n * Highest education attained, on the Indian system. 8 values matching\n * the buckets the dashboard's education-distribution widget rolls up\n * into. The granular education timeline (board, year, degree,\n * currently-studying-or-not) lives in UDP step-06's `education10th`\n * / `education12th` / `graduations[]` / etc.; `highestQualification`\n * is the single-bucket summary.\n *\n * Use for the matchmaking education filter, the dashboard rollup,\n * and any future jobs / counseling profile.\n */\nexport const HIGHEST_QUALIFICATION_VALUES = [\n 'CLASS_10',\n 'CLASS_12',\n 'DIPLOMA',\n 'GRADUATION',\n 'POST_GRAD',\n 'PHD',\n 'POST_DOCTORATE',\n 'OTHER',\n] as const;\n\nexport type HighestQualification = (typeof HIGHEST_QUALIFICATION_VALUES)[number];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-01.schema.d.ts","sourceRoot":"","sources":["../src/step-01.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"step-01.schema.d.ts","sourceRoot":"","sources":["../src/step-01.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2D9B,CAAC;AAIH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/step-01.schema.js
CHANGED
|
@@ -8,97 +8,26 @@
|
|
|
8
8
|
* @module udp-schema/step-01
|
|
9
9
|
*/
|
|
10
10
|
import { z } from 'zod';
|
|
11
|
+
import { GENDER_VALUES, RELIGION_VALUES } from './shared-enums.js';
|
|
11
12
|
import { emptyStringToUndefined, optionalPhoneSchema, optionalTrimmedString, } from './zod-helpers.js';
|
|
12
13
|
// ─── Main Step 01 Schema ────────────────────────────────────────────────────
|
|
13
14
|
export const step01ProfileSchema = z.object({
|
|
14
15
|
firstName: z.string().trim().max(50).optional(),
|
|
15
16
|
middleName: optionalTrimmedString,
|
|
16
17
|
lastName: z.string().trim().max(50).optional(),
|
|
17
|
-
/** Gender —
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
'man',
|
|
21
|
-
'woman',
|
|
22
|
-
'non_binary',
|
|
23
|
-
'trans_man',
|
|
24
|
-
'trans_woman',
|
|
25
|
-
'genderfluid',
|
|
26
|
-
'genderqueer',
|
|
27
|
-
'agender',
|
|
28
|
-
'bigender',
|
|
29
|
-
'pangender',
|
|
30
|
-
'androgynous',
|
|
31
|
-
'intersex',
|
|
32
|
-
'gender_nonconforming',
|
|
33
|
-
'two_spirit',
|
|
34
|
-
'hijra',
|
|
35
|
-
'other',
|
|
36
|
-
'prefer_not_to_say',
|
|
37
|
-
])
|
|
38
|
-
.optional(),
|
|
18
|
+
/** Gender — canonical 17-value enum from `shared-enums`. Shared with
|
|
19
|
+
* dating-schema and any future service profile. */
|
|
20
|
+
gender: z.enum(GENDER_VALUES).optional(),
|
|
39
21
|
dateOfBirth: z.preprocess(emptyStringToUndefined, z.coerce.date().optional()),
|
|
40
22
|
whatsappNumber: optionalPhoneSchema,
|
|
41
23
|
/** Single language code string (e.g., "hindi", "english") — matches dating motherTongue options */
|
|
42
24
|
primaryLanguage: z.string().trim().optional(),
|
|
43
25
|
/** Array of language code strings */
|
|
44
26
|
secondaryLanguages: z.array(z.string().trim()).max(10).optional(),
|
|
45
|
-
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
familyReligion: z
|
|
50
|
-
.enum([
|
|
51
|
-
'hindu',
|
|
52
|
-
'muslim_sunni',
|
|
53
|
-
'muslim_shia',
|
|
54
|
-
'muslim_sufi',
|
|
55
|
-
'muslim_other',
|
|
56
|
-
'christian_catholic',
|
|
57
|
-
'christian_protestant',
|
|
58
|
-
'christian_other',
|
|
59
|
-
'sikh',
|
|
60
|
-
'jain_digambar',
|
|
61
|
-
'jain_shwetambar',
|
|
62
|
-
'buddhist',
|
|
63
|
-
'parsi_zoroastrian',
|
|
64
|
-
'jewish',
|
|
65
|
-
'bahai',
|
|
66
|
-
'spiritual',
|
|
67
|
-
'atheist',
|
|
68
|
-
'agnostic',
|
|
69
|
-
'no_religion',
|
|
70
|
-
'inter_religion',
|
|
71
|
-
'other',
|
|
72
|
-
'prefer_not_to_say',
|
|
73
|
-
])
|
|
74
|
-
.optional(),
|
|
75
|
-
/** Personal religion — same options as familyReligion */
|
|
76
|
-
personalReligion: z
|
|
77
|
-
.enum([
|
|
78
|
-
'hindu',
|
|
79
|
-
'muslim_sunni',
|
|
80
|
-
'muslim_shia',
|
|
81
|
-
'muslim_sufi',
|
|
82
|
-
'muslim_other',
|
|
83
|
-
'christian_catholic',
|
|
84
|
-
'christian_protestant',
|
|
85
|
-
'christian_other',
|
|
86
|
-
'sikh',
|
|
87
|
-
'jain_digambar',
|
|
88
|
-
'jain_shwetambar',
|
|
89
|
-
'buddhist',
|
|
90
|
-
'parsi_zoroastrian',
|
|
91
|
-
'jewish',
|
|
92
|
-
'bahai',
|
|
93
|
-
'spiritual',
|
|
94
|
-
'atheist',
|
|
95
|
-
'agnostic',
|
|
96
|
-
'no_religion',
|
|
97
|
-
'inter_religion',
|
|
98
|
-
'other',
|
|
99
|
-
'prefer_not_to_say',
|
|
100
|
-
])
|
|
101
|
-
.optional(),
|
|
27
|
+
/** Family religion — canonical 22-value enum from `shared-enums`. */
|
|
28
|
+
familyReligion: z.enum(RELIGION_VALUES).optional(),
|
|
29
|
+
/** Personal religion — same canonical list as `familyReligion`. */
|
|
30
|
+
personalReligion: z.enum(RELIGION_VALUES).optional(),
|
|
102
31
|
/** Reservation / caste category — exhaustive per central + state notifications. */
|
|
103
32
|
reservationStatus: z
|
|
104
33
|
.enum([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-01.schema.js","sourceRoot":"","sources":["../src/step-01.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,+EAA+E;AAE/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC/C,UAAU,EAAE,qBAAqB;IACjC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAE9C
|
|
1
|
+
{"version":3,"file":"step-01.schema.js","sourceRoot":"","sources":["../src/step-01.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,+EAA+E;AAE/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC/C,UAAU,EAAE,qBAAqB;IACjC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAE9C;wDACoD;IACpD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IAExC,WAAW,EAAE,CAAC,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC;IAE7E,cAAc,EAAE,mBAAmB;IAEnC,mGAAmG;IACnG,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAE7C,qCAAqC;IACrC,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEjE,qEAAqE;IACrE,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;IAElD,mEAAmE;IACnE,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;IAEpD,mFAAmF;IACnF,iBAAiB,EAAE,CAAC;SACjB,IAAI,CAAC;QACJ,IAAI;QACJ,IAAI;QACJ,SAAS;QACT,QAAQ;QACR,KAAK;QACL,MAAM;QACN,KAAK;QACL,QAAQ;QACR,KAAK;QACL,SAAS;QACT,WAAW;QACX,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;IAEb,+FAA+F;IAC/F,cAAc,EAAE,CAAC;SACd,IAAI,CAAC;QACJ,IAAI;QACJ,QAAQ;QACR,WAAW;QACX,MAAM;QACN,UAAU;QACV,MAAM;QACN,OAAO;QACP,YAAY;QACZ,MAAM;QACN,UAAU;QACV,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC","sourcesContent":["/**\n * Step 01 — Profile\n *\n * Fields: firstName, middleName, lastName, gender, dateOfBirth,\n * whatsappNumber, primaryLanguage, secondaryLanguages,\n * familyReligion, personalReligion, reservationStatus, minorityStatus\n *\n * @module udp-schema/step-01\n */\n\nimport { z } from 'zod';\nimport { GENDER_VALUES, RELIGION_VALUES } from './shared-enums.js';\nimport {\n emptyStringToUndefined,\n optionalPhoneSchema,\n optionalTrimmedString,\n} from './zod-helpers.js';\n\n// ─── Main Step 01 Schema ────────────────────────────────────────────────────\n\nexport const step01ProfileSchema = z.object({\n firstName: z.string().trim().max(50).optional(),\n middleName: optionalTrimmedString,\n lastName: z.string().trim().max(50).optional(),\n\n /** Gender — canonical 17-value enum from `shared-enums`. Shared with\n * dating-schema and any future service profile. */\n gender: z.enum(GENDER_VALUES).optional(),\n\n dateOfBirth: z.preprocess(emptyStringToUndefined, z.coerce.date().optional()),\n\n whatsappNumber: optionalPhoneSchema,\n\n /** Single language code string (e.g., \"hindi\", \"english\") — matches dating motherTongue options */\n primaryLanguage: z.string().trim().optional(),\n\n /** Array of language code strings */\n secondaryLanguages: z.array(z.string().trim()).max(10).optional(),\n\n /** Family religion — canonical 22-value enum from `shared-enums`. */\n familyReligion: z.enum(RELIGION_VALUES).optional(),\n\n /** Personal religion — same canonical list as `familyReligion`. */\n personalReligion: z.enum(RELIGION_VALUES).optional(),\n\n /** Reservation / caste category — exhaustive per central + state notifications. */\n reservationStatus: z\n .enum([\n 'SC',\n 'ST',\n 'OBC_NCL',\n 'OBC_CL',\n 'MBC',\n 'SEBC',\n 'SBC',\n 'DNT_NT',\n 'EWS',\n 'GENERAL',\n 'DONT_KNOW',\n 'PREFER_NOT_TO_SAY',\n ])\n .optional(),\n\n /** Minority community status — per Ministry of Minority Affairs (6 religious + linguistic). */\n minorityStatus: z\n .enum([\n 'NO',\n 'MUSLIM',\n 'CHRISTIAN',\n 'SIKH',\n 'BUDDHIST',\n 'JAIN',\n 'PARSI',\n 'LINGUISTIC',\n 'BOTH',\n 'NOT_SURE',\n 'PREFER_NOT_TO_SAY',\n ])\n .optional(),\n});\n\n// ─── Inferred types ─────────────────────────────────────────────────────────\n\nexport type Step01ProfileInput = z.infer<typeof step01ProfileSchema>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-06.schema.d.ts","sourceRoot":"","sources":["../src/step-06.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"step-06.schema.d.ts","sourceRoot":"","sources":["../src/step-06.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,iBAAiB;;;;;;;;iBAQ5B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AAIH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsDhC,CAAC;AAIH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC3E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/step-06.schema.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @module udp-schema/step-06
|
|
8
8
|
*/
|
|
9
9
|
import { z } from 'zod';
|
|
10
|
+
import { HIGHEST_QUALIFICATION_VALUES } from './shared-enums.js';
|
|
10
11
|
import { optionalYearSchema } from './zod-helpers.js';
|
|
11
12
|
// ─── Reusable sub-schemas ────────────────────────────────────────────────────
|
|
12
13
|
export const degreeEntrySchema = z.object({
|
|
@@ -26,19 +27,9 @@ export const certificateEntrySchema = z.object({
|
|
|
26
27
|
});
|
|
27
28
|
// ─── Main Step 06 Schema ────────────────────────────────────────────────────
|
|
28
29
|
export const step06EducationSchema = z.object({
|
|
29
|
-
/** Highest level of formal education completed or in progress
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'CLASS_10',
|
|
33
|
-
'CLASS_12',
|
|
34
|
-
'DIPLOMA',
|
|
35
|
-
'GRADUATION',
|
|
36
|
-
'POST_GRAD',
|
|
37
|
-
'PHD',
|
|
38
|
-
'POST_DOCTORATE',
|
|
39
|
-
'OTHER',
|
|
40
|
-
])
|
|
41
|
-
.optional(),
|
|
30
|
+
/** Highest level of formal education completed or in progress —
|
|
31
|
+
* canonical 8-bucket enum from `shared-enums`. */
|
|
32
|
+
highestQualification: z.enum(HIGHEST_QUALIFICATION_VALUES).optional(),
|
|
42
33
|
/**
|
|
43
34
|
* Class 10 / Secondary school details.
|
|
44
35
|
* `board` is a string value from boardOptions (cbse / icse / state_board / ...).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-06.schema.js","sourceRoot":"","sources":["../src/step-06.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,gFAAgF;AAEhF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACxC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACxC,aAAa,EAAE,kBAAkB;IACjC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC5C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC1C,mBAAmB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC7C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC7C,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC;AAEH,+EAA+E;AAE/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C
|
|
1
|
+
{"version":3,"file":"step-06.schema.js","sourceRoot":"","sources":["../src/step-06.schema.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Step 06 — Education History\n *\n * KEPT from old step-07 schema. Same structure: highest qualification,\n * Class 10 & 12 details, degree repeaters, certificates, notes.\n *\n * @module udp-schema/step-06\n */\n\nimport { z } from 'zod';\nimport { HIGHEST_QUALIFICATION_VALUES } from './shared-enums.js';\nimport { optionalYearSchema } from './zod-helpers.js';\n\n// ─── Reusable sub-schemas ────────────────────────────────────────────────────\n\nexport const degreeEntrySchema = z.object({\n degreeName: z.string().trim().optional(),\n institutionName: z.string().trim().optional(),\n university: z.string().trim().optional(),\n yearOfPassing: optionalYearSchema,\n courseOrStream: z.string().trim().optional(),\n marksOrGrade: z.string().trim().optional(),\n isCurrentlyStudying: z.boolean().optional(),\n});\n\nexport const certificateEntrySchema = z.object({\n certificateName: z.string().trim().optional(),\n institutionName: z.string().trim().optional(),\n yearOfCompletion: optionalYearSchema,\n fieldOrSubject: z.string().trim().optional(),\n});\n\n// ─── Main Step 06 Schema ────────────────────────────────────────────────────\n\nexport const step06EducationSchema = z.object({\n /** Highest level of formal education completed or in progress —\n * canonical 8-bucket enum from `shared-enums`. */\n highestQualification: z.enum(HIGHEST_QUALIFICATION_VALUES).optional(),\n\n /**\n * Class 10 / Secondary school details.\n * `board` is a string value from boardOptions (cbse / icse / state_board / ...).\n * `subjects` is a multi-select array of subject keys from subjectOptions.\n */\n education10th: z\n .object({\n board: z.string().trim().optional(),\n schoolName: z.string().trim().optional(),\n yearOfPassing: optionalYearSchema,\n subjects: z.array(z.string().trim()).optional(),\n marksObtained: z.string().trim().optional(),\n })\n .optional(),\n\n /**\n * Class 12 / Higher Secondary details.\n * `boardOrUniversity` is a string value from boardOptions.\n * `courseOrStream` is a string value from streamOptions.\n * `subjects` is a multi-select array of subject keys.\n */\n education12th: z\n .object({\n institutionName: z.string().trim().optional(),\n boardOrUniversity: z.string().trim().optional(),\n yearOfPassing: optionalYearSchema,\n courseOrStream: z.string().trim().optional(),\n subjects: z.array(z.string().trim()).optional(),\n marksOrGrade: z.string().trim().optional(),\n })\n .optional(),\n\n /** List of Diploma qualifications (one or more) */\n diplomas: z.array(degreeEntrySchema).optional(),\n\n /** List of Graduation / Bachelor's degree qualifications */\n graduations: z.array(degreeEntrySchema).optional(),\n\n /** List of Post Graduation / Master's degree qualifications */\n postGraduations: z.array(degreeEntrySchema).optional(),\n\n /** List of Doctorate / PhD qualifications */\n doctorates: z.array(degreeEntrySchema).optional(),\n\n /** List of Post Doctoral research or fellowships */\n postDoctorates: z.array(degreeEntrySchema).optional(),\n\n /** Other certificates, short courses, or professional qualifications */\n otherCertificates: z.array(certificateEntrySchema).optional(),\n});\n\n// ─── Inferred types ──────────────────────────────────────────────────────────\n\nexport type DegreeEntryInput = z.infer<typeof degreeEntrySchema>;\nexport type CertificateEntryInput = z.infer<typeof certificateEntrySchema>;\nexport type Step06EducationInput = z.infer<typeof step06EducationSchema>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-07.schema.d.ts","sourceRoot":"","sources":["../src/step-07.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"step-07.schema.d.ts","sourceRoot":"","sources":["../src/step-07.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCjC,CAAC;AAIH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
package/dist/step-07.schema.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @module udp-schema/step-07
|
|
8
8
|
*/
|
|
9
9
|
import { z } from 'zod';
|
|
10
|
+
import { OCCUPATION_VALUES } from './shared-enums.js';
|
|
10
11
|
// ─── Main Step 07 Schema ────────────────────────────────────────────────────
|
|
11
12
|
export const step07EmploymentSchema = z.object({
|
|
12
13
|
/** Employment status */
|
|
@@ -22,71 +23,10 @@ export const step07EmploymentSchema = z.object({
|
|
|
22
23
|
'other',
|
|
23
24
|
])
|
|
24
25
|
.optional(),
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
* dating-schema's profession options.
|
|
30
|
-
*/
|
|
31
|
-
occupation: z
|
|
32
|
-
.enum([
|
|
33
|
-
// Technology
|
|
34
|
-
'it_software',
|
|
35
|
-
'engineering',
|
|
36
|
-
// Healthcare & Medicine
|
|
37
|
-
'healthcare_doctor',
|
|
38
|
-
'healthcare_nursing',
|
|
39
|
-
'healthcare_pharma',
|
|
40
|
-
'psychology_therapy',
|
|
41
|
-
// Education & Research
|
|
42
|
-
'education_teaching',
|
|
43
|
-
'science_research',
|
|
44
|
-
// Finance & Business
|
|
45
|
-
'finance_banking',
|
|
46
|
-
'chartered_accountant',
|
|
47
|
-
'business_management',
|
|
48
|
-
// Creative & Media
|
|
49
|
-
'arts_entertainment',
|
|
50
|
-
'media_communication',
|
|
51
|
-
'design_creative',
|
|
52
|
-
// Government & Public Service
|
|
53
|
-
'civil_services',
|
|
54
|
-
'government_public',
|
|
55
|
-
'defence_military',
|
|
56
|
-
'police_law_enforcement',
|
|
57
|
-
// Legal
|
|
58
|
-
'legal',
|
|
59
|
-
// Trades & Services
|
|
60
|
-
'skilled_trades',
|
|
61
|
-
'transport_logistics',
|
|
62
|
-
'hospitality_travel',
|
|
63
|
-
'beauty_wellness',
|
|
64
|
-
// Agriculture & Rural
|
|
65
|
-
'agriculture_farming',
|
|
66
|
-
// Real Estate & Construction
|
|
67
|
-
'real_estate',
|
|
68
|
-
// Retail & Commerce
|
|
69
|
-
'retail_ecommerce',
|
|
70
|
-
'manufacturing',
|
|
71
|
-
// Maritime
|
|
72
|
-
'merchant_navy',
|
|
73
|
-
// Social & NGO
|
|
74
|
-
'ngo_social_work',
|
|
75
|
-
'religious_spiritual',
|
|
76
|
-
// Independent
|
|
77
|
-
'freelancer_gig',
|
|
78
|
-
'content_creator',
|
|
79
|
-
'self_employed',
|
|
80
|
-
// Non-working
|
|
81
|
-
'student',
|
|
82
|
-
'homemaker',
|
|
83
|
-
'retired',
|
|
84
|
-
'not_working',
|
|
85
|
-
'differently_abled_pension',
|
|
86
|
-
'other',
|
|
87
|
-
'prefer_not_to_say',
|
|
88
|
-
])
|
|
89
|
-
.optional(),
|
|
26
|
+
/** Occupation — canonical 39-value taxonomy from `shared-enums`.
|
|
27
|
+
* Shared with dating-schema's `profession` and any future service
|
|
28
|
+
* profile's occupation field. */
|
|
29
|
+
occupation: z.enum(OCCUPATION_VALUES).optional(),
|
|
90
30
|
/** Current work shift */
|
|
91
31
|
workShift: z
|
|
92
32
|
.enum(['day_shift', 'night_shift', 'rotating', 'flexible', 'work_from_home', 'not_applicable'])
|
|
@@ -99,54 +39,8 @@ export const step07EmploymentSchema = z.object({
|
|
|
99
39
|
.optional(),
|
|
100
40
|
/** Income range */
|
|
101
41
|
incomeRange: z.string().trim().optional(),
|
|
102
|
-
/**
|
|
103
|
-
*
|
|
104
|
-
|
|
105
|
-
* profession enum so the two fields are directly comparable.
|
|
106
|
-
*/
|
|
107
|
-
dreamOccupation: z
|
|
108
|
-
.enum([
|
|
109
|
-
'it_software',
|
|
110
|
-
'engineering',
|
|
111
|
-
'healthcare_doctor',
|
|
112
|
-
'healthcare_nursing',
|
|
113
|
-
'healthcare_pharma',
|
|
114
|
-
'psychology_therapy',
|
|
115
|
-
'education_teaching',
|
|
116
|
-
'science_research',
|
|
117
|
-
'finance_banking',
|
|
118
|
-
'chartered_accountant',
|
|
119
|
-
'business_management',
|
|
120
|
-
'arts_entertainment',
|
|
121
|
-
'media_communication',
|
|
122
|
-
'design_creative',
|
|
123
|
-
'civil_services',
|
|
124
|
-
'government_public',
|
|
125
|
-
'defence_military',
|
|
126
|
-
'police_law_enforcement',
|
|
127
|
-
'legal',
|
|
128
|
-
'skilled_trades',
|
|
129
|
-
'transport_logistics',
|
|
130
|
-
'hospitality_travel',
|
|
131
|
-
'beauty_wellness',
|
|
132
|
-
'agriculture_farming',
|
|
133
|
-
'real_estate',
|
|
134
|
-
'retail_ecommerce',
|
|
135
|
-
'manufacturing',
|
|
136
|
-
'merchant_navy',
|
|
137
|
-
'ngo_social_work',
|
|
138
|
-
'religious_spiritual',
|
|
139
|
-
'freelancer_gig',
|
|
140
|
-
'content_creator',
|
|
141
|
-
'self_employed',
|
|
142
|
-
'student',
|
|
143
|
-
'homemaker',
|
|
144
|
-
'retired',
|
|
145
|
-
'not_working',
|
|
146
|
-
'differently_abled_pension',
|
|
147
|
-
'other',
|
|
148
|
-
'prefer_not_to_say',
|
|
149
|
-
])
|
|
150
|
-
.optional(),
|
|
42
|
+
/** Dream occupation — same canonical 39-value enum as `occupation`,
|
|
43
|
+
* so the two fields are directly comparable. */
|
|
44
|
+
dreamOccupation: z.enum(OCCUPATION_VALUES).optional(),
|
|
151
45
|
});
|
|
152
46
|
//# sourceMappingURL=step-07.schema.js.map
|