udp-schema 2.22.0 → 2.26.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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/onboarding-config.d.ts.map +1 -1
- package/dist/onboarding-config.js +5 -29
- package/dist/onboarding-config.js.map +1 -1
- package/dist/onboarding-form.d.ts +144 -18
- package/dist/onboarding-form.d.ts.map +1 -1
- package/dist/profile-fields/04-leadership.d.ts.map +1 -1
- package/dist/profile-fields/04-leadership.js +9 -19
- package/dist/profile-fields/04-leadership.js.map +1 -1
- package/dist/profile-fields/06-education.d.ts.map +1 -1
- package/dist/profile-fields/06-education.js +0 -9
- package/dist/profile-fields/06-education.js.map +1 -1
- package/dist/profile-fields/07-employment.d.ts +168 -0
- package/dist/profile-fields/07-employment.d.ts.map +1 -1
- package/dist/profile-fields/07-employment.js +72 -3
- package/dist/profile-fields/07-employment.js.map +1 -1
- package/dist/profile-fields/10-worldview.d.ts.map +1 -1
- package/dist/profile-fields/10-worldview.js +3 -23
- package/dist/profile-fields/10-worldview.js.map +1 -1
- package/dist/profile-fields/index.d.ts +1 -1
- package/dist/profile-fields/index.d.ts.map +1 -1
- package/dist/profile-fields/index.js +1 -1
- package/dist/profile-fields/index.js.map +1 -1
- package/dist/progress-fields.d.ts.map +1 -1
- package/dist/progress-fields.js +1 -5
- package/dist/progress-fields.js.map +1 -1
- package/dist/step-04.schema.d.ts +4 -4
- package/dist/step-04.schema.d.ts.map +1 -1
- package/dist/step-04.schema.js +4 -5
- package/dist/step-04.schema.js.map +1 -1
- package/dist/step-06.schema.d.ts +0 -1
- package/dist/step-06.schema.d.ts.map +1 -1
- package/dist/step-06.schema.js +0 -2
- package/dist/step-06.schema.js.map +1 -1
- package/dist/step-07.schema.d.ts +84 -2
- package/dist/step-07.schema.d.ts.map +1 -1
- package/dist/step-07.schema.js +114 -4
- package/dist/step-07.schema.js.map +1 -1
- package/dist/step-10.schema.d.ts +3 -5
- package/dist/step-10.schema.d.ts.map +1 -1
- package/dist/step-10.schema.js +3 -7
- package/dist/step-10.schema.js.map +1 -1
- package/dist/step-11.schema.d.ts +75 -15
- package/dist/step-11.schema.d.ts.map +1 -1
- package/dist/step-11.schema.js +30 -2
- package/dist/step-11.schema.js.map +1 -1
- package/package.json +1 -1
package/dist/step-07.schema.js
CHANGED
|
@@ -22,8 +22,71 @@ export const step07EmploymentSchema = z.object({
|
|
|
22
22
|
'other',
|
|
23
23
|
])
|
|
24
24
|
.optional(),
|
|
25
|
-
/**
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Occupation — exhaustive Indian profession enum, mirrored from
|
|
27
|
+
* dating-schema's `profession` field. Keep these values in sync with
|
|
28
|
+
* `occupationOptions` in profile-fields/07-employment.ts and with
|
|
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(),
|
|
27
90
|
/** Current work shift */
|
|
28
91
|
workShift: z
|
|
29
92
|
.enum(['day_shift', 'night_shift', 'rotating', 'flexible', 'work_from_home', 'not_applicable'])
|
|
@@ -36,7 +99,54 @@ export const step07EmploymentSchema = z.object({
|
|
|
36
99
|
.optional(),
|
|
37
100
|
/** Income range */
|
|
38
101
|
incomeRange: z.string().trim().optional(),
|
|
39
|
-
/**
|
|
40
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Dream occupation — same enum as `occupation` above. Answers
|
|
104
|
+
* "If you could start over, what would you do?" using the canonical
|
|
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(),
|
|
41
151
|
});
|
|
42
152
|
//# sourceMappingURL=step-07.schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-07.schema.js","sourceRoot":"","sources":["../src/step-07.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,wBAAwB;IACxB,gBAAgB,EAAE,CAAC;SAChB,IAAI,CAAC;QACJ,UAAU;QACV,eAAe;QACf,YAAY;QACZ,SAAS;QACT,WAAW;QACX,SAAS;QACT,YAAY;QACZ,OAAO;KACR,CAAC;SACD,QAAQ,EAAE;IAEb
|
|
1
|
+
{"version":3,"file":"step-07.schema.js","sourceRoot":"","sources":["../src/step-07.schema.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Step 07 — Employment & Occupation\n *\n * Fields: employmentStatus, occupation, workShift, comfortableWithShift,\n * desiredShift, incomeRange, dreamOccupation\n *\n * @module udp-schema/step-07\n */\n\nimport { z } from 'zod';\n\n// ─── Main Step 07 Schema ────────────────────────────────────────────────────\n\nexport const step07EmploymentSchema = z.object({\n /** Employment status */\n employmentStatus: z\n .enum([\n 'employed',\n 'self_employed',\n 'unemployed',\n 'student',\n 'homemaker',\n 'retired',\n 'daily_wage',\n 'other',\n ])\n .optional(),\n\n /**\n * Occupation — exhaustive Indian profession enum, mirrored from\n * dating-schema's `profession` field. Keep these values in sync with\n * `occupationOptions` in profile-fields/07-employment.ts and with\n * dating-schema's profession options.\n */\n occupation: z\n .enum([\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 ])\n .optional(),\n\n /** Current work shift */\n workShift: z\n .enum(['day_shift', 'night_shift', 'rotating', 'flexible', 'work_from_home', 'not_applicable'])\n .optional(),\n\n /** Comfortable with current shift? */\n comfortableWithShift: z.enum(['yes', 'no', 'somewhat']).optional(),\n\n /** Desired shift */\n desiredShift: z\n .enum(['day_shift', 'night_shift', 'rotating', 'flexible', 'work_from_home', 'not_applicable'])\n .optional(),\n\n /** Income range */\n incomeRange: z.string().trim().optional(),\n\n /**\n * Dream occupation — same enum as `occupation` above. Answers\n * \"If you could start over, what would you do?\" using the canonical\n * profession enum so the two fields are directly comparable.\n */\n dreamOccupation: z\n .enum([\n 'it_software',\n 'engineering',\n 'healthcare_doctor',\n 'healthcare_nursing',\n 'healthcare_pharma',\n 'psychology_therapy',\n 'education_teaching',\n 'science_research',\n 'finance_banking',\n 'chartered_accountant',\n 'business_management',\n 'arts_entertainment',\n 'media_communication',\n 'design_creative',\n 'civil_services',\n 'government_public',\n 'defence_military',\n 'police_law_enforcement',\n 'legal',\n 'skilled_trades',\n 'transport_logistics',\n 'hospitality_travel',\n 'beauty_wellness',\n 'agriculture_farming',\n 'real_estate',\n 'retail_ecommerce',\n 'manufacturing',\n 'merchant_navy',\n 'ngo_social_work',\n 'religious_spiritual',\n 'freelancer_gig',\n 'content_creator',\n 'self_employed',\n 'student',\n 'homemaker',\n 'retired',\n 'not_working',\n 'differently_abled_pension',\n 'other',\n 'prefer_not_to_say',\n ])\n .optional(),\n});\n\n// ─── Inferred types ─────────────────────────────────────────────────────────\n\nexport type Step07EmploymentInput = z.infer<typeof step07EmploymentSchema>;\n"]}
|
package/dist/step-10.schema.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Step 10 — World View & Experience
|
|
3
3
|
*
|
|
4
|
-
* Fields: viewOnAnimalCruelty, viewOnLgbtqStatements,
|
|
5
|
-
* viewOnTransgenderInclusion,
|
|
6
|
-
*
|
|
4
|
+
* Fields: viewOnAnimalCruelty, viewOnLgbtqStatements,
|
|
5
|
+
* viewOnTransgenderInclusion, facingCasteDiscrimination,
|
|
6
|
+
* casteDiscriminationPlaces, viewOnGenderEquality
|
|
7
7
|
*
|
|
8
8
|
* @module udp-schema/step-10
|
|
9
9
|
*/
|
|
@@ -17,9 +17,7 @@ export declare const step10WorldViewSchema: z.ZodObject<{
|
|
|
17
17
|
acceptable_in_tradition: "acceptable_in_tradition";
|
|
18
18
|
}>>;
|
|
19
19
|
viewOnLgbtqStatements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
20
|
-
viewOnLgbtqOpinion: z.ZodOptional<z.ZodString>;
|
|
21
20
|
viewOnTransgenderInclusion: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
-
viewOnTransgenderOpinion: z.ZodOptional<z.ZodString>;
|
|
23
21
|
facingCasteDiscrimination: z.ZodOptional<z.ZodEnum<{
|
|
24
22
|
NO: "NO";
|
|
25
23
|
YES_OFTEN: "YES_OFTEN";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-10.schema.d.ts","sourceRoot":"","sources":["../src/step-10.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"step-10.schema.d.ts","sourceRoot":"","sources":["../src/step-10.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;iBAoChC,CAAC;AAIH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/step-10.schema.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Step 10 — World View & Experience
|
|
3
3
|
*
|
|
4
|
-
* Fields: viewOnAnimalCruelty, viewOnLgbtqStatements,
|
|
5
|
-
* viewOnTransgenderInclusion,
|
|
6
|
-
*
|
|
4
|
+
* Fields: viewOnAnimalCruelty, viewOnLgbtqStatements,
|
|
5
|
+
* viewOnTransgenderInclusion, facingCasteDiscrimination,
|
|
6
|
+
* casteDiscriminationPlaces, viewOnGenderEquality
|
|
7
7
|
*
|
|
8
8
|
* @module udp-schema/step-10
|
|
9
9
|
*/
|
|
@@ -22,12 +22,8 @@ export const step10WorldViewSchema = z.object({
|
|
|
22
22
|
.optional(),
|
|
23
23
|
/** LGBTQ+ views — multi-select statements (reused from existing UDP) */
|
|
24
24
|
viewOnLgbtqStatements: z.array(z.string().trim()).optional(),
|
|
25
|
-
/** LGBTQ+ opinion — free text */
|
|
26
|
-
viewOnLgbtqOpinion: z.string().trim().max(500).optional(),
|
|
27
25
|
/** Transgender inclusion — multi-select statements (reused from existing UDP) */
|
|
28
26
|
viewOnTransgenderInclusion: z.array(z.string().trim()).optional(),
|
|
29
|
-
/** Transgender opinion — free text */
|
|
30
|
-
viewOnTransgenderOpinion: z.string().trim().max(500).optional(),
|
|
31
27
|
/** Facing caste-based discrimination */
|
|
32
28
|
facingCasteDiscrimination: z
|
|
33
29
|
.enum(['YES_OFTEN', 'YES_SOMETIMES', 'NO', 'PREFER_NOT_SAY'])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-10.schema.js","sourceRoot":"","sources":["../src/step-10.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,6BAA6B;IAC7B,mBAAmB,EAAE,CAAC;SACnB,IAAI,CAAC;QACJ,kBAAkB;QAClB,kBAAkB;QAClB,SAAS;QACT,yBAAyB;QACzB,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;IAEb,wEAAwE;IACxE,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IAE5D,
|
|
1
|
+
{"version":3,"file":"step-10.schema.js","sourceRoot":"","sources":["../src/step-10.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,6BAA6B;IAC7B,mBAAmB,EAAE,CAAC;SACnB,IAAI,CAAC;QACJ,kBAAkB;QAClB,kBAAkB;QAClB,SAAS;QACT,yBAAyB;QACzB,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;IAEb,wEAAwE;IACxE,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IAE5D,iFAAiF;IACjF,0BAA0B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEjE,wCAAwC;IACxC,yBAAyB,EAAE,CAAC;SACzB,IAAI,CAAC,CAAC,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;SAC5D,QAAQ,EAAE;IAEb,gEAAgE;IAChE,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEhE,8BAA8B;IAC9B,oBAAoB,EAAE,CAAC;SACpB,IAAI,CAAC;QACJ,iBAAiB;QACjB,YAAY;QACZ,oBAAoB;QACpB,YAAY;QACZ,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC","sourcesContent":["/**\n * Step 10 — World View & Experience\n *\n * Fields: viewOnAnimalCruelty, viewOnLgbtqStatements,\n * viewOnTransgenderInclusion, facingCasteDiscrimination,\n * casteDiscriminationPlaces, viewOnGenderEquality\n *\n * @module udp-schema/step-10\n */\n\nimport { z } from 'zod';\n\n// ─── Main Step 10 Schema ────────────────────────────────────────────────────\n\nexport const step10WorldViewSchema = z.object({\n /** View on animal cruelty */\n viewOnAnimalCruelty: z\n .enum([\n 'strongly_against',\n 'against_but_food',\n 'neutral',\n 'acceptable_in_tradition',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** LGBTQ+ views — multi-select statements (reused from existing UDP) */\n viewOnLgbtqStatements: z.array(z.string().trim()).optional(),\n\n /** Transgender inclusion — multi-select statements (reused from existing UDP) */\n viewOnTransgenderInclusion: z.array(z.string().trim()).optional(),\n\n /** Facing caste-based discrimination */\n facingCasteDiscrimination: z\n .enum(['YES_OFTEN', 'YES_SOMETIMES', 'NO', 'PREFER_NOT_SAY'])\n .optional(),\n\n /** Places where caste discrimination is faced (multi-select) */\n casteDiscriminationPlaces: z.array(z.string().trim()).optional(),\n\n /** View on gender equality */\n viewOnGenderEquality: z\n .enum([\n 'strong_advocate',\n 'supportive',\n 'traditional_values',\n 'no_opinion',\n 'prefer_not_to_say',\n ])\n .optional(),\n});\n\n// ─── Inferred types ─────────────────────────────────────────────────────────\n\nexport type Step10WorldViewInput = z.infer<typeof step10WorldViewSchema>;\n"]}
|
package/dist/step-11.schema.d.ts
CHANGED
|
@@ -8,31 +8,91 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
export declare const simplifiedAddressSchema: z.ZodObject<{
|
|
11
|
-
state: z.ZodOptional<z.ZodString
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
12
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
type: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>]>>>;
|
|
16
|
+
district: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
17
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
type: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>]>>>;
|
|
21
|
+
village: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
22
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
type: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>]>>>;
|
|
14
26
|
}, z.core.$strip>;
|
|
15
27
|
export declare const step11ResidenceSchema: z.ZodObject<{
|
|
16
28
|
currentAddress: z.ZodOptional<z.ZodObject<{
|
|
17
|
-
state: z.ZodOptional<z.ZodString
|
|
18
|
-
|
|
19
|
-
|
|
29
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
30
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
31
|
+
name: z.ZodString;
|
|
32
|
+
type: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>]>>>;
|
|
34
|
+
district: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
35
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
type: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>]>>>;
|
|
39
|
+
village: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
40
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
type: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>]>>>;
|
|
20
44
|
}, z.core.$strip>>;
|
|
21
45
|
permanentAddress: z.ZodOptional<z.ZodObject<{
|
|
22
|
-
state: z.ZodOptional<z.ZodString
|
|
23
|
-
|
|
24
|
-
|
|
46
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
47
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
type: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, z.core.$strip>]>>>;
|
|
51
|
+
district: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
52
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
type: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, z.core.$strip>]>>>;
|
|
56
|
+
village: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
57
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
type: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>]>>>;
|
|
25
61
|
sameAsCurrent: z.ZodOptional<z.ZodBoolean>;
|
|
26
62
|
}, z.core.$strip>>;
|
|
27
63
|
homeNativePlace: z.ZodOptional<z.ZodObject<{
|
|
28
|
-
state: z.ZodOptional<z.ZodString
|
|
29
|
-
|
|
30
|
-
|
|
64
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
65
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
66
|
+
name: z.ZodString;
|
|
67
|
+
type: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$strip>]>>>;
|
|
69
|
+
district: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
70
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
71
|
+
name: z.ZodString;
|
|
72
|
+
type: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>]>>>;
|
|
74
|
+
village: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
75
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
type: z.ZodOptional<z.ZodString>;
|
|
78
|
+
}, z.core.$strip>]>>>;
|
|
31
79
|
}, z.core.$strip>>;
|
|
32
80
|
ancestralPlace: z.ZodOptional<z.ZodObject<{
|
|
33
|
-
state: z.ZodOptional<z.ZodString
|
|
34
|
-
|
|
35
|
-
|
|
81
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
82
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
83
|
+
name: z.ZodString;
|
|
84
|
+
type: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, z.core.$strip>]>>>;
|
|
86
|
+
district: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
87
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
type: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>]>>>;
|
|
91
|
+
village: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
92
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
type: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$strip>]>>>;
|
|
36
96
|
}, z.core.$strip>>;
|
|
37
97
|
}, z.core.$strip>;
|
|
38
98
|
export type SimplifiedAddressInput = z.infer<typeof simplifiedAddressSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-11.schema.d.ts","sourceRoot":"","sources":["../src/step-11.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"step-11.schema.d.ts","sourceRoot":"","sources":["../src/step-11.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmCxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;iBAOlC,CAAC;AAIH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgBhC,CAAC;AAIH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/step-11.schema.js
CHANGED
|
@@ -8,8 +8,36 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
// ─── Address sub-schema (simplified) ─────────────────────────────────────────
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Area reference — saves BOTH the ObjectId and the display name (per the
|
|
13
|
+
* "save both id + name" architectural decision). Three accepted shapes:
|
|
14
|
+
*
|
|
15
|
+
* 1. `{ _id, name, type? }` — selected from the location-db search API
|
|
16
|
+
* via `AreaCombobox`. The canonical case: we have a real Area entity
|
|
17
|
+
* reference (`_id`) AND its display name without an extra lookup.
|
|
18
|
+
* 2. `{ name }` — free-text fallback for hyper-local names not seeded
|
|
19
|
+
* in the location DB (e.g. a specific colony / mohalla typed via
|
|
20
|
+
* the AreaCombobox `allowCreate` path). No `_id` exists to save.
|
|
21
|
+
* 3. `string` — bare ObjectId, kept for backward compatibility with any
|
|
22
|
+
* legacy records that stored a flat _id reference. New saves will
|
|
23
|
+
* always use shape #1 or #2.
|
|
24
|
+
*
|
|
25
|
+
* `null` / `undefined` mean "not set" (e.g. cascade reset when parent
|
|
26
|
+
* changes). Zod's default object behavior strips unknown keys, so any
|
|
27
|
+
* extra metadata the API returned (e.g. `location`, `urbanBodyType`) is
|
|
28
|
+
* dropped at save time — keeps stored documents clean and small.
|
|
29
|
+
*/
|
|
30
|
+
const areaRefSchema = z
|
|
31
|
+
.union([
|
|
32
|
+
z.string().trim(),
|
|
33
|
+
z.object({
|
|
34
|
+
_id: z.string().optional(),
|
|
35
|
+
name: z.string(),
|
|
36
|
+
type: z.string().optional(),
|
|
37
|
+
}),
|
|
38
|
+
])
|
|
39
|
+
.nullable()
|
|
40
|
+
.optional();
|
|
13
41
|
export const simplifiedAddressSchema = z.object({
|
|
14
42
|
/** State area ref */
|
|
15
43
|
state: areaRefSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-11.schema.js","sourceRoot":"","sources":["../src/step-11.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAEhF
|
|
1
|
+
{"version":3,"file":"step-11.schema.js","sourceRoot":"","sources":["../src/step-11.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAEhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,aAAa,GAAG,CAAC;KACpB,KAAK,CAAC;IACL,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACjB,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC5B,CAAC;CACH,CAAC;KACD,QAAQ,EAAE;KACV,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,qBAAqB;IACrB,KAAK,EAAE,aAAa;IACpB,wBAAwB;IACxB,QAAQ,EAAE,aAAa;IACvB,uDAAuD;IACvD,OAAO,EAAE,aAAa;CACvB,CAAC,CAAC;AAEH,+EAA+E;AAE/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,6BAA6B;IAC7B,cAAc,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IAElD,0DAA0D;IAC1D,gBAAgB,EAAE,uBAAuB;SACtC,MAAM,CAAC;QACN,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACtC,CAAC;SACD,QAAQ,EAAE;IAEb,wBAAwB;IACxB,eAAe,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IAEnD,sBAAsB;IACtB,cAAc,EAAE,uBAAuB,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAC","sourcesContent":["/**\n * Step 11 — Residence & Address\n *\n * Simplified: 3 fields per address (state, district, village/colony).\n * Fields: currentAddress, permanentAddress, homeNativePlace, ancestralPlace\n *\n * @module udp-schema/step-11\n */\n\nimport { z } from 'zod';\n\n// ─── Address sub-schema (simplified) ─────────────────────────────────────────\n\n/**\n * Area reference — saves BOTH the ObjectId and the display name (per the\n * \"save both id + name\" architectural decision). Three accepted shapes:\n *\n * 1. `{ _id, name, type? }` — selected from the location-db search API\n * via `AreaCombobox`. The canonical case: we have a real Area entity\n * reference (`_id`) AND its display name without an extra lookup.\n * 2. `{ name }` — free-text fallback for hyper-local names not seeded\n * in the location DB (e.g. a specific colony / mohalla typed via\n * the AreaCombobox `allowCreate` path). No `_id` exists to save.\n * 3. `string` — bare ObjectId, kept for backward compatibility with any\n * legacy records that stored a flat _id reference. New saves will\n * always use shape #1 or #2.\n *\n * `null` / `undefined` mean \"not set\" (e.g. cascade reset when parent\n * changes). Zod's default object behavior strips unknown keys, so any\n * extra metadata the API returned (e.g. `location`, `urbanBodyType`) is\n * dropped at save time — keeps stored documents clean and small.\n */\nconst areaRefSchema = z\n .union([\n z.string().trim(),\n z.object({\n _id: z.string().optional(),\n name: z.string(),\n type: z.string().optional(),\n }),\n ])\n .nullable()\n .optional();\n\nexport const simplifiedAddressSchema = z.object({\n /** State area ref */\n state: areaRefSchema,\n /** District area ref */\n district: areaRefSchema,\n /** Smallest area unit — village, colony, ward, etc. */\n village: areaRefSchema,\n});\n\n// ─── Main Step 11 Schema ────────────────────────────────────────────────────\n\nexport const step11ResidenceSchema = z.object({\n /** Current living address */\n currentAddress: simplifiedAddressSchema.optional(),\n\n /** Permanent address — may have \"same as current\" flag */\n permanentAddress: simplifiedAddressSchema\n .extend({\n sameAsCurrent: z.boolean().optional(),\n })\n .optional(),\n\n /** Home native place */\n homeNativePlace: simplifiedAddressSchema.optional(),\n\n /** Ancestral place */\n ancestralPlace: simplifiedAddressSchema.optional(),\n});\n\n// ─── Inferred types ─────────────────────────────────────────────────────────\n\nexport type SimplifiedAddressInput = z.infer<typeof simplifiedAddressSchema>;\nexport type Step11ResidenceInput = z.infer<typeof step11ResidenceSchema>;\n"]}
|