udp-schema 0.2.0 → 1.0.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/field-helpers.d.ts +10 -38
- package/dist/field-helpers.d.ts.map +1 -1
- package/dist/field-helpers.js +40 -66
- package/dist/field-helpers.js.map +1 -1
- package/dist/field-meta.d.ts +46 -28
- package/dist/field-meta.d.ts.map +1 -1
- package/dist/field-meta.js +304 -1016
- package/dist/field-meta.js.map +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -34
- package/dist/index.js.map +1 -1
- package/dist/onboarding-config.d.ts +44 -0
- package/dist/onboarding-config.d.ts.map +1 -0
- package/dist/onboarding-config.js +705 -0
- package/dist/onboarding-config.js.map +1 -0
- package/dist/progress-fields.d.ts +3 -3
- package/dist/progress-fields.d.ts.map +1 -1
- package/dist/progress-fields.js +73 -101
- package/dist/progress-fields.js.map +1 -1
- package/dist/step-01.schema.d.ts +84 -111
- package/dist/step-01.schema.d.ts.map +1 -1
- package/dist/step-01.schema.js +94 -101
- package/dist/step-01.schema.js.map +1 -1
- package/dist/step-02.schema.d.ts +31 -21
- package/dist/step-02.schema.d.ts.map +1 -1
- package/dist/step-02.schema.js +34 -27
- package/dist/step-02.schema.js.map +1 -1
- package/dist/step-03.schema.d.ts +24 -300
- package/dist/step-03.schema.d.ts.map +1 -1
- package/dist/step-03.schema.js +24 -60
- package/dist/step-03.schema.js.map +1 -1
- package/dist/step-04.schema.d.ts +56 -50
- package/dist/step-04.schema.d.ts.map +1 -1
- package/dist/step-04.schema.js +48 -43
- package/dist/step-04.schema.js.map +1 -1
- package/dist/step-05.schema.d.ts +13 -52
- package/dist/step-05.schema.d.ts.map +1 -1
- package/dist/step-05.schema.js +19 -40
- package/dist/step-05.schema.js.map +1 -1
- package/dist/step-06.schema.d.ts +101 -117
- package/dist/step-06.schema.d.ts.map +1 -1
- package/dist/step-06.schema.js +70 -75
- package/dist/step-06.schema.js.map +1 -1
- package/dist/step-07.schema.d.ts +44 -95
- package/dist/step-07.schema.d.ts.map +1 -1
- package/dist/step-07.schema.js +51 -78
- package/dist/step-07.schema.js.map +1 -1
- package/dist/step-08.schema.d.ts +31 -44
- package/dist/step-08.schema.d.ts.map +1 -1
- package/dist/step-08.schema.js +30 -47
- package/dist/step-08.schema.js.map +1 -1
- package/dist/step-09.schema.d.ts +48 -85
- package/dist/step-09.schema.d.ts.map +1 -1
- package/dist/step-09.schema.js +42 -120
- package/dist/step-09.schema.js.map +1 -1
- package/dist/step-10.schema.d.ts +32 -86
- package/dist/step-10.schema.d.ts.map +1 -1
- package/dist/step-10.schema.js +44 -120
- package/dist/step-10.schema.js.map +1 -1
- package/dist/step-11.schema.d.ts +36 -92
- package/dist/step-11.schema.d.ts.map +1 -1
- package/dist/step-11.schema.js +32 -111
- package/dist/step-11.schema.js.map +1 -1
- package/dist/step-12.schema.d.ts +56 -93
- package/dist/step-12.schema.d.ts.map +1 -1
- package/dist/step-12.schema.js +77 -133
- package/dist/step-12.schema.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-11.schema.js","sourceRoot":"","sources":["../src/step-11.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,
|
|
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,sEAAsE;AACtE,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC;AAEnD,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/** Area reference — ObjectId string pointing to location-db entity */\nconst areaRefSchema = z.string().trim().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"]}
|
package/dist/step-12.schema.d.ts
CHANGED
|
@@ -1,103 +1,66 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Whether the user plans to vote in the upcoming election.
|
|
4
|
-
*/
|
|
5
|
-
export declare const WILL_VOTE_THIS_TIME: readonly ["YES", "NO", "NOT_SURE"];
|
|
6
|
-
/**
|
|
7
|
-
* Whether the user voted in the last major election.
|
|
8
|
-
*/
|
|
9
|
-
export declare const VOTED_LAST_TIME: readonly ["YES", "NO", "NOT_ELIGIBLE_THEN", "DONT_REMEMBER"];
|
|
10
|
-
/**
|
|
11
|
-
* Overall voting frequency across elections — a longitudinal habit signal.
|
|
12
|
-
* Added beyond spec; differentiates consistent voters from occasional ones.
|
|
13
|
-
*/
|
|
14
|
-
export declare const VOTING_FREQUENCY: readonly ["ALWAYS", "USUALLY", "SOMETIMES", "RARELY", "NEVER"];
|
|
15
|
-
/**
|
|
16
|
-
* Primary issues that drive the user's vote choice.
|
|
17
|
-
* Multi-select; added beyond spec to capture electoral motivations.
|
|
18
|
-
*/
|
|
19
|
-
export declare const PRIMARY_VOTING_ISSUES: readonly ["DEVELOPMENT", "SECURITY", "EDUCATION", "HEALTHCARE", "ECONOMY", "CASTE_COMMUNITY", "RELIGION", "CANDIDATE_QUALITY", "ANTI_INCUMBENCY", "WELFARE_SCHEMES", "CORRUPTION", "ENVIRONMENT", "WOMEN_SAFETY", "LOCAL_ISSUES", "PARTY_LOYALTY", "OTHER"];
|
|
20
1
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
2
|
+
* Step 12 — Household & Economic Profile
|
|
3
|
+
*
|
|
4
|
+
* Fields: maritalStatus, familyMembers, numberOfDependents, housingType,
|
|
5
|
+
* householdIncome, bplCard, digitalAccess, migrationStatus,
|
|
6
|
+
* landOwnership, primaryIncomeSource
|
|
7
|
+
*
|
|
8
|
+
* @module udp-schema/step-12
|
|
24
9
|
*/
|
|
25
|
-
|
|
26
|
-
export declare const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
epicNumber: z.ZodOptional<z.ZodString>;
|
|
35
|
-
willVoteThisTime: z.ZodOptional<z.ZodEnum<{
|
|
36
|
-
NO: "NO";
|
|
37
|
-
NOT_SURE: "NOT_SURE";
|
|
38
|
-
YES: "YES";
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
export declare const step12HouseholdSchema: z.ZodObject<{
|
|
12
|
+
maritalStatus: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
prefer_not_to_say: "prefer_not_to_say";
|
|
14
|
+
single: "single";
|
|
15
|
+
married: "married";
|
|
16
|
+
divorced: "divorced";
|
|
17
|
+
widowed: "widowed";
|
|
18
|
+
separated: "separated";
|
|
39
19
|
}>>;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
20
|
+
familyMembers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
|
+
numberOfDependents: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
housingType: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
other: "other";
|
|
24
|
+
own_house: "own_house";
|
|
25
|
+
rented: "rented";
|
|
26
|
+
government_quarters: "government_quarters";
|
|
27
|
+
shared: "shared";
|
|
28
|
+
homeless: "homeless";
|
|
45
29
|
}>>;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
30
|
+
householdIncome: z.ZodOptional<z.ZodString>;
|
|
31
|
+
bplCard: z.ZodOptional<z.ZodEnum<{
|
|
32
|
+
yes: "yes";
|
|
33
|
+
no: "no";
|
|
34
|
+
applied: "applied";
|
|
35
|
+
dont_know: "dont_know";
|
|
52
36
|
}>>;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
CASTE_COMMUNITY: "CASTE_COMMUNITY";
|
|
61
|
-
RELIGION: "RELIGION";
|
|
62
|
-
CANDIDATE_QUALITY: "CANDIDATE_QUALITY";
|
|
63
|
-
ANTI_INCUMBENCY: "ANTI_INCUMBENCY";
|
|
64
|
-
WELFARE_SCHEMES: "WELFARE_SCHEMES";
|
|
65
|
-
CORRUPTION: "CORRUPTION";
|
|
66
|
-
ENVIRONMENT: "ENVIRONMENT";
|
|
67
|
-
WOMEN_SAFETY: "WOMEN_SAFETY";
|
|
68
|
-
LOCAL_ISSUES: "LOCAL_ISSUES";
|
|
69
|
-
PARTY_LOYALTY: "PARTY_LOYALTY";
|
|
70
|
-
}>>>;
|
|
71
|
-
politicalSpectrumSelf: z.ZodOptional<z.ZodEnum<{
|
|
72
|
-
DONT_KNOW: "DONT_KNOW";
|
|
73
|
-
EXTREME_RIGHT: "EXTREME_RIGHT";
|
|
74
|
-
RIGHT: "RIGHT";
|
|
75
|
-
CENTER_RIGHT: "CENTER_RIGHT";
|
|
76
|
-
CENTER: "CENTER";
|
|
77
|
-
CENTER_LEFT: "CENTER_LEFT";
|
|
78
|
-
LEFT: "LEFT";
|
|
79
|
-
EXTREME_LEFT: "EXTREME_LEFT";
|
|
80
|
-
APOLITICAL: "APOLITICAL";
|
|
37
|
+
digitalAccess: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
38
|
+
migrationStatus: z.ZodOptional<z.ZodEnum<{
|
|
39
|
+
native: "native";
|
|
40
|
+
within_district: "within_district";
|
|
41
|
+
within_state: "within_state";
|
|
42
|
+
inter_state: "inter_state";
|
|
43
|
+
international: "international";
|
|
81
44
|
}>>;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
45
|
+
landOwnership: z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
other: "other";
|
|
47
|
+
own_agricultural: "own_agricultural";
|
|
48
|
+
own_residential: "own_residential";
|
|
49
|
+
government_allotted: "government_allotted";
|
|
50
|
+
no_land: "no_land";
|
|
51
|
+
leased: "leased";
|
|
86
52
|
}>>;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
53
|
+
primaryIncomeSource: z.ZodOptional<z.ZodEnum<{
|
|
54
|
+
other: "other";
|
|
55
|
+
daily_wage: "daily_wage";
|
|
56
|
+
agriculture: "agriculture";
|
|
57
|
+
government_job: "government_job";
|
|
58
|
+
private_job: "private_job";
|
|
59
|
+
business: "business";
|
|
60
|
+
pension: "pension";
|
|
61
|
+
remittance: "remittance";
|
|
62
|
+
no_fixed_income: "no_fixed_income";
|
|
93
63
|
}>>;
|
|
94
|
-
mostHonestPersonLocality: z.ZodOptional<z.ZodString>;
|
|
95
|
-
mostIntellectualPersonLocality: z.ZodOptional<z.ZodString>;
|
|
96
|
-
mostInfluentialPersonLocality: z.ZodOptional<z.ZodString>;
|
|
97
|
-
pollingBoothNameOrCode: z.ZodOptional<z.ZodString>;
|
|
98
|
-
localElectionConstituency: z.ZodOptional<z.ZodString>;
|
|
99
|
-
assemblyConstituency: z.ZodOptional<z.ZodString>;
|
|
100
|
-
parliamentaryConstituency: z.ZodOptional<z.ZodString>;
|
|
101
64
|
}, z.core.$strip>;
|
|
102
|
-
export type
|
|
65
|
+
export type Step12HouseholdInput = z.infer<typeof step12HouseholdSchema>;
|
|
103
66
|
//# sourceMappingURL=step-12.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-12.schema.d.ts","sourceRoot":"","sources":["../src/step-12.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB
|
|
1
|
+
{"version":3,"file":"step-12.schema.d.ts","sourceRoot":"","sources":["../src/step-12.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6EhC,CAAC;AAIH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/step-12.schema.js
CHANGED
|
@@ -1,137 +1,81 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
// ─── Enums ────────────────────────────────────────────────────────────────────
|
|
3
|
-
/**
|
|
4
|
-
* Whether the user plans to vote in the upcoming election.
|
|
5
|
-
*/
|
|
6
|
-
export const WILL_VOTE_THIS_TIME = ['YES', 'NO', 'NOT_SURE'];
|
|
7
|
-
/**
|
|
8
|
-
* Whether the user voted in the last major election.
|
|
9
|
-
*/
|
|
10
|
-
export const VOTED_LAST_TIME = [
|
|
11
|
-
'YES',
|
|
12
|
-
'NO',
|
|
13
|
-
'NOT_ELIGIBLE_THEN', // Age, registration, etc.
|
|
14
|
-
'DONT_REMEMBER',
|
|
15
|
-
];
|
|
16
|
-
/**
|
|
17
|
-
* Overall voting frequency across elections — a longitudinal habit signal.
|
|
18
|
-
* Added beyond spec; differentiates consistent voters from occasional ones.
|
|
19
|
-
*/
|
|
20
|
-
export const VOTING_FREQUENCY = [
|
|
21
|
-
'ALWAYS', // Votes in every election without fail
|
|
22
|
-
'USUALLY', // Votes most of the time
|
|
23
|
-
'SOMETIMES', // Votes occasionally
|
|
24
|
-
'RARELY', // Has voted once or twice
|
|
25
|
-
'NEVER', // Has never voted
|
|
26
|
-
];
|
|
27
|
-
/**
|
|
28
|
-
* Primary issues that drive the user's vote choice.
|
|
29
|
-
* Multi-select; added beyond spec to capture electoral motivations.
|
|
30
|
-
*/
|
|
31
|
-
export const PRIMARY_VOTING_ISSUES = [
|
|
32
|
-
'DEVELOPMENT', // Infrastructure, roads, buildings
|
|
33
|
-
'SECURITY', // Law and order, safety
|
|
34
|
-
'EDUCATION', // Schools, colleges, literacy
|
|
35
|
-
'HEALTHCARE', // Hospitals, healthcare access
|
|
36
|
-
'ECONOMY', // Jobs, growth, industry
|
|
37
|
-
'CASTE_COMMUNITY', // Caste or community representation
|
|
38
|
-
'RELIGION', // Religious identity or protection
|
|
39
|
-
'CANDIDATE_QUALITY', // Personal integrity / capability of candidate
|
|
40
|
-
'ANTI_INCUMBENCY', // Desire to remove current representative
|
|
41
|
-
'WELFARE_SCHEMES', // Subsidies, rations, schemes (PM/state)
|
|
42
|
-
'CORRUPTION', // Anti-corruption stance
|
|
43
|
-
'ENVIRONMENT', // Climate, pollution, water
|
|
44
|
-
'WOMEN_SAFETY', // Gender safety and rights
|
|
45
|
-
'LOCAL_ISSUES', // Ward/village-specific problems
|
|
46
|
-
'PARTY_LOYALTY', // Strong allegiance to a party regardless of candidate
|
|
47
|
-
'OTHER',
|
|
48
|
-
];
|
|
49
1
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
2
|
+
* Step 12 — Household & Economic Profile
|
|
3
|
+
*
|
|
4
|
+
* Fields: maritalStatus, familyMembers, numberOfDependents, housingType,
|
|
5
|
+
* householdIncome, bplCard, digitalAccess, migrationStatus,
|
|
6
|
+
* landOwnership, primaryIncomeSource
|
|
7
|
+
*
|
|
8
|
+
* @module udp-schema/step-12
|
|
53
9
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
* Added beyond spec — social capital mapping for ground-level network analysis.
|
|
125
|
-
*/
|
|
126
|
-
mostInfluentialPersonLocality: z.string().trim().optional(),
|
|
127
|
-
// ── 12.6 Polling Booth & Constituency (mostly system-derived) ────────────
|
|
128
|
-
/** Polling booth name, number, or code — user-provided or system-derived. */
|
|
129
|
-
pollingBoothNameOrCode: z.string().trim().optional(),
|
|
130
|
-
/** Local election constituency (Ward / Panchayat / Nagar). */
|
|
131
|
-
localElectionConstituency: z.string().trim().optional(),
|
|
132
|
-
/** Vidhan Sabha (State Assembly) constituency. */
|
|
133
|
-
assemblyConstituency: z.string().trim().optional(),
|
|
134
|
-
/** Lok Sabha (Parliamentary) constituency. */
|
|
135
|
-
parliamentaryConstituency: z.string().trim().optional(),
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
// ─── Main Step 12 Schema ────────────────────────────────────────────────────
|
|
12
|
+
export const step12HouseholdSchema = z.object({
|
|
13
|
+
/** Marital status */
|
|
14
|
+
maritalStatus: z
|
|
15
|
+
.enum([
|
|
16
|
+
'single',
|
|
17
|
+
'married',
|
|
18
|
+
'divorced',
|
|
19
|
+
'widowed',
|
|
20
|
+
'separated',
|
|
21
|
+
'prefer_not_to_say',
|
|
22
|
+
])
|
|
23
|
+
.optional(),
|
|
24
|
+
/** Family members present (multi-select string array) */
|
|
25
|
+
familyMembers: z.array(z.string().trim()).optional(),
|
|
26
|
+
/** Number of financial dependents */
|
|
27
|
+
numberOfDependents: z.number().int().min(0).max(50).optional(),
|
|
28
|
+
/** Housing type */
|
|
29
|
+
housingType: z
|
|
30
|
+
.enum([
|
|
31
|
+
'own_house',
|
|
32
|
+
'rented',
|
|
33
|
+
'government_quarters',
|
|
34
|
+
'shared',
|
|
35
|
+
'homeless',
|
|
36
|
+
'other',
|
|
37
|
+
])
|
|
38
|
+
.optional(),
|
|
39
|
+
/** Household income range (monthly) */
|
|
40
|
+
householdIncome: z.string().trim().optional(),
|
|
41
|
+
/** Below Poverty Line card */
|
|
42
|
+
bplCard: z.enum(['yes', 'no', 'applied', 'dont_know']).optional(),
|
|
43
|
+
/** Digital access (multi-select string array) */
|
|
44
|
+
digitalAccess: z.array(z.string().trim()).optional(),
|
|
45
|
+
/** Migration status */
|
|
46
|
+
migrationStatus: z
|
|
47
|
+
.enum([
|
|
48
|
+
'native',
|
|
49
|
+
'within_district',
|
|
50
|
+
'within_state',
|
|
51
|
+
'inter_state',
|
|
52
|
+
'international',
|
|
53
|
+
])
|
|
54
|
+
.optional(),
|
|
55
|
+
/** Land ownership */
|
|
56
|
+
landOwnership: z
|
|
57
|
+
.enum([
|
|
58
|
+
'own_agricultural',
|
|
59
|
+
'own_residential',
|
|
60
|
+
'government_allotted',
|
|
61
|
+
'no_land',
|
|
62
|
+
'leased',
|
|
63
|
+
'other',
|
|
64
|
+
])
|
|
65
|
+
.optional(),
|
|
66
|
+
/** Primary income source */
|
|
67
|
+
primaryIncomeSource: z
|
|
68
|
+
.enum([
|
|
69
|
+
'agriculture',
|
|
70
|
+
'government_job',
|
|
71
|
+
'private_job',
|
|
72
|
+
'business',
|
|
73
|
+
'daily_wage',
|
|
74
|
+
'pension',
|
|
75
|
+
'remittance',
|
|
76
|
+
'no_fixed_income',
|
|
77
|
+
'other',
|
|
78
|
+
])
|
|
79
|
+
.optional(),
|
|
136
80
|
});
|
|
137
81
|
//# sourceMappingURL=step-12.schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-12.schema.js","sourceRoot":"","sources":["../src/step-12.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"step-12.schema.js","sourceRoot":"","sources":["../src/step-12.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,qBAAqB;IACrB,aAAa,EAAE,CAAC;SACb,IAAI,CAAC;QACJ,QAAQ;QACR,SAAS;QACT,UAAU;QACV,SAAS;QACT,WAAW;QACX,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;IAEb,yDAAyD;IACzD,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEpD,qCAAqC;IACrC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAE9D,mBAAmB;IACnB,WAAW,EAAE,CAAC;SACX,IAAI,CAAC;QACJ,WAAW;QACX,QAAQ;QACR,qBAAqB;QACrB,QAAQ;QACR,UAAU;QACV,OAAO;KACR,CAAC;SACD,QAAQ,EAAE;IAEb,uCAAuC;IACvC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAE7C,8BAA8B;IAC9B,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE;IAEjE,iDAAiD;IACjD,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEpD,uBAAuB;IACvB,eAAe,EAAE,CAAC;SACf,IAAI,CAAC;QACJ,QAAQ;QACR,iBAAiB;QACjB,cAAc;QACd,aAAa;QACb,eAAe;KAChB,CAAC;SACD,QAAQ,EAAE;IAEb,qBAAqB;IACrB,aAAa,EAAE,CAAC;SACb,IAAI,CAAC;QACJ,kBAAkB;QAClB,iBAAiB;QACjB,qBAAqB;QACrB,SAAS;QACT,QAAQ;QACR,OAAO;KACR,CAAC;SACD,QAAQ,EAAE;IAEb,4BAA4B;IAC5B,mBAAmB,EAAE,CAAC;SACnB,IAAI,CAAC;QACJ,aAAa;QACb,gBAAgB;QAChB,aAAa;QACb,UAAU;QACV,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,iBAAiB;QACjB,OAAO;KACR,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC","sourcesContent":["/**\n * Step 12 — Household & Economic Profile\n *\n * Fields: maritalStatus, familyMembers, numberOfDependents, housingType,\n * householdIncome, bplCard, digitalAccess, migrationStatus,\n * landOwnership, primaryIncomeSource\n *\n * @module udp-schema/step-12\n */\n\nimport { z } from 'zod';\n\n// ─── Main Step 12 Schema ────────────────────────────────────────────────────\n\nexport const step12HouseholdSchema = z.object({\n /** Marital status */\n maritalStatus: z\n .enum([\n 'single',\n 'married',\n 'divorced',\n 'widowed',\n 'separated',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** Family members present (multi-select string array) */\n familyMembers: z.array(z.string().trim()).optional(),\n\n /** Number of financial dependents */\n numberOfDependents: z.number().int().min(0).max(50).optional(),\n\n /** Housing type */\n housingType: z\n .enum([\n 'own_house',\n 'rented',\n 'government_quarters',\n 'shared',\n 'homeless',\n 'other',\n ])\n .optional(),\n\n /** Household income range (monthly) */\n householdIncome: z.string().trim().optional(),\n\n /** Below Poverty Line card */\n bplCard: z.enum(['yes', 'no', 'applied', 'dont_know']).optional(),\n\n /** Digital access (multi-select string array) */\n digitalAccess: z.array(z.string().trim()).optional(),\n\n /** Migration status */\n migrationStatus: z\n .enum([\n 'native',\n 'within_district',\n 'within_state',\n 'inter_state',\n 'international',\n ])\n .optional(),\n\n /** Land ownership */\n landOwnership: z\n .enum([\n 'own_agricultural',\n 'own_residential',\n 'government_allotted',\n 'no_land',\n 'leased',\n 'other',\n ])\n .optional(),\n\n /** Primary income source */\n primaryIncomeSource: z\n .enum([\n 'agriculture',\n 'government_job',\n 'private_job',\n 'business',\n 'daily_wage',\n 'pension',\n 'remittance',\n 'no_fixed_income',\n 'other',\n ])\n .optional(),\n});\n\n// ─── Inferred types ─────────────────────────────────────────────────────────\n\nexport type Step12HouseholdInput = z.infer<typeof step12HouseholdSchema>;\n"]}
|