udp-schema 0.1.6 → 0.1.7

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 CHANGED
@@ -9,5 +9,7 @@ export { emptyStringToUndefined, optionalTrimmedString } from './helpers.js';
9
9
  export { assistedBySurveyorSchema, languageValueSchema, profilePhotoSchema, type Step01OnboardingFormInput, type Step01OnboardingInput, secondaryLanguageItemSchema, step01OnboardingSchema, } from './step-01.schema.js';
10
10
  export { optionalUrlSchema, type Step02ContactDetailsInput, step02ContactDetailsSchema, } from './step-02.schema.js';
11
11
  export { type AddressInput, addressSchema, areaRefSchema, type Step03ResidenceInput, step03ResidenceSchema, } from './step-03.schema.js';
12
+ export { type Step04IdentityInput, step04IdentitySchema, } from './step-04.schema.js';
12
13
  export { type Step05LeadershipInput, step05LeadershipSchema, } from './step-05.schema.js';
14
+ export { type Step06HouseholdInput, step06HouseholdSchema, } from './step-06.schema.js';
13
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAG7E,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,iBAAiB,EACjB,KAAK,yBAAyB,EAC9B,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,YAAY,EACjB,aAAa,EACb,aAAa,EACb,KAAK,oBAAoB,EACzB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,qBAAqB,EAC1B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAG7E,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,iBAAiB,EACjB,KAAK,yBAAyB,EAC9B,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,YAAY,EACjB,aAAa,EACb,aAAa,EACb,KAAK,oBAAoB,EACzB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,mBAAmB,EACxB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,qBAAqB,EAC1B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,oBAAoB,EACzB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -13,6 +13,10 @@ export { assistedBySurveyorSchema, languageValueSchema, profilePhotoSchema, seco
13
13
  export { optionalUrlSchema, step02ContactDetailsSchema, } from './step-02.schema.js';
14
14
  // Step 03 — Residence / Address
15
15
  export { addressSchema, areaRefSchema, step03ResidenceSchema, } from './step-03.schema.js';
16
+ // Step 04 — Identity & Social Profile
17
+ export { step04IdentitySchema, } from './step-04.schema.js';
16
18
  // Step 05 — Leadership, Contribution & Political Ambition
17
19
  export { step05LeadershipSchema, } from './step-05.schema.js';
20
+ // Step 06 — Household, Economic & Digital Profile
21
+ export { step06HouseholdSchema, } from './step-06.schema.js';
18
22
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,UAAU;AACV,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE7E,+BAA+B;AAC/B,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAGlB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,4BAA4B;AAC5B,OAAO,EACL,iBAAiB,EAEjB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,gCAAgC;AAChC,OAAO,EAEL,aAAa,EACb,aAAa,EAEb,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,0DAA0D;AAC1D,OAAO,EAEL,sBAAsB,GACvB,MAAM,qBAAqB,CAAC","sourcesContent":["/**\n * udp-schema — Shared Zod schemas for User Detailed Profile\n *\n * Single source of truth consumed by both survey-frontend and survey-backend.\n *\n * @module udp-schema\n */\n\n// Helpers\nexport { emptyStringToUndefined, optionalTrimmedString } from './helpers.js';\n\n// Step 01 — Profile Onboarding\nexport {\n assistedBySurveyorSchema,\n languageValueSchema,\n profilePhotoSchema,\n type Step01OnboardingFormInput,\n type Step01OnboardingInput,\n secondaryLanguageItemSchema,\n step01OnboardingSchema,\n} from './step-01.schema.js';\n\n// Step 02 — Contact Details\nexport {\n optionalUrlSchema,\n type Step02ContactDetailsInput,\n step02ContactDetailsSchema,\n} from './step-02.schema.js';\n\n// Step 03 — Residence / Address\nexport {\n type AddressInput,\n addressSchema,\n areaRefSchema,\n type Step03ResidenceInput,\n step03ResidenceSchema,\n} from './step-03.schema.js';\n\n// Step 05 — Leadership, Contribution & Political Ambition\nexport {\n type Step05LeadershipInput,\n step05LeadershipSchema,\n} from './step-05.schema.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,UAAU;AACV,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE7E,+BAA+B;AAC/B,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAGlB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,4BAA4B;AAC5B,OAAO,EACL,iBAAiB,EAEjB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,gCAAgC;AAChC,OAAO,EAEL,aAAa,EACb,aAAa,EAEb,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,sCAAsC;AACtC,OAAO,EAEL,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAE7B,0DAA0D;AAC1D,OAAO,EAEL,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,kDAAkD;AAClD,OAAO,EAEL,qBAAqB,GACtB,MAAM,qBAAqB,CAAC","sourcesContent":["/**\n * udp-schema — Shared Zod schemas for User Detailed Profile\n *\n * Single source of truth consumed by both survey-frontend and survey-backend.\n *\n * @module udp-schema\n */\n\n// Helpers\nexport { emptyStringToUndefined, optionalTrimmedString } from './helpers.js';\n\n// Step 01 — Profile Onboarding\nexport {\n assistedBySurveyorSchema,\n languageValueSchema,\n profilePhotoSchema,\n type Step01OnboardingFormInput,\n type Step01OnboardingInput,\n secondaryLanguageItemSchema,\n step01OnboardingSchema,\n} from './step-01.schema.js';\n\n// Step 02 — Contact Details\nexport {\n optionalUrlSchema,\n type Step02ContactDetailsInput,\n step02ContactDetailsSchema,\n} from './step-02.schema.js';\n\n// Step 03 — Residence / Address\nexport {\n type AddressInput,\n addressSchema,\n areaRefSchema,\n type Step03ResidenceInput,\n step03ResidenceSchema,\n} from './step-03.schema.js';\n\n// Step 04 — Identity & Social Profile\nexport {\n type Step04IdentityInput,\n step04IdentitySchema,\n} from './step-04.schema.js';\n\n// Step 05 — Leadership, Contribution & Political Ambition\nexport {\n type Step05LeadershipInput,\n step05LeadershipSchema,\n} from './step-05.schema.js';\n\n// Step 06 — Household, Economic & Digital Profile\nexport {\n type Step06HouseholdInput,\n step06HouseholdSchema,\n} from './step-06.schema.js';\n"]}
@@ -0,0 +1,54 @@
1
+ import { z } from 'zod';
2
+ export declare const step04IdentitySchema: z.ZodObject<{
3
+ familyReligion: z.ZodEnum<{
4
+ HINDU: "HINDU";
5
+ MUSLIM: "MUSLIM";
6
+ CHRISTIAN: "CHRISTIAN";
7
+ SIKH: "SIKH";
8
+ BUDDHIST: "BUDDHIST";
9
+ JAIN: "JAIN";
10
+ OTHER: "OTHER";
11
+ }>;
12
+ individualReligion: z.ZodEnum<{
13
+ HINDU: "HINDU";
14
+ MUSLIM: "MUSLIM";
15
+ CHRISTIAN: "CHRISTIAN";
16
+ SIKH: "SIKH";
17
+ BUDDHIST: "BUDDHIST";
18
+ JAIN: "JAIN";
19
+ OTHER: "OTHER";
20
+ SAME_AS_FAMILY: "SAME_AS_FAMILY";
21
+ }>;
22
+ casteCommunity: z.ZodOptional<z.ZodString>;
23
+ casteCategoryReservation: z.ZodEnum<{
24
+ SC: "SC";
25
+ ST: "ST";
26
+ OBC_NC: "OBC_NC";
27
+ OBC_C: "OBC_C";
28
+ EWS: "EWS";
29
+ GENERAL: "GENERAL";
30
+ DONT_KNOW: "DONT_KNOW";
31
+ PREFER_NOT_SAY: "PREFER_NOT_SAY";
32
+ }>;
33
+ minorityStatus: z.ZodEnum<{
34
+ NO: "NO";
35
+ RELIGIOUS: "RELIGIOUS";
36
+ LINGUISTIC: "LINGUISTIC";
37
+ NOT_SURE: "NOT_SURE";
38
+ }>;
39
+ tribalOrIndigenousAffiliation: z.ZodOptional<z.ZodString>;
40
+ facingCasteDiscrimination: z.ZodOptional<z.ZodEnum<{
41
+ PREFER_NOT_SAY: "PREFER_NOT_SAY";
42
+ NO: "NO";
43
+ YES_OFTEN: "YES_OFTEN";
44
+ YES_SOMETIMES: "YES_SOMETIMES";
45
+ }>>;
46
+ casteDiscriminationType: z.ZodOptional<z.ZodString>;
47
+ casteDiscriminationPlaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
48
+ viewOnLgbtqStatements: z.ZodOptional<z.ZodArray<z.ZodString>>;
49
+ viewOnLgbtqOpinion: z.ZodOptional<z.ZodString>;
50
+ viewOnTransgenderInclusionStatements: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
+ viewOnTransgenderInclusionOpinion: z.ZodOptional<z.ZodString>;
52
+ }, z.core.$strip>;
53
+ export type Step04IdentityInput = z.infer<typeof step04IdentitySchema>;
54
+ //# sourceMappingURL=step-04.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-04.schema.d.ts","sourceRoot":"","sources":["../src/step-04.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiE/B,CAAC;AAIH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { z } from 'zod';
2
+ // ─── Step 04 — Identity & Social Profile ─────────────────────────────────────
3
+ //
4
+ // Covers: religion, caste & community, minority/tribal status,
5
+ // discrimination experience, and views on LGBTQ+ / transgender inclusion.
6
+ // ─────────────────────────────────────────────────────────────────────────────
7
+ export const step04IdentitySchema = z.object({
8
+ // ── 4.1 Religion ─────────────────────────────────────────────────────────
9
+ /** Family religion */
10
+ familyReligion: z.enum(['HINDU', 'MUSLIM', 'CHRISTIAN', 'SIKH', 'BUDDHIST', 'JAIN', 'OTHER'], { message: 'Please select family religion.' }),
11
+ /** Individual religion (may differ from family) */
12
+ individualReligion: z.enum(['SAME_AS_FAMILY', 'HINDU', 'MUSLIM', 'CHRISTIAN', 'SIKH', 'BUDDHIST', 'JAIN', 'OTHER'], { message: 'Please select your religion.' }),
13
+ // ── 4.2 Caste & Community ────────────────────────────────────────────────
14
+ /** Caste / community (free text, optional) */
15
+ casteCommunity: z.string().trim().optional(),
16
+ /** Government reservation category */
17
+ casteCategoryReservation: z.enum(['SC', 'ST', 'OBC_NC', 'OBC_C', 'EWS', 'GENERAL', 'DONT_KNOW', 'PREFER_NOT_SAY'], { message: 'Please select your reservation category.' }),
18
+ /** Minority community status */
19
+ minorityStatus: z.enum(['NO', 'RELIGIOUS', 'LINGUISTIC', 'NOT_SURE'], { message: 'Please select if you are from a minority community.' }),
20
+ /** Tribal / indigenous community affiliation (optional free text) */
21
+ tribalOrIndigenousAffiliation: z.string().trim().optional(),
22
+ // ── 4.3 Discrimination Experience ────────────────────────────────────────
23
+ // Shown when casteCategoryReservation ∈ {SC, ST, OBC_NC, OBC_C}
24
+ /** Do you face social discrimination as SC/ST/OBC? */
25
+ facingCasteDiscrimination: z
26
+ .enum(['YES_OFTEN', 'YES_SOMETIMES', 'NO', 'PREFER_NOT_SAY'])
27
+ .optional(),
28
+ /** Free-text description of discrimination type */
29
+ casteDiscriminationType: z.string().trim().optional(),
30
+ /** Where does discrimination usually happen? */
31
+ casteDiscriminationPlaces: z.array(z.string()).optional(),
32
+ // ── 4.4 Social Views — LGBTQ+ ────────────────────────────────────────────
33
+ /** Agree-with statements about LGBTQ+ people (multi-select, optional) */
34
+ viewOnLgbtqStatements: z.array(z.string()).optional(),
35
+ /** Free-text personal view on LGBTQ+ (optional) */
36
+ viewOnLgbtqOpinion: z.string().trim().optional(),
37
+ // ── 4.5 Social Views — Transgender / Intersex ────────────────────────────
38
+ /** Agree-with statements about transgender / intersex children (multi-select, optional) */
39
+ viewOnTransgenderInclusionStatements: z.array(z.string()).optional(),
40
+ /** Free-text view on transgender / intersex treatment (optional) */
41
+ viewOnTransgenderInclusionOpinion: z.string().trim().optional(),
42
+ });
43
+ //# sourceMappingURL=step-04.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-04.schema.js","sourceRoot":"","sources":["../src/step-04.schema.ts"],"names":[],"mappings":"AAAA,OA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,CAAC;SACzB,IAAI,CAAC,CAAC,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;SAC5D,QAAQ,EAAE;IAEb,mDAAmD;IACnD,uBAAuB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAErD,gDAAgD;IAChD,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEzD,4EAA4E;IAE5E,yEAAyE;IACzE,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAErD,mDAAmD;IACnD,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAEhD,4EAA4E;IAE5E,2FAA2F;IAC3F,oCAAoC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEpE,oEAAoE;IACpE,iCAAiC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAChE,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n// ─── Step 04 — Identity & Social Profile ─────────────────────────────────────\n//\n// Covers: religion, caste & community, minority/tribal status,\n// discrimination experience, and views on LGBTQ+ / transgender inclusion.\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const step04IdentitySchema = z.object({\n\n // ── 4.1 Religion ─────────────────────────────────────────────────────────\n\n /** Family religion */\n familyReligion: z.enum(\n ['HINDU', 'MUSLIM', 'CHRISTIAN', 'SIKH', 'BUDDHIST', 'JAIN', 'OTHER'],\n { message: 'Please select family religion.' },\n ),\n\n /** Individual religion (may differ from family) */\n individualReligion: z.enum(\n ['SAME_AS_FAMILY', 'HINDU', 'MUSLIM', 'CHRISTIAN', 'SIKH', 'BUDDHIST', 'JAIN', 'OTHER'],\n { message: 'Please select your religion.' },\n ),\n\n // ── 4.2 Caste & Community ────────────────────────────────────────────────\n\n /** Caste / community (free text, optional) */\n casteCommunity: z.string().trim().optional(),\n\n /** Government reservation category */\n casteCategoryReservation: z.enum(\n ['SC', 'ST', 'OBC_NC', 'OBC_C', 'EWS', 'GENERAL', 'DONT_KNOW', 'PREFER_NOT_SAY'],\n { message: 'Please select your reservation category.' },\n ),\n\n /** Minority community status */\n minorityStatus: z.enum(\n ['NO', 'RELIGIOUS', 'LINGUISTIC', 'NOT_SURE'],\n { message: 'Please select if you are from a minority community.' },\n ),\n\n /** Tribal / indigenous community affiliation (optional free text) */\n tribalOrIndigenousAffiliation: z.string().trim().optional(),\n\n // ── 4.3 Discrimination Experience ────────────────────────────────────────\n // Shown when casteCategoryReservation ∈ {SC, ST, OBC_NC, OBC_C}\n\n /** Do you face social discrimination as SC/ST/OBC? */\n facingCasteDiscrimination: z\n .enum(['YES_OFTEN', 'YES_SOMETIMES', 'NO', 'PREFER_NOT_SAY'])\n .optional(),\n\n /** Free-text description of discrimination type */\n casteDiscriminationType: z.string().trim().optional(),\n\n /** Where does discrimination usually happen? */\n casteDiscriminationPlaces: z.array(z.string()).optional(),\n\n // ── 4.4 Social Views — LGBTQ+ ────────────────────────────────────────────\n\n /** Agree-with statements about LGBTQ+ people (multi-select, optional) */\n viewOnLgbtqStatements: z.array(z.string()).optional(),\n\n /** Free-text personal view on LGBTQ+ (optional) */\n viewOnLgbtqOpinion: z.string().trim().optional(),\n\n // ── 4.5 Social Views — Transgender / Intersex ────────────────────────────\n\n /** Agree-with statements about transgender / intersex children (multi-select, optional) */\n viewOnTransgenderInclusionStatements: z.array(z.string()).optional(),\n\n /** Free-text view on transgender / intersex treatment (optional) */\n viewOnTransgenderInclusionOpinion: z.string().trim().optional(),\n});\n\n// ─── Inferred types ──────────────────────────────────────────────────────────\n\nexport type Step04IdentityInput = z.infer<typeof step04IdentitySchema>;\n"]}
@@ -8,10 +8,10 @@
8
8
  import { z } from 'zod';
9
9
  export declare const step05LeadershipSchema: z.ZodObject<{
10
10
  desireToBeLeader: z.ZodEnum<{
11
+ NO: "NO";
11
12
  YES_STRONGLY: "YES_STRONGLY";
12
13
  YES_MAYBE: "YES_MAYBE";
13
14
  LATER: "LATER";
14
- NO: "NO";
15
15
  }>;
16
16
  desiredPoliticalPosition: z.ZodOptional<z.ZodArray<z.ZodString>>;
17
17
  politicalPartyJoiningIntent: z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"step-05.schema.d.ts","sourceRoot":"","sources":["../src/step-05.schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8DjC,CAAC;AAIH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"step-05.schema.d.ts","sourceRoot":"","sources":["../src/step-05.schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyDjC,CAAC;AAIH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -26,9 +26,7 @@ export const step05LeadershipSchema = z.object({
26
26
  /** 3.6 — Which strengths describe you? */
27
27
  leadershipSkillset: z.array(z.string()).optional(),
28
28
  /** 3.7 — How much exposure do you have to politics / public life? */
29
- politicalExposureLevel: z
30
- .enum(['VERY_HIGH', 'MODERATE', 'BASIC', 'NONE'])
31
- .optional(),
29
+ politicalExposureLevel: z.enum(['VERY_HIGH', 'MODERATE', 'BASIC', 'NONE']).optional(),
32
30
  /** 3.8 — Are you comfortable with public visibility? */
33
31
  publicVisibilityComfort: z.enum(['VERY_COMFORTABLE', 'SOMEWHAT_COMFORTABLE', 'LIMITED_VISIBILITY', 'NOT_COMFORTABLE'], { message: 'Please tell how comfortable you are with public visibility.' }),
34
32
  /** 3.9 — Are you interested in leadership mentoring & training? */
@@ -46,9 +44,6 @@ export const step05LeadershipSchema = z.object({
46
44
  .enum(['UP_TO_10', '10_TO_50', '50_TO_200', '200_TO_500', 'MORE_THAN_500'])
47
45
  .optional(),
48
46
  /** 3.12 — Why do you want to join this movement? */
49
- whyJoinMovement: z
50
- .string()
51
- .trim()
52
- .min(1, 'Please write why you want to join this movement.'),
47
+ whyJoinMovement: z.string().trim().min(1, 'Please write why you want to join this movement.'),
53
48
  });
54
49
  //# sourceMappingURL=step-05.schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"step-05.schema.js","sourceRoot":"","sources":["../src/step-05.schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2DAA2D;AAE3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,2CAA2C;IAC3C,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE;QACrE,OAAO,EAAE,0BAA0B;KACpC,CAAC;IAEF,yEAAyE;IACzE,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAExD,6DAA6D;IAC7D,2BAA2B,EAAE,CAAC,CAAC,IAAI,CACjC,CAAC,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,IAAI,EAAE,0BAA0B,CAAC,EAC/E,EAAE,OAAO,EAAE,0BAA0B,EAAE,CACxC;IAED,yDAAyD;I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,oDAAoD;IACpD,eAAe,EAAE,CAAC;SACf,MAAM,EAAE;SACR,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,EAAE,kDAAkD,CAAC;CAC9D,CAAC,CAAC","sourcesContent":["/**\n * Step 05 — Leadership, Contribution & Political Ambition\n *\n * Single source of truth used by both frontend and backend.\n *\n * @module udp-schema/step-05\n */\n\nimport { z } from 'zod';\n\n// ─── Main step-05 schema ────────────────────────────────\n\nexport const step05LeadershipSchema = z.object({\n /** 3.1 — Would you like to be a leader? */\n desireToBeLeader: z.enum(['YES_STRONGLY', 'YES_MAYBE', 'LATER', 'NO'], {\n message: 'Please select an answer.',\n }),\n\n /** 3.2 — Which leadership or elected roles would you like to aim for? */\n desiredPoliticalPosition: z.array(z.string()).optional(),\n\n /** 3.3 — Would you like to join our political wing/party? */\n politicalPartyJoiningIntent: z.enum(\n ['YES_FULLY', 'YES_NEED_INFO', 'MAYBE_LATER', 'NO', 'NO_OTHER_PARTY_PREFERRED'],\n { message: 'Please select an option.' },\n ),\n\n /** 3.4 — If not our party, which party? (conditional) */\n preferredPartyIfNotUs: z.string().trim().optional(),\n\n /** 3.5 — What changes would you bring? */\n visionChangesYouWillBring: z\n .string()\n .trim()\n .min(1, 'Please briefly describe what changes you want to bring.'),\n\n /** 3.6 — Which strengths describe you? */\n leadershipSkillset: z.array(z.string()).optional(),\n\n /** 3.7 — How much exposure do you have to politics / public life? */\n politicalExposureLevel: z\n .enum(['VERY_HIGH', 'MODERATE', 'BASIC', 'NONE'])\n .optional(),\n\n /** 3.8 — Are you comfortable with public visibility? */\n publicVisibilityComfort: z.enum(\n ['VERY_COMFORTABLE', 'SOMEWHAT_COMFORTABLE', 'LIMITED_VISIBILITY', 'NOT_COMFORTABLE'],\n { message: 'Please tell how comfortable you are with public visibility.' },\n ),\n\n /** 3.9 — Are you interested in leadership mentoring & training? */\n leadershipTrainingInterest: z.enum(['YES', 'NO', 'MAYBE'], {\n message: 'Please select an answer.',\n }),\n\n /** 3.10 — Have you ever led a team, group or community? */\n pastLeadershipRoles: z.enum(['YES', 'NO']).optional(),\n\n /** 3.10 — Describe past leadership roles (shown when pastLeadershipRoles == YES) */\n previousLeadershipDescription: z.string().trim().optional(),\n\n /** 3.10 — Any achievements you are proud of? (shown when pastLeadershipRoles == YES) */\n leadershipAchievements: z.string().trim().optional(),\n\n /** 3.11 — Approximately how many people follow your opinion? */\n socialInfluenceLevel: z\n .enum(['UP_TO_10', '10_TO_50', '50_TO_200', '200_TO_500', 'MORE_THAN_500'])\n .optional(),\n\n /** 3.12 — Why do you want to join this movement? */\n whyJoinMovement: z\n .string()\n .trim()\n .min(1, 'Please write why you want to join this movement.'),\n});\n\n// ─── Inferred types ─────────────────────────────────────\n\nexport type Step05LeadershipInput = z.infer<typeof step05LeadershipSchema>;\n"]}
1
+ {"version":3,"file":"step-05.schema.js","sourceRoot":"","sources":["../src/step-05.schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2DAA2D;AAE3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,2CAA2C;IAC3C,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE;QACrE,OAAO,EAAE,0BAA0B;KACpC,CAAC;IAEF,yEAAyE;IACzE,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAExD,6DAA6D;IAC7D,2BAA2B,EAAE,CAAC,CAAC,IAAI,CACjC,CAAC,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,IAAI,EAAE,0BAA0B,CAAC,EAC/E,EAAE,OAAO,EAAE,0BAA0B,EAAE,CACxC;IAED,yDAAyD;IACzD,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EA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IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,kDAAkD,CAAC;CAC9F,CAAC,CAAC","sourcesContent":["/**\n * Step 05 — Leadership, Contribution & Political Ambition\n *\n * Single source of truth used by both frontend and backend.\n *\n * @module udp-schema/step-05\n */\n\nimport { z } from 'zod';\n\n// ─── Main step-05 schema ────────────────────────────────\n\nexport const step05LeadershipSchema = z.object({\n /** 3.1 — Would you like to be a leader? */\n desireToBeLeader: z.enum(['YES_STRONGLY', 'YES_MAYBE', 'LATER', 'NO'], {\n message: 'Please select an answer.',\n }),\n\n /** 3.2 — Which leadership or elected roles would you like to aim for? */\n desiredPoliticalPosition: z.array(z.string()).optional(),\n\n /** 3.3 — Would you like to join our political wing/party? */\n politicalPartyJoiningIntent: z.enum(\n ['YES_FULLY', 'YES_NEED_INFO', 'MAYBE_LATER', 'NO', 'NO_OTHER_PARTY_PREFERRED'],\n { message: 'Please select an option.' },\n ),\n\n /** 3.4 — If not our party, which party? (conditional) */\n preferredPartyIfNotUs: z.string().trim().optional(),\n\n /** 3.5 — What changes would you bring? */\n visionChangesYouWillBring: z\n .string()\n .trim()\n .min(1, 'Please briefly describe what changes you want to bring.'),\n\n /** 3.6 — Which strengths describe you? */\n leadershipSkillset: z.array(z.string()).optional(),\n\n /** 3.7 — How much exposure do you have to politics / public life? */\n politicalExposureLevel: z.enum(['VERY_HIGH', 'MODERATE', 'BASIC', 'NONE']).optional(),\n\n /** 3.8 — Are you comfortable with public visibility? */\n publicVisibilityComfort: z.enum(\n ['VERY_COMFORTABLE', 'SOMEWHAT_COMFORTABLE', 'LIMITED_VISIBILITY', 'NOT_COMFORTABLE'],\n { message: 'Please tell how comfortable you are with public visibility.' },\n ),\n\n /** 3.9 — Are you interested in leadership mentoring & training? */\n leadershipTrainingInterest: z.enum(['YES', 'NO', 'MAYBE'], {\n message: 'Please select an answer.',\n }),\n\n /** 3.10 — Have you ever led a team, group or community? */\n pastLeadershipRoles: z.enum(['YES', 'NO']).optional(),\n\n /** 3.10 — Describe past leadership roles (shown when pastLeadershipRoles == YES) */\n previousLeadershipDescription: z.string().trim().optional(),\n\n /** 3.10 — Any achievements you are proud of? (shown when pastLeadershipRoles == YES) */\n leadershipAchievements: z.string().trim().optional(),\n\n /** 3.11 — Approximately how many people follow your opinion? */\n socialInfluenceLevel: z\n .enum(['UP_TO_10', '10_TO_50', '50_TO_200', '200_TO_500', 'MORE_THAN_500'])\n .optional(),\n\n /** 3.12 — Why do you want to join this movement? */\n whyJoinMovement: z.string().trim().min(1, 'Please write why you want to join this movement.'),\n});\n\n// ─── Inferred types ─────────────────────────────────────\n\nexport type Step05LeadershipInput = z.infer<typeof step05LeadershipSchema>;\n"]}
@@ -0,0 +1,123 @@
1
+ import { z } from 'zod';
2
+ export declare const step06HouseholdSchema: z.ZodObject<{
3
+ bornPlaceDetail: z.ZodString;
4
+ areYouMigrant: z.ZodEnum<{
5
+ NO: "NO";
6
+ YES: "YES";
7
+ }>;
8
+ migrantFromStateDistrict: z.ZodOptional<z.ZodString>;
9
+ bloodRelativesOtherState: z.ZodOptional<z.ZodEnum<{
10
+ NO: "NO";
11
+ NOT_SURE: "NOT_SURE";
12
+ YES: "YES";
13
+ }>>;
14
+ bloodRelativesOtherCountry: z.ZodOptional<z.ZodEnum<{
15
+ NO: "NO";
16
+ NOT_SURE: "NOT_SURE";
17
+ YES: "YES";
18
+ }>>;
19
+ bloodRelativesNri: z.ZodOptional<z.ZodEnum<{
20
+ NO: "NO";
21
+ NOT_SURE: "NOT_SURE";
22
+ YES: "YES";
23
+ }>>;
24
+ areYouNri: z.ZodOptional<z.ZodEnum<{
25
+ NO: "NO";
26
+ YES: "YES";
27
+ FORMER_NRI: "FORMER_NRI";
28
+ }>>;
29
+ internationalMigrationHistory: z.ZodOptional<z.ZodString>;
30
+ maritalStatus: z.ZodEnum<{
31
+ OTHER: "OTHER";
32
+ SINGLE: "SINGLE";
33
+ ENGAGED: "ENGAGED";
34
+ MARRIED: "MARRIED";
35
+ DIVORCED: "DIVORCED";
36
+ WIDOWED: "WIDOWED";
37
+ }>;
38
+ planningMarriageTimeline: z.ZodOptional<z.ZodEnum<{
39
+ NOT_THINKING: "NOT_THINKING";
40
+ WITHIN_1_YEAR: "WITHIN_1_YEAR";
41
+ WITHIN_2_YEARS: "WITHIN_2_YEARS";
42
+ AFTER_2_YEARS: "AFTER_2_YEARS";
43
+ ALREADY_MARRIED: "ALREADY_MARRIED";
44
+ }>>;
45
+ lookingForMarriagePartner: z.ZodOptional<z.ZodEnum<{
46
+ NO: "NO";
47
+ YES_ACTIVE: "YES_ACTIVE";
48
+ YES_CASUAL: "YES_CASUAL";
49
+ FAMILY_LOOKING: "FAMILY_LOOKING";
50
+ }>>;
51
+ familyStructureType: z.ZodEnum<{
52
+ NUCLEAR: "NUCLEAR";
53
+ JOINT: "JOINT";
54
+ EXTENDED: "EXTENDED";
55
+ SINGLE_PERSON: "SINGLE_PERSON";
56
+ }>;
57
+ householdSize: z.ZodCoercedNumber<unknown>;
58
+ housingType: z.ZodEnum<{
59
+ OTHER: "OTHER";
60
+ KUTCHA: "KUTCHA";
61
+ SEMI_PUCCA: "SEMI_PUCCA";
62
+ PUCCA: "PUCCA";
63
+ APARTMENT: "APARTMENT";
64
+ }>;
65
+ familyMemberSettledElsewhere: z.ZodOptional<z.ZodEnum<{
66
+ NO: "NO";
67
+ NOT_SURE: "NOT_SURE";
68
+ YES: "YES";
69
+ }>>;
70
+ bplRationCardHolder: z.ZodOptional<z.ZodEnum<{
71
+ NO: "NO";
72
+ NOT_SURE: "NOT_SURE";
73
+ YES: "YES";
74
+ }>>;
75
+ hasLifeInsurance: z.ZodOptional<z.ZodEnum<{
76
+ NO: "NO";
77
+ NOT_SURE: "NOT_SURE";
78
+ YES: "YES";
79
+ }>>;
80
+ lifeInsuranceDetails: z.ZodOptional<z.ZodString>;
81
+ annualPersonalIncomeRange: z.ZodEnum<{
82
+ PREFER_NOT_SAY: "PREFER_NOT_SAY";
83
+ BELOW_1L: "BELOW_1L";
84
+ "1_2L": "1_2L";
85
+ "2_3L": "2_3L";
86
+ "3_5L": "3_5L";
87
+ "5_10L": "5_10L";
88
+ ABOVE_10L: "ABOVE_10L";
89
+ NO_INCOME: "NO_INCOME";
90
+ }>;
91
+ annualHouseholdIncomeRange: z.ZodEnum<{
92
+ PREFER_NOT_SAY: "PREFER_NOT_SAY";
93
+ BELOW_1L: "BELOW_1L";
94
+ "1_2L": "1_2L";
95
+ "2_3L": "2_3L";
96
+ "3_5L": "3_5L";
97
+ "5_10L": "5_10L";
98
+ "10_20L": "10_20L";
99
+ ABOVE_20L: "ABOVE_20L";
100
+ }>;
101
+ digitalAccess: z.ZodArray<z.ZodString>;
102
+ digitalSkillLevel: z.ZodEnum<{
103
+ BASIC: "BASIC";
104
+ CANT_USE_SMARTPHONE: "CANT_USE_SMARTPHONE";
105
+ COMFORTABLE_APPS_UPI: "COMFORTABLE_APPS_UPI";
106
+ ADVANCED_TOOLS_CONTENT: "ADVANCED_TOOLS_CONTENT";
107
+ }>;
108
+ literacyLevel: z.ZodEnum<{
109
+ CANT_READ_WRITE: "CANT_READ_WRITE";
110
+ CAN_READ_ONLY: "CAN_READ_ONLY";
111
+ READ_WRITE_BASIC: "READ_WRITE_BASIC";
112
+ FLUENT_ONE_LANGUAGE: "FLUENT_ONE_LANGUAGE";
113
+ }>;
114
+ caregivingResponsibilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
115
+ caregivingHoursPerDay: z.ZodOptional<z.ZodEnum<{
116
+ LESS_THAN_1: "LESS_THAN_1";
117
+ "1_TO_3": "1_TO_3";
118
+ "3_TO_6": "3_TO_6";
119
+ MORE_THAN_6: "MORE_THAN_6";
120
+ }>>;
121
+ }, z.core.$strip>;
122
+ export type Step06HouseholdInput = z.infer<typeof step06HouseholdSchema>;
123
+ //# sourceMappingURL=step-06.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-06.schema.d.ts","sourceRoot":"","sources":["../src/step-06.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwHhC,CAAC;AAIH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { z } from 'zod';
2
+ // ─── Step 06 — Household, Economic & Digital Profile ─────────────────────────
3
+ //
4
+ // Covers: origins & migration, marital life, household & housing,
5
+ // economic status (income / BPL / insurance), digital access & literacy,
6
+ // and caregiving responsibilities.
7
+ // ─────────────────────────────────────────────────────────────────────────────
8
+ export const step06HouseholdSchema = z.object({
9
+ // ── 6.1 Origins & Migration ───────────────────────────────────────────────
10
+ /** Place / city / village where the person was born */
11
+ bornPlaceDetail: z.string().trim().min(1, 'Please enter your birthplace.'),
12
+ /** Is this person living away from birthplace? */
13
+ areYouMigrant: z.enum(['YES', 'NO'], {
14
+ message: 'Please indicate if you are a migrant.',
15
+ }),
16
+ /** State and district migrated from (conditional: areYouMigrant == YES) */
17
+ migrantFromStateDistrict: z.string().trim().optional(),
18
+ /** Blood relatives in other Indian states? */
19
+ bloodRelativesOtherState: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
20
+ /** Blood relatives in other countries? */
21
+ bloodRelativesOtherCountry: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
22
+ /** Are any of those relatives NRIs? */
23
+ bloodRelativesNri: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
24
+ /** Is this person an NRI? */
25
+ areYouNri: z.enum(['YES', 'NO', 'FORMER_NRI']).optional(),
26
+ /** Brief international migration history (optional free text) */
27
+ internationalMigrationHistory: z.string().trim().optional(),
28
+ // ── 6.2 Marital Life ──────────────────────────────────────────────────────
29
+ /** Current marital status */
30
+ maritalStatus: z.enum(['SINGLE', 'ENGAGED', 'MARRIED', 'DIVORCED', 'WIDOWED', 'OTHER'], { message: 'Please select marital status.' }),
31
+ /** Marriage timeline (conditional: maritalStatus != MARRIED) */
32
+ planningMarriageTimeline: z
33
+ .enum(['NOT_THINKING', 'WITHIN_1_YEAR', 'WITHIN_2_YEARS', 'AFTER_2_YEARS', 'ALREADY_MARRIED'])
34
+ .optional(),
35
+ /** Actively looking for a marriage partner? */
36
+ lookingForMarriagePartner: z
37
+ .enum(['NO', 'YES_ACTIVE', 'YES_CASUAL', 'FAMILY_LOOKING'])
38
+ .optional(),
39
+ // ── 6.3 Household & Housing ───────────────────────────────────────────────
40
+ /** Family/household type */
41
+ familyStructureType: z.enum(['NUCLEAR', 'JOINT', 'EXTENDED', 'SINGLE_PERSON'], { message: 'Please select family type.' }),
42
+ /** Number of people sharing the same kitchen */
43
+ householdSize: z.coerce
44
+ .number({ message: 'Please enter a valid number.' })
45
+ .int()
46
+ .min(1, 'Household size must be at least 1.'),
47
+ /** Type of house structure */
48
+ housingType: z.enum(['KUTCHA', 'SEMI_PUCCA', 'PUCCA', 'APARTMENT', 'OTHER'], { message: 'Please select housing type.' }),
49
+ /** Close family member settled in another state or abroad? */
50
+ familyMemberSettledElsewhere: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
51
+ // ── 6.4 Economic Status ───────────────────────────────────────────────────
52
+ /** BPL (Below Poverty Line) ration card holder? */
53
+ bplRationCardHolder: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
54
+ /** Has life insurance? */
55
+ hasLifeInsurance: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
56
+ /** Insurance details (conditional: hasLifeInsurance == YES) */
57
+ lifeInsuranceDetails: z.string().trim().optional(),
58
+ /** Annual personal income range */
59
+ annualPersonalIncomeRange: z.enum(['BELOW_1L', '1_2L', '2_3L', '3_5L', '5_10L', 'ABOVE_10L', 'NO_INCOME', 'PREFER_NOT_SAY'], { message: 'Please select your personal income range.' }),
60
+ /** Annual household income range */
61
+ annualHouseholdIncomeRange: z.enum(['BELOW_1L', '1_2L', '2_3L', '3_5L', '5_10L', '10_20L', 'ABOVE_20L', 'PREFER_NOT_SAY'], { message: 'Please select household income range.' }),
62
+ // ── 6.5 Digital Access & Literacy ─────────────────────────────────────────
63
+ /** Which devices / connectivity options does this person have? */
64
+ digitalAccess: z.array(z.string()).min(1, 'Please select at least one option.'),
65
+ /** Self-assessed digital skill level */
66
+ digitalSkillLevel: z.enum(['CANT_USE_SMARTPHONE', 'BASIC', 'COMFORTABLE_APPS_UPI', 'ADVANCED_TOOLS_CONTENT'], { message: 'Please select your digital skill level.' }),
67
+ /** Reading & writing ability */
68
+ literacyLevel: z.enum(['CANT_READ_WRITE', 'CAN_READ_ONLY', 'READ_WRITE_BASIC', 'FLUENT_ONE_LANGUAGE'], { message: 'Please select your literacy level.' }),
69
+ // ── 6.6 Caregiving ────────────────────────────────────────────────────────
70
+ /** Who does this person regularly care for? */
71
+ caregivingResponsibilities: z.array(z.string()).optional(),
72
+ /** Average daily caregiving hours (optional) */
73
+ caregivingHoursPerDay: z
74
+ .enum(['LESS_THAN_1', '1_TO_3', '3_TO_6', 'MORE_THAN_6'])
75
+ .optional(),
76
+ });
77
+ //# sourceMappingURL=step-06.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-06.schema.js","sourceRoot":"","sources":["../src/step-06.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAChF,EAAE;AACF,kEAAkE;AAClE,yEAAyE;AACzE,mCAAmC;AACnC,gFAAgF;AAEhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAE5C,6EAA6E;IAE7E,uDAAuD;IACvD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EA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AE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,EACzF,EAAE,OAAO,EAAE,2CAA2C,EAAE,CACzD;IAED,oCAAoC;IACpC,0BAA0B,EAAE,CAAC,CAAC,IAAI,CAChC,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,CAAC,EACtF,EAAE,OAAO,EAAE,uCAAuC,EAAE,CACrD;IAED,6EAA6E;IAE7E,kEAAkE;IAClE,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,oCAAoC,CAAC;IAE/E,wCAAwC;IACxC,iBAAiB,EAAE,CAAC,CAAC,IAAI,CACvB,CAAC,qBAAqB,EAAE,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,CAAC,EAClF,EAAE,OAAO,EAAE,yCAAyC,EAAE,CACvD;IAED,gCAAgC;IAChC,aAAa,EAAE,CAAC,CAAC,IAAI,CACnB,CAAC,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAE,qBAAqB,CAAC,EAC/E,EAAE,OAAO,EAAE,oCAAoC,EAAE,CAClD;IAED,6EAA6E;IAE7E,+CAA+C;IAC/C,0BAA0B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAE1D,gDAAgD;IAChD,qBAAqB,EAAE,CAAC;SACrB,IAAI,CAAC,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;SACxD,QAAQ,EAAE;CACd,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n// ─── Step 06 — Household, Economic & Digital Profile ─────────────────────────\n//\n// Covers: origins & migration, marital life, household & housing,\n// economic status (income / BPL / insurance), digital access & literacy,\n// and caregiving responsibilities.\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const step06HouseholdSchema = z.object({\n\n // ── 6.1 Origins & Migration ───────────────────────────────────────────────\n\n /** Place / city / village where the person was born */\n bornPlaceDetail: z.string().trim().min(1, 'Please enter your birthplace.'),\n\n /** Is this person living away from birthplace? */\n areYouMigrant: z.enum(['YES', 'NO'], {\n message: 'Please indicate if you are a migrant.',\n }),\n\n /** State and district migrated from (conditional: areYouMigrant == YES) */\n migrantFromStateDistrict: z.string().trim().optional(),\n\n /** Blood relatives in other Indian states? */\n bloodRelativesOtherState: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n /** Blood relatives in other countries? */\n bloodRelativesOtherCountry: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n /** Are any of those relatives NRIs? */\n bloodRelativesNri: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n /** Is this person an NRI? */\n areYouNri: z.enum(['YES', 'NO', 'FORMER_NRI']).optional(),\n\n /** Brief international migration history (optional free text) */\n internationalMigrationHistory: z.string().trim().optional(),\n\n // ── 6.2 Marital Life ──────────────────────────────────────────────────────\n\n /** Current marital status */\n maritalStatus: z.enum(\n ['SINGLE', 'ENGAGED', 'MARRIED', 'DIVORCED', 'WIDOWED', 'OTHER'],\n { message: 'Please select marital status.' },\n ),\n\n /** Marriage timeline (conditional: maritalStatus != MARRIED) */\n planningMarriageTimeline: z\n .enum(['NOT_THINKING', 'WITHIN_1_YEAR', 'WITHIN_2_YEARS', 'AFTER_2_YEARS', 'ALREADY_MARRIED'])\n .optional(),\n\n /** Actively looking for a marriage partner? */\n lookingForMarriagePartner: z\n .enum(['NO', 'YES_ACTIVE', 'YES_CASUAL', 'FAMILY_LOOKING'])\n .optional(),\n\n // ── 6.3 Household & Housing ───────────────────────────────────────────────\n\n /** Family/household type */\n familyStructureType: z.enum(\n ['NUCLEAR', 'JOINT', 'EXTENDED', 'SINGLE_PERSON'],\n { message: 'Please select family type.' },\n ),\n\n /** Number of people sharing the same kitchen */\n householdSize: z.coerce\n .number({ message: 'Please enter a valid number.' })\n .int()\n .min(1, 'Household size must be at least 1.'),\n\n /** Type of house structure */\n housingType: z.enum(\n ['KUTCHA', 'SEMI_PUCCA', 'PUCCA', 'APARTMENT', 'OTHER'],\n { message: 'Please select housing type.' },\n ),\n\n /** Close family member settled in another state or abroad? */\n familyMemberSettledElsewhere: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n // ── 6.4 Economic Status ───────────────────────────────────────────────────\n\n /** BPL (Below Poverty Line) ration card holder? */\n bplRationCardHolder: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n /** Has life insurance? */\n hasLifeInsurance: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n /** Insurance details (conditional: hasLifeInsurance == YES) */\n lifeInsuranceDetails: z.string().trim().optional(),\n\n /** Annual personal income range */\n annualPersonalIncomeRange: z.enum(\n ['BELOW_1L', '1_2L', '2_3L', '3_5L', '5_10L', 'ABOVE_10L', 'NO_INCOME', 'PREFER_NOT_SAY'],\n { message: 'Please select your personal income range.' },\n ),\n\n /** Annual household income range */\n annualHouseholdIncomeRange: z.enum(\n ['BELOW_1L', '1_2L', '2_3L', '3_5L', '5_10L', '10_20L', 'ABOVE_20L', 'PREFER_NOT_SAY'],\n { message: 'Please select household income range.' },\n ),\n\n // ── 6.5 Digital Access & Literacy ─────────────────────────────────────────\n\n /** Which devices / connectivity options does this person have? */\n digitalAccess: z.array(z.string()).min(1, 'Please select at least one option.'),\n\n /** Self-assessed digital skill level */\n digitalSkillLevel: z.enum(\n ['CANT_USE_SMARTPHONE', 'BASIC', 'COMFORTABLE_APPS_UPI', 'ADVANCED_TOOLS_CONTENT'],\n { message: 'Please select your digital skill level.' },\n ),\n\n /** Reading & writing ability */\n literacyLevel: z.enum(\n ['CANT_READ_WRITE', 'CAN_READ_ONLY', 'READ_WRITE_BASIC', 'FLUENT_ONE_LANGUAGE'],\n { message: 'Please select your literacy level.' },\n ),\n\n // ── 6.6 Caregiving ────────────────────────────────────────────────────────\n\n /** Who does this person regularly care for? */\n caregivingResponsibilities: z.array(z.string()).optional(),\n\n /** Average daily caregiving hours (optional) */\n caregivingHoursPerDay: z\n .enum(['LESS_THAN_1', '1_TO_3', '3_TO_6', 'MORE_THAN_6'])\n .optional(),\n});\n\n// ─── Inferred types ──────────────────────────────────────────────────────────\n\nexport type Step06HouseholdInput = z.infer<typeof step06HouseholdSchema>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "udp-schema",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Shared Zod schemas for User Detailed Profile (frontend + backend).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",