udp-schema 0.1.15 → 0.1.17
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 +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/step-10.schema.d.ts.map +1 -1
- package/dist/step-10.schema.js +25 -6
- package/dist/step-10.schema.js.map +1 -1
- package/dist/step-11.schema.d.ts +96 -0
- package/dist/step-11.schema.d.ts.map +1 -0
- package/dist/step-11.schema.js +115 -0
- package/dist/step-11.schema.js.map +1 -0
- package/dist/step-12.schema.d.ts +103 -0
- package/dist/step-12.schema.d.ts.map +1 -0
- package/dist/step-12.schema.js +137 -0
- package/dist/step-12.schema.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16,4 +16,6 @@ export { type CertificateEntryInput, certificateEntrySchema, type DegreeEntryInp
|
|
|
16
16
|
export { type Step08EmploymentInput, step08EmploymentSchema, } from './step-08.schema.js';
|
|
17
17
|
export { type Step09NeurodiversityInput, step09NeurodiversitySchema, } from './step-09.schema.js';
|
|
18
18
|
export { type Step10PsychologicalInput, step10PsychologicalSchema, } from './step-10.schema.js';
|
|
19
|
+
export { type Step11PoliticalInput, step11PoliticalSchema, } from './step-11.schema.js';
|
|
20
|
+
export { type Step12ElectoralInput, step12ElectoralSchema, } from './step-12.schema.js';
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B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iB,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;AAG7B,OAAO,EACL,KAAK,qBAAqB,EAC1B,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,qBAAqB,EAC1B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,yBAAyB,EAC9B,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,wBAAwB,EAC7B,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,oBAAoB,EACzB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,oBAAoB,EACzB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -27,4 +27,8 @@ export { step08EmploymentSchema, } from './step-08.schema.js';
|
|
|
27
27
|
export { step09NeurodiversitySchema, } from './step-09.schema.js';
|
|
28
28
|
// Step 10 — Psychological Assessments
|
|
29
29
|
export { step10PsychologicalSchema, } from './step-10.schema.js';
|
|
30
|
+
// Step 11 — Political Association & History
|
|
31
|
+
export { step11PoliticalSchema, } from './step-11.schema.js';
|
|
32
|
+
// Step 12 — Electoral Details
|
|
33
|
+
export { step12ElectoralSchema, } from './step-12.schema.js';
|
|
30
34
|
//# 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,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAEtB,+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;AAE7B,8BAA8B;AAC9B,OAAO,EAEL,sBAAsB,EAEtB,iBAAiB,EAEjB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,oCAAoC;AACpC,OAAO,EAEL,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,8CAA8C;AAC9C,OAAO,EAEL,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,sCAAsC;AACtC,OAAO,EAEL,yBAAyB,GAC1B,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 {\n emptyStringToUndefined,\n optionalPhoneSchema,\n optionalTrimmedString,\n optionalYearSchema,\n} 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\n// Step 07 — Education History\nexport {\n type CertificateEntryInput,\n certificateEntrySchema,\n type DegreeEntryInput,\n degreeEntrySchema,\n type Step07EducationInput,\n step07EducationSchema,\n} from './step-07.schema.js';\n\n// Step 08 — Employment & Occupation\nexport {\n type Step08EmploymentInput,\n step08EmploymentSchema,\n} from './step-08.schema.js';\n\n// Step 09 — Neurodiversity & Learning Profile\nexport {\n type Step09NeurodiversityInput,\n step09NeurodiversitySchema,\n} from './step-09.schema.js';\n\n// Step 10 — Psychological Assessments\nexport {\n type Step10PsychologicalInput,\n step10PsychologicalSchema,\n} from './step-10.schema.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,UAAU;AACV,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAEtB,+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;AAE7B,8BAA8B;AAC9B,OAAO,EAEL,sBAAsB,EAEtB,iBAAiB,EAEjB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,oCAAoC;AACpC,OAAO,EAEL,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,8CAA8C;AAC9C,OAAO,EAEL,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,sCAAsC;AACtC,OAAO,EAEL,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAE7B,4CAA4C;AAC5C,OAAO,EAEL,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,8BAA8B;AAC9B,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 {\n emptyStringToUndefined,\n optionalPhoneSchema,\n optionalTrimmedString,\n optionalYearSchema,\n} 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\n// Step 07 — Education History\nexport {\n type CertificateEntryInput,\n certificateEntrySchema,\n type DegreeEntryInput,\n degreeEntrySchema,\n type Step07EducationInput,\n step07EducationSchema,\n} from './step-07.schema.js';\n\n// Step 08 — Employment & Occupation\nexport {\n type Step08EmploymentInput,\n step08EmploymentSchema,\n} from './step-08.schema.js';\n\n// Step 09 — Neurodiversity & Learning Profile\nexport {\n type Step09NeurodiversityInput,\n step09NeurodiversitySchema,\n} from './step-09.schema.js';\n\n// Step 10 — Psychological Assessments\nexport {\n type Step10PsychologicalInput,\n step10PsychologicalSchema,\n} from './step-10.schema.js';\n\n// Step 11 — Political Association & History\nexport {\n type Step11PoliticalInput,\n step11PoliticalSchema,\n} from './step-11.schema.js';\n\n// Step 12 — Electoral Details\nexport {\n type Step12ElectoralInput,\n step12ElectoralSchema,\n} from './step-12.schema.js';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-10.schema.d.ts","sourceRoot":"","sources":["../src/step-10.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AACH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"step-10.schema.d.ts","sourceRoot":"","sources":["../src/step-10.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AACH,eAAO,MAAM,UAAU,uJAkBb,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,eAAe,iHAWlB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,iBAAiB,mGAMpB,CAAC;AAEX,+FAA+F;AAC/F,eAAO,MAAM,aAAa,2CAA4C,CAAC;AAEvE,eAAO,MAAM,2BAA2B,oFAK9B,CAAC;AAmBX,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwDpC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
package/dist/step-10.schema.js
CHANGED
|
@@ -5,10 +5,22 @@ import { z } from 'zod';
|
|
|
5
5
|
* Using a chip selector rather than free text prevents typos and enables analytics.
|
|
6
6
|
*/
|
|
7
7
|
export const MBTI_TYPES = [
|
|
8
|
-
'INTJ',
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
'
|
|
8
|
+
'INTJ',
|
|
9
|
+
'INTP',
|
|
10
|
+
'ENTJ',
|
|
11
|
+
'ENTP',
|
|
12
|
+
'INFJ',
|
|
13
|
+
'INFP',
|
|
14
|
+
'ENFJ',
|
|
15
|
+
'ENFP',
|
|
16
|
+
'ISTJ',
|
|
17
|
+
'ISFJ',
|
|
18
|
+
'ESTJ',
|
|
19
|
+
'ESFJ',
|
|
20
|
+
'ISTP',
|
|
21
|
+
'ISFP',
|
|
22
|
+
'ESTP',
|
|
23
|
+
'ESFP',
|
|
12
24
|
'NOT_SURE',
|
|
13
25
|
];
|
|
14
26
|
/**
|
|
@@ -16,8 +28,15 @@ export const MBTI_TYPES = [
|
|
|
16
28
|
* Simplified to base type + NOT_SURE for accessibility.
|
|
17
29
|
*/
|
|
18
30
|
export const ENNEAGRAM_TYPES = [
|
|
19
|
-
'TYPE_1',
|
|
20
|
-
'
|
|
31
|
+
'TYPE_1',
|
|
32
|
+
'TYPE_2',
|
|
33
|
+
'TYPE_3',
|
|
34
|
+
'TYPE_4',
|
|
35
|
+
'TYPE_5',
|
|
36
|
+
'TYPE_6',
|
|
37
|
+
'TYPE_7',
|
|
38
|
+
'TYPE_8',
|
|
39
|
+
'TYPE_9',
|
|
21
40
|
'NOT_SURE',
|
|
22
41
|
];
|
|
23
42
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-10.schema.js","sourceRoot":"","sources":["../src/step-10.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iFAAiF;AAEjF;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM,
|
|
1
|
+
{"version":3,"file":"step-10.schema.js","sourceRoot":"","sources":["../src/step-10.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iFAAiF;AAEjF;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,UAAU;CACF,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,Q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AE1C,8EAA8E;IAC9E,UAAU,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IACvC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAE5C,6EAA6E;IAC7E;;;OAGG;IACH,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;IACjD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,8BAA8B;IAC3E,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAE7C,8EAA8E;IAC9E;;;OAGG;IACH,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;IAErD,8EAA8E;IAC9E,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IAE7C,6EAA6E;IAC7E;;;OAGG;IACH,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACpD,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAEnD,6EAA6E;IAC7E;;;OAGG;IACH,wBAAwB,EAAE,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,QAAQ,EAAE;IAExE;;;OAGG;IACH,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE;IAEvD,kEAAkE;IAClE,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n// ─── Enums ────────────────────────────────────────────────────────────────────\n\n/**\n * All 16 MBTI personality types plus NOT_SURE.\n * Using a chip selector rather than free text prevents typos and enables analytics.\n */\nexport const MBTI_TYPES = [\n 'INTJ',\n 'INTP',\n 'ENTJ',\n 'ENTP',\n 'INFJ',\n 'INFP',\n 'ENFJ',\n 'ENFP',\n 'ISTJ',\n 'ISFJ',\n 'ESTJ',\n 'ESFJ',\n 'ISTP',\n 'ISFP',\n 'ESTP',\n 'ESFP',\n 'NOT_SURE',\n] as const;\n\n/**\n * Enneagram types 1–9 plus subtypes for wing notation (e.g. 4w5).\n * Simplified to base type + NOT_SURE for accessibility.\n */\nexport const ENNEAGRAM_TYPES = [\n 'TYPE_1',\n 'TYPE_2',\n 'TYPE_3',\n 'TYPE_4',\n 'TYPE_5',\n 'TYPE_6',\n 'TYPE_7',\n 'TYPE_8',\n 'TYPE_9',\n 'NOT_SURE',\n] as const;\n\n/**\n * Four core attachment styles from attachment theory.\n * Highly predictive of interpersonal behaviour, leadership, and teamwork.\n */\nexport const ATTACHMENT_STYLES = [\n 'SECURE',\n 'ANXIOUS_PREOCCUPIED',\n 'DISMISSIVE_AVOIDANT',\n 'FEARFUL_AVOIDANT',\n 'NOT_SURE',\n] as const;\n\n/** DISC profile — four primary drives (Dominance, Influence, Steadiness, Conscientiousness) */\nexport const DISC_PROFILES = ['D', 'I', 'S', 'C', 'NOT_SURE'] as const;\n\nexport const ASSESSMENT_ACCURACY_RATINGS = [\n 'NOT_ACCURATE',\n 'SOMEWHAT_ACCURATE',\n 'MOSTLY_ACCURATE',\n 'VERY_ACCURATE',\n] as const;\n\n// ─── Sub-schemas ──────────────────────────────────────────────────────────────\n\n/**\n * Big Five (OCEAN) scores.\n * Stored as free-text strings because scores vary by platform (0-100, 1-10, percentile, etc.).\n * Users can enter \"72/100\", \"7/10\", or \"High\" — all acceptable.\n */\nconst big5ScoresSchema = z.object({\n openness: z.string().trim().optional(),\n conscientiousness: z.string().trim().optional(),\n extraversion: z.string().trim().optional(),\n agreeableness: z.string().trim().optional(),\n neuroticism: z.string().trim().optional(),\n});\n\n// ─── Main Schema ──────────────────────────────────────────────────────────────\n\nexport const step10PsychologicalSchema = z.object({\n // ── 10.1 MBTI ──────────────────────────────────────────────────────────────\n /**\n * MBTI type as a structured enum rather than free text.\n * Prevents \"intj\", \"INTJ-T\", \"intj-a\" variants and enables grouping.\n */\n mbtiType: z.enum(MBTI_TYPES).optional(),\n mbtiTestSource: z.string().trim().optional(),\n mbtiTestYear: z.string().trim().optional(),\n\n // ── 10.2 Big Five / OCEAN ──────────────────────────────────────────────────\n big5Scores: big5ScoresSchema.optional(),\n big5TestSource: z.string().trim().optional(),\n\n // ── 10.3 Enneagram (added — very popular, complementary to MBTI) ──────────\n /**\n * Enneagram focuses on core motivations and fears — different lens from MBTI.\n * Widely used in leadership development, team coaching.\n */\n enneagramType: z.enum(ENNEAGRAM_TYPES).optional(),\n enneagramWing: z.string().trim().optional(), // free text e.g. \"4w5\", \"3w4\"\n enneagramSource: z.string().trim().optional(),\n\n // ── 10.4 Attachment Style (added — highly diagnostic for relationships) ────\n /**\n * Attachment style shapes how people handle trust, conflict, and intimacy.\n * Critical for understanding interpersonal leadership dynamics.\n */\n attachmentStyle: z.enum(ATTACHMENT_STYLES).optional(),\n\n // ── 10.5 DISC Profile (added — widely used in professional contexts) ───────\n discProfile: z.enum(DISC_PROFILES).optional(),\n\n // ── 10.6 Other Scales (from original spec) ────────────────────────────────\n /**\n * Self-reported results from validated scales if user has taken them.\n * Kept as optional free text — no standard scoring format to enforce.\n */\n psychopathyScaleResult: z.string().trim().optional(),\n narcissismScaleResult: z.string().trim().optional(),\n\n // ── 10.7 Self-Accuracy & Consent ──────────────────────────────────────────\n /**\n * Meta-assessment: how much the user trusts their own results.\n * Important signal for data quality weighting.\n */\n assessmentAccuracyRating: z.enum(ASSESSMENT_ACCURACY_RATINGS).optional(),\n\n /**\n * Explicit consent to use psychological data for role/responsibility matching.\n * Separate from general consent to make data usage transparent.\n */\n assessmentDataConsent: z.enum(['YES', 'NO']).optional(),\n\n /** Open-ended space for caveats, context, or additional notes. */\n assessmentNotes: z.string().trim().optional(),\n});\n\nexport type Step10PsychologicalInput = z.infer<typeof step10PsychologicalSchema>;\n"]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SELF_PARTY_ASSOCIATION: readonly ["NO", "YES_CURRENTLY", "YES_PAST"];
|
|
3
|
+
/**
|
|
4
|
+
* Structured role within a political party.
|
|
5
|
+
* Replaces free-text "role" to enable filtering and analytics.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SELF_PARTY_ROLES: readonly ["MEMBER", "ACTIVE_WORKER", "OFFICE_BEARER", "CANDIDATE", "SPOKESPERSON", "VOLUNTEER", "OTHER"];
|
|
8
|
+
export declare const FAMILY_PARTY_ASSOCIATION: readonly ["NO", "YES_IMMEDIATE", "YES_EXTENDED", "DONT_KNOW"];
|
|
9
|
+
export declare const PUBLIC_OFFICE_HISTORY: readonly ["NO", "YES_SELF", "YES_FAMILY", "YES_BOTH"];
|
|
10
|
+
/**
|
|
11
|
+
* Electoral history — the most direct signal of political experience.
|
|
12
|
+
* Added beyond original spec; critical for candidate pipeline management.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ELECTION_CONTESTED: readonly ["NEVER", "LOCAL_BODY", "STATE_ASSEMBLY", "PARLIAMENT", "MULTIPLE_LEVELS"];
|
|
15
|
+
export declare const ELECTION_RESULT: readonly ["WON", "LOST", "BOTH", "NOT_APPLICABLE"];
|
|
16
|
+
/**
|
|
17
|
+
* Scope of political network — key for measuring ground influence.
|
|
18
|
+
* Added beyond original spec; essential for surveyor and candidate profiling.
|
|
19
|
+
*/
|
|
20
|
+
export declare const POLITICAL_NETWORK_LEVEL: readonly ["NONE", "LOCAL_WARD", "BLOCK_LEVEL", "DISTRICT_LEVEL", "STATE_LEVEL", "NATIONAL_LEVEL"];
|
|
21
|
+
/**
|
|
22
|
+
* Civic / political organisation memberships beyond parties.
|
|
23
|
+
* Added beyond original spec — unions, student bodies, NGOs, etc.
|
|
24
|
+
*/
|
|
25
|
+
export declare const CIVIC_ORGANIZATION_TYPES: readonly ["STUDENT_UNION", "TRADE_UNION", "FARMERS_UNION", "SOCIAL_NGO", "RELIGIOUS_ORGANISATION", "CASTE_ASSOCIATION", "PROFESSIONAL_BODY", "YOUTH_WING", "WOMENS_ORGANISATION", "RTIGHT_TO_INFORMATION", "OTHER", "NONE"];
|
|
26
|
+
export declare const step11PoliticalSchema: z.ZodObject<{
|
|
27
|
+
selfPartyAssociation: z.ZodEnum<{
|
|
28
|
+
NO: "NO";
|
|
29
|
+
YES_CURRENTLY: "YES_CURRENTLY";
|
|
30
|
+
YES_PAST: "YES_PAST";
|
|
31
|
+
}>;
|
|
32
|
+
selfPartyName: z.ZodOptional<z.ZodString>;
|
|
33
|
+
selfPartyRole: z.ZodOptional<z.ZodEnum<{
|
|
34
|
+
OTHER: "OTHER";
|
|
35
|
+
MEMBER: "MEMBER";
|
|
36
|
+
ACTIVE_WORKER: "ACTIVE_WORKER";
|
|
37
|
+
OFFICE_BEARER: "OFFICE_BEARER";
|
|
38
|
+
CANDIDATE: "CANDIDATE";
|
|
39
|
+
SPOKESPERSON: "SPOKESPERSON";
|
|
40
|
+
VOLUNTEER: "VOLUNTEER";
|
|
41
|
+
}>>;
|
|
42
|
+
selfPartyDuration: z.ZodOptional<z.ZodString>;
|
|
43
|
+
selfPartyDetails: z.ZodOptional<z.ZodString>;
|
|
44
|
+
familyPartyAssociation: z.ZodEnum<{
|
|
45
|
+
DONT_KNOW: "DONT_KNOW";
|
|
46
|
+
NO: "NO";
|
|
47
|
+
YES_IMMEDIATE: "YES_IMMEDIATE";
|
|
48
|
+
YES_EXTENDED: "YES_EXTENDED";
|
|
49
|
+
}>;
|
|
50
|
+
familyPartyDetails: z.ZodOptional<z.ZodString>;
|
|
51
|
+
publicOfficeHistory: z.ZodEnum<{
|
|
52
|
+
NO: "NO";
|
|
53
|
+
YES_SELF: "YES_SELF";
|
|
54
|
+
YES_FAMILY: "YES_FAMILY";
|
|
55
|
+
YES_BOTH: "YES_BOTH";
|
|
56
|
+
}>;
|
|
57
|
+
publicOfficeDetails: z.ZodOptional<z.ZodString>;
|
|
58
|
+
electionContested: z.ZodOptional<z.ZodEnum<{
|
|
59
|
+
NEVER: "NEVER";
|
|
60
|
+
LOCAL_BODY: "LOCAL_BODY";
|
|
61
|
+
STATE_ASSEMBLY: "STATE_ASSEMBLY";
|
|
62
|
+
PARLIAMENT: "PARLIAMENT";
|
|
63
|
+
MULTIPLE_LEVELS: "MULTIPLE_LEVELS";
|
|
64
|
+
}>>;
|
|
65
|
+
electionResult: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
NOT_APPLICABLE: "NOT_APPLICABLE";
|
|
67
|
+
WON: "WON";
|
|
68
|
+
LOST: "LOST";
|
|
69
|
+
BOTH: "BOTH";
|
|
70
|
+
}>>;
|
|
71
|
+
politicalNetworkLevel: z.ZodOptional<z.ZodEnum<{
|
|
72
|
+
NONE: "NONE";
|
|
73
|
+
LOCAL_WARD: "LOCAL_WARD";
|
|
74
|
+
BLOCK_LEVEL: "BLOCK_LEVEL";
|
|
75
|
+
DISTRICT_LEVEL: "DISTRICT_LEVEL";
|
|
76
|
+
STATE_LEVEL: "STATE_LEVEL";
|
|
77
|
+
NATIONAL_LEVEL: "NATIONAL_LEVEL";
|
|
78
|
+
}>>;
|
|
79
|
+
civicOrganisationTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
80
|
+
OTHER: "OTHER";
|
|
81
|
+
NONE: "NONE";
|
|
82
|
+
STUDENT_UNION: "STUDENT_UNION";
|
|
83
|
+
TRADE_UNION: "TRADE_UNION";
|
|
84
|
+
FARMERS_UNION: "FARMERS_UNION";
|
|
85
|
+
SOCIAL_NGO: "SOCIAL_NGO";
|
|
86
|
+
RELIGIOUS_ORGANISATION: "RELIGIOUS_ORGANISATION";
|
|
87
|
+
CASTE_ASSOCIATION: "CASTE_ASSOCIATION";
|
|
88
|
+
PROFESSIONAL_BODY: "PROFESSIONAL_BODY";
|
|
89
|
+
YOUTH_WING: "YOUTH_WING";
|
|
90
|
+
WOMENS_ORGANISATION: "WOMENS_ORGANISATION";
|
|
91
|
+
RTIGHT_TO_INFORMATION: "RTIGHT_TO_INFORMATION";
|
|
92
|
+
}>>>;
|
|
93
|
+
civicOrganisationDetails: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export type Step11PoliticalInput = z.infer<typeof step11PoliticalSchema>;
|
|
96
|
+
//# sourceMappingURL=step-11.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-11.schema.d.ts","sourceRoot":"","sources":["../src/step-11.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,sBAAsB,8CAA+C,CAAC;AAEnF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,0GAQnB,CAAC;AAEX,eAAO,MAAM,wBAAwB,+DAK3B,CAAC;AAEX,eAAO,MAAM,qBAAqB,uDAAwD,CAAC;AAE3F;;;GAGG;AACH,eAAO,MAAM,kBAAkB,qFAMrB,CAAC;AAEX,eAAO,MAAM,eAAe,oDAAqD,CAAC;AAElF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,mGAO1B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB,6NAa3B,CAAC;AAIX,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4DhC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// ─── Enums ────────────────────────────────────────────────────────────────────
|
|
3
|
+
export const SELF_PARTY_ASSOCIATION = ['NO', 'YES_CURRENTLY', 'YES_PAST'];
|
|
4
|
+
/**
|
|
5
|
+
* Structured role within a political party.
|
|
6
|
+
* Replaces free-text "role" to enable filtering and analytics.
|
|
7
|
+
*/
|
|
8
|
+
export const SELF_PARTY_ROLES = [
|
|
9
|
+
'MEMBER', // Ordinary card-holding member
|
|
10
|
+
'ACTIVE_WORKER', // Grassroots campaigner / booth worker
|
|
11
|
+
'OFFICE_BEARER', // Holds a formal party position
|
|
12
|
+
'CANDIDATE', // Has stood as party candidate
|
|
13
|
+
'SPOKESPERSON', // Official party spokesperson / media face
|
|
14
|
+
'VOLUNTEER', // Informal volunteer, no membership card
|
|
15
|
+
'OTHER',
|
|
16
|
+
];
|
|
17
|
+
export const FAMILY_PARTY_ASSOCIATION = [
|
|
18
|
+
'NO',
|
|
19
|
+
'YES_IMMEDIATE', // Spouse, parents, children, siblings
|
|
20
|
+
'YES_EXTENDED', // Uncles, cousins, grandparents, in-laws
|
|
21
|
+
'DONT_KNOW',
|
|
22
|
+
];
|
|
23
|
+
export const PUBLIC_OFFICE_HISTORY = ['NO', 'YES_SELF', 'YES_FAMILY', 'YES_BOTH'];
|
|
24
|
+
/**
|
|
25
|
+
* Electoral history — the most direct signal of political experience.
|
|
26
|
+
* Added beyond original spec; critical for candidate pipeline management.
|
|
27
|
+
*/
|
|
28
|
+
export const ELECTION_CONTESTED = [
|
|
29
|
+
'NEVER',
|
|
30
|
+
'LOCAL_BODY', // Gram Panchayat, Municipal Ward, Nagar Panchayat
|
|
31
|
+
'STATE_ASSEMBLY', // Vidhan Sabha
|
|
32
|
+
'PARLIAMENT', // Lok Sabha / Rajya Sabha
|
|
33
|
+
'MULTIPLE_LEVELS', // Contested at more than one level
|
|
34
|
+
];
|
|
35
|
+
export const ELECTION_RESULT = ['WON', 'LOST', 'BOTH', 'NOT_APPLICABLE'];
|
|
36
|
+
/**
|
|
37
|
+
* Scope of political network — key for measuring ground influence.
|
|
38
|
+
* Added beyond original spec; essential for surveyor and candidate profiling.
|
|
39
|
+
*/
|
|
40
|
+
export const POLITICAL_NETWORK_LEVEL = [
|
|
41
|
+
'NONE',
|
|
42
|
+
'LOCAL_WARD', // Influence within a single ward / village
|
|
43
|
+
'BLOCK_LEVEL', // Covers multiple villages / a block
|
|
44
|
+
'DISTRICT_LEVEL', // City-wide or district-wide connections
|
|
45
|
+
'STATE_LEVEL', // State-wide political presence
|
|
46
|
+
'NATIONAL_LEVEL', // National connections / all-India network
|
|
47
|
+
];
|
|
48
|
+
/**
|
|
49
|
+
* Civic / political organisation memberships beyond parties.
|
|
50
|
+
* Added beyond original spec — unions, student bodies, NGOs, etc.
|
|
51
|
+
*/
|
|
52
|
+
export const CIVIC_ORGANIZATION_TYPES = [
|
|
53
|
+
'STUDENT_UNION',
|
|
54
|
+
'TRADE_UNION',
|
|
55
|
+
'FARMERS_UNION',
|
|
56
|
+
'SOCIAL_NGO',
|
|
57
|
+
'RELIGIOUS_ORGANISATION',
|
|
58
|
+
'CASTE_ASSOCIATION',
|
|
59
|
+
'PROFESSIONAL_BODY', // Bar council, doctors' association, etc.
|
|
60
|
+
'YOUTH_WING',
|
|
61
|
+
'WOMENS_ORGANISATION',
|
|
62
|
+
'RTIGHT_TO_INFORMATION', // RTI activist groups
|
|
63
|
+
'OTHER',
|
|
64
|
+
'NONE',
|
|
65
|
+
];
|
|
66
|
+
// ─── Schema ───────────────────────────────────────────────────────────────────
|
|
67
|
+
export const step11PoliticalSchema = z.object({
|
|
68
|
+
// ── 11.1 Self Party Association ───────────────────────────────────────────
|
|
69
|
+
selfPartyAssociation: z.enum(SELF_PARTY_ASSOCIATION, {
|
|
70
|
+
message: 'Please select party association status.',
|
|
71
|
+
}),
|
|
72
|
+
/** Party name — separated from free-text details for structured analytics. */
|
|
73
|
+
selfPartyName: z.string().trim().optional(),
|
|
74
|
+
/** Structured role — replaces embedded "role" in free-text details. */
|
|
75
|
+
selfPartyRole: z.enum(SELF_PARTY_ROLES).optional(),
|
|
76
|
+
/** Duration — e.g. "2018–2022", "3 years", "since 2015". Free text. */
|
|
77
|
+
selfPartyDuration: z.string().trim().optional(),
|
|
78
|
+
/** Additional context: position held, reason for leaving, notable work, etc. */
|
|
79
|
+
selfPartyDetails: z.string().trim().optional(),
|
|
80
|
+
// ── 11.2 Family Party Association ─────────────────────────────────────────
|
|
81
|
+
familyPartyAssociation: z.enum(FAMILY_PARTY_ASSOCIATION, {
|
|
82
|
+
message: 'Please select family party association.',
|
|
83
|
+
}),
|
|
84
|
+
/** Free text: who, which party, their position. */
|
|
85
|
+
familyPartyDetails: z.string().trim().optional(),
|
|
86
|
+
// ── 11.3 Public Office History ────────────────────────────────────────────
|
|
87
|
+
publicOfficeHistory: z.enum(PUBLIC_OFFICE_HISTORY, {
|
|
88
|
+
message: 'Please select an option.',
|
|
89
|
+
}),
|
|
90
|
+
/** Position held, constituency, tenure, outcome. */
|
|
91
|
+
publicOfficeDetails: z.string().trim().optional(),
|
|
92
|
+
// ── 11.4 Election History (added — candidate pipeline data) ───────────────
|
|
93
|
+
/**
|
|
94
|
+
* Has the user personally contested any election?
|
|
95
|
+
* Directly measures political experience and ambition trajectory.
|
|
96
|
+
*/
|
|
97
|
+
electionContested: z.enum(ELECTION_CONTESTED).optional(),
|
|
98
|
+
/** Win/loss record — shown only if electionContested !== NEVER. */
|
|
99
|
+
electionResult: z.enum(ELECTION_RESULT).optional(),
|
|
100
|
+
// ── 11.5 Political Network Scope (added) ──────────────────────────────────
|
|
101
|
+
/**
|
|
102
|
+
* Estimated geographic scope of political influence.
|
|
103
|
+
* Helps assess whether someone is a local leader, district leader, etc.
|
|
104
|
+
*/
|
|
105
|
+
politicalNetworkLevel: z.enum(POLITICAL_NETWORK_LEVEL).optional(),
|
|
106
|
+
// ── 11.6 Civic Organisations (added) ──────────────────────────────────────
|
|
107
|
+
/**
|
|
108
|
+
* Memberships in non-party political/civic bodies.
|
|
109
|
+
* Unions, student wings, NGOs — often more revealing than party membership.
|
|
110
|
+
*/
|
|
111
|
+
civicOrganisationTypes: z.array(z.enum(CIVIC_ORGANIZATION_TYPES)).optional(),
|
|
112
|
+
/** Free text for civic org names, roles, and duration. */
|
|
113
|
+
civicOrganisationDetails: z.string().trim().optional(),
|
|
114
|
+
});
|
|
115
|
+
//# sourceMappingURL=step-11.schema.js.map
|
|
@@ -0,0 +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,iFAAiF;AAEjF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAAI,EAAE,eAAe,EAAE,UAAU,CAAU,CAAC;AAEnF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,+BAA+B;IACzC,eAAe,EAAE,uCAAuC;IACxD,eAAe,EAAE,gCAAgC;IACjD,WAAW,EAAE,+BAA+B;IAC5C,cAAc,EAAE,2CAA2C;IAC3D,WAAW,EAAE,yCAAyC;IACtD,OAAO;CACC,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI;IACJ,eAAe,EAAE,sCAAsC;IACvD,cAAc,EAAE,yCAAyC;IACzD,WAAW;CACH,CAAC;AAEX,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAU,CAAC;AAE3F;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,OAAO;IACP,YAAY,EAAE,kDAAkD;IAChE,gBAAgB,EAAE,eAAe;IACjC,YAAY,EAAE,0BAA0B;IACxC,iBAAiB,EAAE,mCAAmC;CAC9C,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAU,CAAC;AAElF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;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C,CAAC,IAAI,CAAC,qBAAqB,EAAE;QACjD,OAAO,EAAE,0BAA0B;KACpC,CAAC;IAEF,oDAAoD;IACpD,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAEjD,6EAA6E;IAC7E;;;OAGG;IACH,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IAExD,mEAAmE;IACnE,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;IAElD,6EAA6E;IAC7E;;;OAGG;IACH,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE;IAEjE,6EAA6E;IAC7E;;;OAGG;IACH,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,QAAQ,EAAE;IAE5E,0DAA0D;IAC1D,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n// ─── Enums ────────────────────────────────────────────────────────────────────\n\nexport const SELF_PARTY_ASSOCIATION = ['NO', 'YES_CURRENTLY', 'YES_PAST'] as const;\n\n/**\n * Structured role within a political party.\n * Replaces free-text \"role\" to enable filtering and analytics.\n */\nexport const SELF_PARTY_ROLES = [\n 'MEMBER', // Ordinary card-holding member\n 'ACTIVE_WORKER', // Grassroots campaigner / booth worker\n 'OFFICE_BEARER', // Holds a formal party position\n 'CANDIDATE', // Has stood as party candidate\n 'SPOKESPERSON', // Official party spokesperson / media face\n 'VOLUNTEER', // Informal volunteer, no membership card\n 'OTHER',\n] as const;\n\nexport const FAMILY_PARTY_ASSOCIATION = [\n 'NO',\n 'YES_IMMEDIATE', // Spouse, parents, children, siblings\n 'YES_EXTENDED', // Uncles, cousins, grandparents, in-laws\n 'DONT_KNOW',\n] as const;\n\nexport const PUBLIC_OFFICE_HISTORY = ['NO', 'YES_SELF', 'YES_FAMILY', 'YES_BOTH'] as const;\n\n/**\n * Electoral history — the most direct signal of political experience.\n * Added beyond original spec; critical for candidate pipeline management.\n */\nexport const ELECTION_CONTESTED = [\n 'NEVER',\n 'LOCAL_BODY', // Gram Panchayat, Municipal Ward, Nagar Panchayat\n 'STATE_ASSEMBLY', // Vidhan Sabha\n 'PARLIAMENT', // Lok Sabha / Rajya Sabha\n 'MULTIPLE_LEVELS', // Contested at more than one level\n] as const;\n\nexport const ELECTION_RESULT = ['WON', 'LOST', 'BOTH', 'NOT_APPLICABLE'] as const;\n\n/**\n * Scope of political network — key for measuring ground influence.\n * Added beyond original spec; essential for surveyor and candidate profiling.\n */\nexport const POLITICAL_NETWORK_LEVEL = [\n 'NONE',\n 'LOCAL_WARD', // Influence within a single ward / village\n 'BLOCK_LEVEL', // Covers multiple villages / a block\n 'DISTRICT_LEVEL', // City-wide or district-wide connections\n 'STATE_LEVEL', // State-wide political presence\n 'NATIONAL_LEVEL', // National connections / all-India network\n] as const;\n\n/**\n * Civic / political organisation memberships beyond parties.\n * Added beyond original spec — unions, student bodies, NGOs, etc.\n */\nexport const CIVIC_ORGANIZATION_TYPES = [\n 'STUDENT_UNION',\n 'TRADE_UNION',\n 'FARMERS_UNION',\n 'SOCIAL_NGO',\n 'RELIGIOUS_ORGANISATION',\n 'CASTE_ASSOCIATION',\n 'PROFESSIONAL_BODY', // Bar council, doctors' association, etc.\n 'YOUTH_WING',\n 'WOMENS_ORGANISATION',\n 'RTIGHT_TO_INFORMATION', // RTI activist groups\n 'OTHER',\n 'NONE',\n] as const;\n\n// ─── Schema ───────────────────────────────────────────────────────────────────\n\nexport const step11PoliticalSchema = z.object({\n // ── 11.1 Self Party Association ───────────────────────────────────────────\n selfPartyAssociation: z.enum(SELF_PARTY_ASSOCIATION, {\n message: 'Please select party association status.',\n }),\n\n /** Party name — separated from free-text details for structured analytics. */\n selfPartyName: z.string().trim().optional(),\n\n /** Structured role — replaces embedded \"role\" in free-text details. */\n selfPartyRole: z.enum(SELF_PARTY_ROLES).optional(),\n\n /** Duration — e.g. \"2018–2022\", \"3 years\", \"since 2015\". Free text. */\n selfPartyDuration: z.string().trim().optional(),\n\n /** Additional context: position held, reason for leaving, notable work, etc. */\n selfPartyDetails: z.string().trim().optional(),\n\n // ── 11.2 Family Party Association ─────────────────────────────────────────\n familyPartyAssociation: z.enum(FAMILY_PARTY_ASSOCIATION, {\n message: 'Please select family party association.',\n }),\n\n /** Free text: who, which party, their position. */\n familyPartyDetails: z.string().trim().optional(),\n\n // ── 11.3 Public Office History ────────────────────────────────────────────\n publicOfficeHistory: z.enum(PUBLIC_OFFICE_HISTORY, {\n message: 'Please select an option.',\n }),\n\n /** Position held, constituency, tenure, outcome. */\n publicOfficeDetails: z.string().trim().optional(),\n\n // ── 11.4 Election History (added — candidate pipeline data) ───────────────\n /**\n * Has the user personally contested any election?\n * Directly measures political experience and ambition trajectory.\n */\n electionContested: z.enum(ELECTION_CONTESTED).optional(),\n\n /** Win/loss record — shown only if electionContested !== NEVER. */\n electionResult: z.enum(ELECTION_RESULT).optional(),\n\n // ── 11.5 Political Network Scope (added) ──────────────────────────────────\n /**\n * Estimated geographic scope of political influence.\n * Helps assess whether someone is a local leader, district leader, etc.\n */\n politicalNetworkLevel: z.enum(POLITICAL_NETWORK_LEVEL).optional(),\n\n // ── 11.6 Civic Organisations (added) ──────────────────────────────────────\n /**\n * Memberships in non-party political/civic bodies.\n * Unions, student wings, NGOs — often more revealing than party membership.\n */\n civicOrganisationTypes: z.array(z.enum(CIVIC_ORGANIZATION_TYPES)).optional(),\n\n /** Free text for civic org names, roles, and duration. */\n civicOrganisationDetails: z.string().trim().optional(),\n});\n\nexport type Step11PoliticalInput = z.infer<typeof step11PoliticalSchema>;\n"]}
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
/**
|
|
21
|
+
* Self-placement on the political spectrum.
|
|
22
|
+
* Expanded beyond spec: CENTER_RIGHT and CENTER_LEFT added for finer granularity;
|
|
23
|
+
* APOLITICAL distinguishes principled non-alignment from uncertainty.
|
|
24
|
+
*/
|
|
25
|
+
export declare const POLITICAL_SPECTRUM: readonly ["EXTREME_RIGHT", "RIGHT", "CENTER_RIGHT", "CENTER", "CENTER_LEFT", "LEFT", "EXTREME_LEFT", "APOLITICAL", "DONT_KNOW"];
|
|
26
|
+
export declare const VOTER_ID_UPDATE_STATUS: readonly ["NO", "YES", "NOT_SURE"];
|
|
27
|
+
/**
|
|
28
|
+
* Whether the user's Voter ID (EPIC) is linked to their Aadhaar card.
|
|
29
|
+
* Mandatory government initiative in India — key compliance data point.
|
|
30
|
+
* Added beyond spec.
|
|
31
|
+
*/
|
|
32
|
+
export declare const AADHAAR_VOTER_LINK_STATUS: readonly ["YES_LINKED", "NO_NOT_LINKED", "NOT_DONE_YET", "NOT_AWARE"];
|
|
33
|
+
export declare const step12ElectoralSchema: z.ZodObject<{
|
|
34
|
+
epicNumber: z.ZodOptional<z.ZodString>;
|
|
35
|
+
willVoteThisTime: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
NO: "NO";
|
|
37
|
+
NOT_SURE: "NOT_SURE";
|
|
38
|
+
YES: "YES";
|
|
39
|
+
}>>;
|
|
40
|
+
votedLastTime: z.ZodOptional<z.ZodEnum<{
|
|
41
|
+
NO: "NO";
|
|
42
|
+
YES: "YES";
|
|
43
|
+
NOT_ELIGIBLE_THEN: "NOT_ELIGIBLE_THEN";
|
|
44
|
+
DONT_REMEMBER: "DONT_REMEMBER";
|
|
45
|
+
}>>;
|
|
46
|
+
votingFrequency: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
SOMETIMES: "SOMETIMES";
|
|
48
|
+
NEVER: "NEVER";
|
|
49
|
+
ALWAYS: "ALWAYS";
|
|
50
|
+
USUALLY: "USUALLY";
|
|
51
|
+
RARELY: "RARELY";
|
|
52
|
+
}>>;
|
|
53
|
+
primaryVotingIssues: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
54
|
+
OTHER: "OTHER";
|
|
55
|
+
DEVELOPMENT: "DEVELOPMENT";
|
|
56
|
+
SECURITY: "SECURITY";
|
|
57
|
+
EDUCATION: "EDUCATION";
|
|
58
|
+
HEALTHCARE: "HEALTHCARE";
|
|
59
|
+
ECONOMY: "ECONOMY";
|
|
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";
|
|
81
|
+
}>>;
|
|
82
|
+
voterIdUpdatePending: z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
NO: "NO";
|
|
84
|
+
NOT_SURE: "NOT_SURE";
|
|
85
|
+
YES: "YES";
|
|
86
|
+
}>>;
|
|
87
|
+
voterIdUpdateDetails: z.ZodOptional<z.ZodString>;
|
|
88
|
+
aadhaarVoterLinkStatus: z.ZodOptional<z.ZodEnum<{
|
|
89
|
+
YES_LINKED: "YES_LINKED";
|
|
90
|
+
NO_NOT_LINKED: "NO_NOT_LINKED";
|
|
91
|
+
NOT_DONE_YET: "NOT_DONE_YET";
|
|
92
|
+
NOT_AWARE: "NOT_AWARE";
|
|
93
|
+
}>>;
|
|
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
|
+
}, z.core.$strip>;
|
|
102
|
+
export type Step12ElectoralInput = z.infer<typeof step12ElectoralSchema>;
|
|
103
|
+
//# sourceMappingURL=step-12.schema.d.ts.map
|
|
@@ -0,0 +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;;GAEG;AACH,eAAO,MAAM,mBAAmB,oCAAqC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,eAAe,8DAKlB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,gBAAgB,gEAMnB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,qBAAqB,6PAiBxB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,iIAUrB,CAAC;AAEX,eAAO,MAAM,sBAAsB,oCAAqC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,uEAK5B,CAAC;AAIX,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+EhC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
/**
|
|
50
|
+
* Self-placement on the political spectrum.
|
|
51
|
+
* Expanded beyond spec: CENTER_RIGHT and CENTER_LEFT added for finer granularity;
|
|
52
|
+
* APOLITICAL distinguishes principled non-alignment from uncertainty.
|
|
53
|
+
*/
|
|
54
|
+
export const POLITICAL_SPECTRUM = [
|
|
55
|
+
'EXTREME_RIGHT', // Far-right / hard nationalist
|
|
56
|
+
'RIGHT', // Conservative / right-of-centre
|
|
57
|
+
'CENTER_RIGHT', // Moderate right; added beyond spec
|
|
58
|
+
'CENTER', // True centre; replaces LIBERAL_CENTER
|
|
59
|
+
'CENTER_LEFT', // Moderate left; added beyond spec
|
|
60
|
+
'LEFT', // Progressive / left-of-centre
|
|
61
|
+
'EXTREME_LEFT', // Far-left / radical progressive
|
|
62
|
+
'APOLITICAL', // Consciously rejects political labelling; added beyond spec
|
|
63
|
+
'DONT_KNOW', // Unsure / hasn't thought about it
|
|
64
|
+
];
|
|
65
|
+
export const VOTER_ID_UPDATE_STATUS = ['NO', 'YES', 'NOT_SURE'];
|
|
66
|
+
/**
|
|
67
|
+
* Whether the user's Voter ID (EPIC) is linked to their Aadhaar card.
|
|
68
|
+
* Mandatory government initiative in India — key compliance data point.
|
|
69
|
+
* Added beyond spec.
|
|
70
|
+
*/
|
|
71
|
+
export const AADHAAR_VOTER_LINK_STATUS = [
|
|
72
|
+
'YES_LINKED', // Confirmed linked
|
|
73
|
+
'NO_NOT_LINKED', // Confirmed not linked
|
|
74
|
+
'NOT_DONE_YET', // Intends to but hasn't
|
|
75
|
+
'NOT_AWARE', // Unaware of the requirement
|
|
76
|
+
];
|
|
77
|
+
// ─── Schema ───────────────────────────────────────────────────────────────────
|
|
78
|
+
export const step12ElectoralSchema = z.object({
|
|
79
|
+
// ── 12.1 Voter ID (EPIC) ──────────────────────────────────────────────────
|
|
80
|
+
/**
|
|
81
|
+
* Indian Voter ID / Electoral Photo ID Card number.
|
|
82
|
+
* Standard format: 3 uppercase letters + 7 digits (e.g. ABC1234567).
|
|
83
|
+
* Kept optional; validated only if provided.
|
|
84
|
+
*/
|
|
85
|
+
epicNumber: z.string().trim().max(15).optional(),
|
|
86
|
+
// ── 12.2 Voting Behaviour ─────────────────────────────────────────────────
|
|
87
|
+
/** Intent to vote in the next upcoming election. */
|
|
88
|
+
willVoteThisTime: z.enum(WILL_VOTE_THIS_TIME).optional(),
|
|
89
|
+
/** Whether they voted in the last major (general / assembly) election. */
|
|
90
|
+
votedLastTime: z.enum(VOTED_LAST_TIME).optional(),
|
|
91
|
+
/**
|
|
92
|
+
* General voting habit across elections.
|
|
93
|
+
* Added beyond spec — longitudinal signal more useful than a single yes/no.
|
|
94
|
+
*/
|
|
95
|
+
votingFrequency: z.enum(VOTING_FREQUENCY).optional(),
|
|
96
|
+
/**
|
|
97
|
+
* What primarily drives their vote decision.
|
|
98
|
+
* Multi-select; added beyond spec for electoral motivation analysis.
|
|
99
|
+
*/
|
|
100
|
+
primaryVotingIssues: z.array(z.enum(PRIMARY_VOTING_ISSUES)).optional(),
|
|
101
|
+
// ── 12.3 Political Spectrum ───────────────────────────────────────────────
|
|
102
|
+
/**
|
|
103
|
+
* Self-assessed ideological position.
|
|
104
|
+
* Expanded to 9 values for finer-grained mapping.
|
|
105
|
+
*/
|
|
106
|
+
politicalSpectrumSelf: z.enum(POLITICAL_SPECTRUM).optional(),
|
|
107
|
+
// ── 12.4 Voter ID Update Issues ───────────────────────────────────────────
|
|
108
|
+
/** Any correction / update still pending on their Voter ID card. */
|
|
109
|
+
voterIdUpdatePending: z.enum(VOTER_ID_UPDATE_STATUS).optional(),
|
|
110
|
+
/** Details of the pending update problem — shown only if YES. */
|
|
111
|
+
voterIdUpdateDetails: z.string().trim().optional(),
|
|
112
|
+
/**
|
|
113
|
+
* Whether EPIC is linked to Aadhaar (government mandate).
|
|
114
|
+
* Added beyond spec; important compliance and data-quality field.
|
|
115
|
+
*/
|
|
116
|
+
aadhaarVoterLinkStatus: z.enum(AADHAAR_VOTER_LINK_STATUS).optional(),
|
|
117
|
+
// ── 12.5 Local Notables ───────────────────────────────────────────────────
|
|
118
|
+
/** Free text: who they consider the most honest / best person in their locality and why. */
|
|
119
|
+
mostHonestPersonLocality: z.string().trim().optional(),
|
|
120
|
+
/** Free text: who they consider the most intellectual / educated person and why. */
|
|
121
|
+
mostIntellectualPersonLocality: z.string().trim().optional(),
|
|
122
|
+
/**
|
|
123
|
+
* Free text: who is most influential / well-connected in their locality and why.
|
|
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(),
|
|
136
|
+
});
|
|
137
|
+
//# sourceMappingURL=step-12.schema.js.map
|
|
@@ -0,0 +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,iFAAiF;AAEjF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE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A4F;IAC5F,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAEtD,oFAAoF;IACpF,8BAA8B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAE5D;;;OAGG;IACH,6BAA6B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAE3D,4EAA4E;IAE5E,6EAA6E;IAC7E,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAEpD,8DAA8D;IAC9D,yBAAyB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAEvD,kDAAkD;IAClD,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAElD,8CAA8C;IAC9C,yBAAyB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CACxD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n// ─── Enums ────────────────────────────────────────────────────────────────────\n\n/**\n * Whether the user plans to vote in the upcoming election.\n */\nexport const WILL_VOTE_THIS_TIME = ['YES', 'NO', 'NOT_SURE'] as const;\n\n/**\n * Whether the user voted in the last major election.\n */\nexport const VOTED_LAST_TIME = [\n 'YES',\n 'NO',\n 'NOT_ELIGIBLE_THEN', // Age, registration, etc.\n 'DONT_REMEMBER',\n] as const;\n\n/**\n * Overall voting frequency across elections — a longitudinal habit signal.\n * Added beyond spec; differentiates consistent voters from occasional ones.\n */\nexport const VOTING_FREQUENCY = [\n 'ALWAYS', // Votes in every election without fail\n 'USUALLY', // Votes most of the time\n 'SOMETIMES', // Votes occasionally\n 'RARELY', // Has voted once or twice\n 'NEVER', // Has never voted\n] as const;\n\n/**\n * Primary issues that drive the user's vote choice.\n * Multi-select; added beyond spec to capture electoral motivations.\n */\nexport const PRIMARY_VOTING_ISSUES = [\n 'DEVELOPMENT', // Infrastructure, roads, buildings\n 'SECURITY', // Law and order, safety\n 'EDUCATION', // Schools, colleges, literacy\n 'HEALTHCARE', // Hospitals, healthcare access\n 'ECONOMY', // Jobs, growth, industry\n 'CASTE_COMMUNITY', // Caste or community representation\n 'RELIGION', // Religious identity or protection\n 'CANDIDATE_QUALITY', // Personal integrity / capability of candidate\n 'ANTI_INCUMBENCY', // Desire to remove current representative\n 'WELFARE_SCHEMES', // Subsidies, rations, schemes (PM/state)\n 'CORRUPTION', // Anti-corruption stance\n 'ENVIRONMENT', // Climate, pollution, water\n 'WOMEN_SAFETY', // Gender safety and rights\n 'LOCAL_ISSUES', // Ward/village-specific problems\n 'PARTY_LOYALTY', // Strong allegiance to a party regardless of candidate\n 'OTHER',\n] as const;\n\n/**\n * Self-placement on the political spectrum.\n * Expanded beyond spec: CENTER_RIGHT and CENTER_LEFT added for finer granularity;\n * APOLITICAL distinguishes principled non-alignment from uncertainty.\n */\nexport const POLITICAL_SPECTRUM = [\n 'EXTREME_RIGHT', // Far-right / hard nationalist\n 'RIGHT', // Conservative / right-of-centre\n 'CENTER_RIGHT', // Moderate right; added beyond spec\n 'CENTER', // True centre; replaces LIBERAL_CENTER\n 'CENTER_LEFT', // Moderate left; added beyond spec\n 'LEFT', // Progressive / left-of-centre\n 'EXTREME_LEFT', // Far-left / radical progressive\n 'APOLITICAL', // Consciously rejects political labelling; added beyond spec\n 'DONT_KNOW', // Unsure / hasn't thought about it\n] as const;\n\nexport const VOTER_ID_UPDATE_STATUS = ['NO', 'YES', 'NOT_SURE'] as const;\n\n/**\n * Whether the user's Voter ID (EPIC) is linked to their Aadhaar card.\n * Mandatory government initiative in India — key compliance data point.\n * Added beyond spec.\n */\nexport const AADHAAR_VOTER_LINK_STATUS = [\n 'YES_LINKED', // Confirmed linked\n 'NO_NOT_LINKED', // Confirmed not linked\n 'NOT_DONE_YET', // Intends to but hasn't\n 'NOT_AWARE', // Unaware of the requirement\n] as const;\n\n// ─── Schema ───────────────────────────────────────────────────────────────────\n\nexport const step12ElectoralSchema = z.object({\n // ── 12.1 Voter ID (EPIC) ──────────────────────────────────────────────────\n\n /**\n * Indian Voter ID / Electoral Photo ID Card number.\n * Standard format: 3 uppercase letters + 7 digits (e.g. ABC1234567).\n * Kept optional; validated only if provided.\n */\n epicNumber: z.string().trim().max(15).optional(),\n\n // ── 12.2 Voting Behaviour ─────────────────────────────────────────────────\n\n /** Intent to vote in the next upcoming election. */\n willVoteThisTime: z.enum(WILL_VOTE_THIS_TIME).optional(),\n\n /** Whether they voted in the last major (general / assembly) election. */\n votedLastTime: z.enum(VOTED_LAST_TIME).optional(),\n\n /**\n * General voting habit across elections.\n * Added beyond spec — longitudinal signal more useful than a single yes/no.\n */\n votingFrequency: z.enum(VOTING_FREQUENCY).optional(),\n\n /**\n * What primarily drives their vote decision.\n * Multi-select; added beyond spec for electoral motivation analysis.\n */\n primaryVotingIssues: z.array(z.enum(PRIMARY_VOTING_ISSUES)).optional(),\n\n // ── 12.3 Political Spectrum ───────────────────────────────────────────────\n\n /**\n * Self-assessed ideological position.\n * Expanded to 9 values for finer-grained mapping.\n */\n politicalSpectrumSelf: z.enum(POLITICAL_SPECTRUM).optional(),\n\n // ── 12.4 Voter ID Update Issues ───────────────────────────────────────────\n\n /** Any correction / update still pending on their Voter ID card. */\n voterIdUpdatePending: z.enum(VOTER_ID_UPDATE_STATUS).optional(),\n\n /** Details of the pending update problem — shown only if YES. */\n voterIdUpdateDetails: z.string().trim().optional(),\n\n /**\n * Whether EPIC is linked to Aadhaar (government mandate).\n * Added beyond spec; important compliance and data-quality field.\n */\n aadhaarVoterLinkStatus: z.enum(AADHAAR_VOTER_LINK_STATUS).optional(),\n\n // ── 12.5 Local Notables ───────────────────────────────────────────────────\n\n /** Free text: who they consider the most honest / best person in their locality and why. */\n mostHonestPersonLocality: z.string().trim().optional(),\n\n /** Free text: who they consider the most intellectual / educated person and why. */\n mostIntellectualPersonLocality: z.string().trim().optional(),\n\n /**\n * Free text: who is most influential / well-connected in their locality and why.\n * Added beyond spec — social capital mapping for ground-level network analysis.\n */\n mostInfluentialPersonLocality: z.string().trim().optional(),\n\n // ── 12.6 Polling Booth & Constituency (mostly system-derived) ────────────\n\n /** Polling booth name, number, or code — user-provided or system-derived. */\n pollingBoothNameOrCode: z.string().trim().optional(),\n\n /** Local election constituency (Ward / Panchayat / Nagar). */\n localElectionConstituency: z.string().trim().optional(),\n\n /** Vidhan Sabha (State Assembly) constituency. */\n assemblyConstituency: z.string().trim().optional(),\n\n /** Lok Sabha (Parliamentary) constituency. */\n parliamentaryConstituency: z.string().trim().optional(),\n});\n\nexport type Step12ElectoralInput = z.infer<typeof step12ElectoralSchema>;\n"]}
|