udp-schema 0.2.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/field-helpers.d.ts +10 -38
- package/dist/field-helpers.d.ts.map +1 -1
- package/dist/field-helpers.js +40 -66
- package/dist/field-helpers.js.map +1 -1
- package/dist/field-meta.d.ts +46 -28
- package/dist/field-meta.d.ts.map +1 -1
- package/dist/field-meta.js +304 -1016
- package/dist/field-meta.js.map +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -34
- package/dist/index.js.map +1 -1
- package/dist/onboarding-config.d.ts +44 -0
- package/dist/onboarding-config.d.ts.map +1 -0
- package/dist/onboarding-config.js +705 -0
- package/dist/onboarding-config.js.map +1 -0
- package/dist/progress-fields.d.ts +3 -3
- package/dist/progress-fields.d.ts.map +1 -1
- package/dist/progress-fields.js +73 -101
- package/dist/progress-fields.js.map +1 -1
- package/dist/step-01.schema.d.ts +84 -111
- package/dist/step-01.schema.d.ts.map +1 -1
- package/dist/step-01.schema.js +94 -101
- package/dist/step-01.schema.js.map +1 -1
- package/dist/step-02.schema.d.ts +31 -21
- package/dist/step-02.schema.d.ts.map +1 -1
- package/dist/step-02.schema.js +34 -27
- package/dist/step-02.schema.js.map +1 -1
- package/dist/step-03.schema.d.ts +24 -300
- package/dist/step-03.schema.d.ts.map +1 -1
- package/dist/step-03.schema.js +24 -60
- package/dist/step-03.schema.js.map +1 -1
- package/dist/step-04.schema.d.ts +56 -50
- package/dist/step-04.schema.d.ts.map +1 -1
- package/dist/step-04.schema.js +48 -43
- package/dist/step-04.schema.js.map +1 -1
- package/dist/step-05.schema.d.ts +13 -52
- package/dist/step-05.schema.d.ts.map +1 -1
- package/dist/step-05.schema.js +19 -40
- package/dist/step-05.schema.js.map +1 -1
- package/dist/step-06.schema.d.ts +101 -117
- package/dist/step-06.schema.d.ts.map +1 -1
- package/dist/step-06.schema.js +70 -75
- package/dist/step-06.schema.js.map +1 -1
- package/dist/step-07.schema.d.ts +44 -95
- package/dist/step-07.schema.d.ts.map +1 -1
- package/dist/step-07.schema.js +51 -78
- package/dist/step-07.schema.js.map +1 -1
- package/dist/step-08.schema.d.ts +31 -44
- package/dist/step-08.schema.d.ts.map +1 -1
- package/dist/step-08.schema.js +30 -47
- package/dist/step-08.schema.js.map +1 -1
- package/dist/step-09.schema.d.ts +48 -85
- package/dist/step-09.schema.d.ts.map +1 -1
- package/dist/step-09.schema.js +42 -120
- package/dist/step-09.schema.js.map +1 -1
- package/dist/step-10.schema.d.ts +32 -86
- package/dist/step-10.schema.d.ts.map +1 -1
- package/dist/step-10.schema.js +44 -120
- package/dist/step-10.schema.js.map +1 -1
- package/dist/step-11.schema.d.ts +36 -92
- package/dist/step-11.schema.d.ts.map +1 -1
- package/dist/step-11.schema.js +32 -111
- package/dist/step-11.schema.js.map +1 -1
- package/dist/step-12.schema.d.ts +56 -93
- package/dist/step-12.schema.d.ts.map +1 -1
- package/dist/step-12.schema.js +77 -133
- package/dist/step-12.schema.js.map +1 -1
- package/package.json +1 -1
package/dist/step-10.schema.d.ts
CHANGED
|
@@ -1,93 +1,39 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* All 16 MBTI personality types plus NOT_SURE.
|
|
4
|
-
* Using a chip selector rather than free text prevents typos and enables analytics.
|
|
5
|
-
*/
|
|
6
|
-
export declare const MBTI_TYPES: readonly ["INTJ", "INTP", "ENTJ", "ENTP", "INFJ", "INFP", "ENFJ", "ENFP", "ISTJ", "ISFJ", "ESTJ", "ESFJ", "ISTP", "ISFP", "ESTP", "ESFP", "NOT_SURE"];
|
|
7
1
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
2
|
+
* Step 10 — World View & Experience
|
|
3
|
+
*
|
|
4
|
+
* Fields: viewOnAnimalCruelty, viewOnLgbtqStatements, viewOnLgbtqOpinion,
|
|
5
|
+
* viewOnTransgenderInclusion, viewOnTransgenderOpinion,
|
|
6
|
+
* facingCasteDiscrimination, casteDiscriminationPlaces, viewOnGenderEquality
|
|
7
|
+
*
|
|
8
|
+
* @module udp-schema/step-10
|
|
10
9
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export declare const ASSESSMENT_ACCURACY_RATINGS: readonly ["NOT_ACCURATE", "SOMEWHAT_ACCURATE", "MOSTLY_ACCURATE", "VERY_ACCURATE"];
|
|
20
|
-
export declare const step10PsychologicalSchema: z.ZodObject<{
|
|
21
|
-
mbtiType: z.ZodOptional<z.ZodEnum<{
|
|
22
|
-
NOT_SURE: "NOT_SURE";
|
|
23
|
-
INTJ: "INTJ";
|
|
24
|
-
INTP: "INTP";
|
|
25
|
-
ENTJ: "ENTJ";
|
|
26
|
-
ENTP: "ENTP";
|
|
27
|
-
INFJ: "INFJ";
|
|
28
|
-
INFP: "INFP";
|
|
29
|
-
ENFJ: "ENFJ";
|
|
30
|
-
ENFP: "ENFP";
|
|
31
|
-
ISTJ: "ISTJ";
|
|
32
|
-
ISFJ: "ISFJ";
|
|
33
|
-
ESTJ: "ESTJ";
|
|
34
|
-
ESFJ: "ESFJ";
|
|
35
|
-
ISTP: "ISTP";
|
|
36
|
-
ISFP: "ISFP";
|
|
37
|
-
ESTP: "ESTP";
|
|
38
|
-
ESFP: "ESFP";
|
|
39
|
-
}>>;
|
|
40
|
-
mbtiTestSource: z.ZodOptional<z.ZodString>;
|
|
41
|
-
mbtiTestYear: z.ZodOptional<z.ZodString>;
|
|
42
|
-
big5Scores: z.ZodOptional<z.ZodObject<{
|
|
43
|
-
openness: z.ZodOptional<z.ZodString>;
|
|
44
|
-
conscientiousness: z.ZodOptional<z.ZodString>;
|
|
45
|
-
extraversion: z.ZodOptional<z.ZodString>;
|
|
46
|
-
agreeableness: z.ZodOptional<z.ZodString>;
|
|
47
|
-
neuroticism: z.ZodOptional<z.ZodString>;
|
|
48
|
-
}, z.core.$strip>>;
|
|
49
|
-
big5TestSource: z.ZodOptional<z.ZodString>;
|
|
50
|
-
enneagramType: z.ZodOptional<z.ZodEnum<{
|
|
51
|
-
NOT_SURE: "NOT_SURE";
|
|
52
|
-
TYPE_1: "TYPE_1";
|
|
53
|
-
TYPE_2: "TYPE_2";
|
|
54
|
-
TYPE_3: "TYPE_3";
|
|
55
|
-
TYPE_4: "TYPE_4";
|
|
56
|
-
TYPE_5: "TYPE_5";
|
|
57
|
-
TYPE_6: "TYPE_6";
|
|
58
|
-
TYPE_7: "TYPE_7";
|
|
59
|
-
TYPE_8: "TYPE_8";
|
|
60
|
-
TYPE_9: "TYPE_9";
|
|
61
|
-
}>>;
|
|
62
|
-
enneagramWing: z.ZodOptional<z.ZodString>;
|
|
63
|
-
enneagramSource: z.ZodOptional<z.ZodString>;
|
|
64
|
-
attachmentStyle: z.ZodOptional<z.ZodEnum<{
|
|
65
|
-
NOT_SURE: "NOT_SURE";
|
|
66
|
-
SECURE: "SECURE";
|
|
67
|
-
ANXIOUS_PREOCCUPIED: "ANXIOUS_PREOCCUPIED";
|
|
68
|
-
DISMISSIVE_AVOIDANT: "DISMISSIVE_AVOIDANT";
|
|
69
|
-
FEARFUL_AVOIDANT: "FEARFUL_AVOIDANT";
|
|
70
|
-
}>>;
|
|
71
|
-
discProfile: z.ZodOptional<z.ZodEnum<{
|
|
72
|
-
NOT_SURE: "NOT_SURE";
|
|
73
|
-
D: "D";
|
|
74
|
-
I: "I";
|
|
75
|
-
S: "S";
|
|
76
|
-
C: "C";
|
|
77
|
-
}>>;
|
|
78
|
-
psychopathyScaleResult: z.ZodOptional<z.ZodString>;
|
|
79
|
-
narcissismScaleResult: z.ZodOptional<z.ZodString>;
|
|
80
|
-
assessmentAccuracyRating: z.ZodOptional<z.ZodEnum<{
|
|
81
|
-
NOT_ACCURATE: "NOT_ACCURATE";
|
|
82
|
-
SOMEWHAT_ACCURATE: "SOMEWHAT_ACCURATE";
|
|
83
|
-
MOSTLY_ACCURATE: "MOSTLY_ACCURATE";
|
|
84
|
-
VERY_ACCURATE: "VERY_ACCURATE";
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
export declare const step10WorldViewSchema: z.ZodObject<{
|
|
12
|
+
viewOnAnimalCruelty: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
prefer_not_to_say: "prefer_not_to_say";
|
|
14
|
+
strongly_against: "strongly_against";
|
|
15
|
+
against_but_food: "against_but_food";
|
|
16
|
+
neutral: "neutral";
|
|
17
|
+
acceptable_in_tradition: "acceptable_in_tradition";
|
|
85
18
|
}>>;
|
|
86
|
-
|
|
19
|
+
viewOnLgbtqStatements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
20
|
+
viewOnLgbtqOpinion: z.ZodOptional<z.ZodString>;
|
|
21
|
+
viewOnTransgenderInclusion: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
+
viewOnTransgenderOpinion: z.ZodOptional<z.ZodString>;
|
|
23
|
+
facingCasteDiscrimination: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
PREFER_NOT_SAY: "PREFER_NOT_SAY";
|
|
87
25
|
NO: "NO";
|
|
88
|
-
|
|
26
|
+
YES_OFTEN: "YES_OFTEN";
|
|
27
|
+
YES_SOMETIMES: "YES_SOMETIMES";
|
|
28
|
+
}>>;
|
|
29
|
+
casteDiscriminationPlaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
viewOnGenderEquality: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
prefer_not_to_say: "prefer_not_to_say";
|
|
32
|
+
strong_advocate: "strong_advocate";
|
|
33
|
+
supportive: "supportive";
|
|
34
|
+
traditional_values: "traditional_values";
|
|
35
|
+
no_opinion: "no_opinion";
|
|
89
36
|
}>>;
|
|
90
|
-
assessmentNotes: z.ZodOptional<z.ZodString>;
|
|
91
37
|
}, z.core.$strip>;
|
|
92
|
-
export type
|
|
38
|
+
export type Step10WorldViewInput = z.infer<typeof step10WorldViewSchema>;
|
|
93
39
|
//# sourceMappingURL=step-10.schema.d.ts.map
|
|
@@ -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
|
|
1
|
+
{"version":3,"file":"step-10.schema.d.ts","sourceRoot":"","sources":["../src/step-10.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0ChC,CAAC;AAIH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/step-10.schema.js
CHANGED
|
@@ -1,124 +1,48 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
// ─── Enums ────────────────────────────────────────────────────────────────────
|
|
3
|
-
/**
|
|
4
|
-
* All 16 MBTI personality types plus NOT_SURE.
|
|
5
|
-
* Using a chip selector rather than free text prevents typos and enables analytics.
|
|
6
|
-
*/
|
|
7
|
-
export const MBTI_TYPES = [
|
|
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',
|
|
24
|
-
'NOT_SURE',
|
|
25
|
-
];
|
|
26
|
-
/**
|
|
27
|
-
* Enneagram types 1–9 plus subtypes for wing notation (e.g. 4w5).
|
|
28
|
-
* Simplified to base type + NOT_SURE for accessibility.
|
|
29
|
-
*/
|
|
30
|
-
export const ENNEAGRAM_TYPES = [
|
|
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',
|
|
40
|
-
'NOT_SURE',
|
|
41
|
-
];
|
|
42
1
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
2
|
+
* Step 10 — World View & Experience
|
|
3
|
+
*
|
|
4
|
+
* Fields: viewOnAnimalCruelty, viewOnLgbtqStatements, viewOnLgbtqOpinion,
|
|
5
|
+
* viewOnTransgenderInclusion, viewOnTransgenderOpinion,
|
|
6
|
+
* facingCasteDiscrimination, casteDiscriminationPlaces, viewOnGenderEquality
|
|
7
|
+
*
|
|
8
|
+
* @module udp-schema/step-10
|
|
45
9
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
mbtiTestYear: z.string().trim().optional(),
|
|
84
|
-
// ── 10.2 Big Five / OCEAN ──────────────────────────────────────────────────
|
|
85
|
-
big5Scores: big5ScoresSchema.optional(),
|
|
86
|
-
big5TestSource: z.string().trim().optional(),
|
|
87
|
-
// ── 10.3 Enneagram (added — very popular, complementary to MBTI) ──────────
|
|
88
|
-
/**
|
|
89
|
-
* Enneagram focuses on core motivations and fears — different lens from MBTI.
|
|
90
|
-
* Widely used in leadership development, team coaching.
|
|
91
|
-
*/
|
|
92
|
-
enneagramType: z.enum(ENNEAGRAM_TYPES).optional(),
|
|
93
|
-
enneagramWing: z.string().trim().optional(), // free text e.g. "4w5", "3w4"
|
|
94
|
-
enneagramSource: z.string().trim().optional(),
|
|
95
|
-
// ── 10.4 Attachment Style (added — highly diagnostic for relationships) ────
|
|
96
|
-
/**
|
|
97
|
-
* Attachment style shapes how people handle trust, conflict, and intimacy.
|
|
98
|
-
* Critical for understanding interpersonal leadership dynamics.
|
|
99
|
-
*/
|
|
100
|
-
attachmentStyle: z.enum(ATTACHMENT_STYLES).optional(),
|
|
101
|
-
// ── 10.5 DISC Profile (added — widely used in professional contexts) ───────
|
|
102
|
-
discProfile: z.enum(DISC_PROFILES).optional(),
|
|
103
|
-
// ── 10.6 Other Scales (from original spec) ────────────────────────────────
|
|
104
|
-
/**
|
|
105
|
-
* Self-reported results from validated scales if user has taken them.
|
|
106
|
-
* Kept as optional free text — no standard scoring format to enforce.
|
|
107
|
-
*/
|
|
108
|
-
psychopathyScaleResult: z.string().trim().optional(),
|
|
109
|
-
narcissismScaleResult: z.string().trim().optional(),
|
|
110
|
-
// ── 10.7 Self-Accuracy & Consent ──────────────────────────────────────────
|
|
111
|
-
/**
|
|
112
|
-
* Meta-assessment: how much the user trusts their own results.
|
|
113
|
-
* Important signal for data quality weighting.
|
|
114
|
-
*/
|
|
115
|
-
assessmentAccuracyRating: z.enum(ASSESSMENT_ACCURACY_RATINGS).optional(),
|
|
116
|
-
/**
|
|
117
|
-
* Explicit consent to use psychological data for role/responsibility matching.
|
|
118
|
-
* Separate from general consent to make data usage transparent.
|
|
119
|
-
*/
|
|
120
|
-
assessmentDataConsent: z.enum(['YES', 'NO']).optional(),
|
|
121
|
-
/** Open-ended space for caveats, context, or additional notes. */
|
|
122
|
-
assessmentNotes: z.string().trim().optional(),
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
// ─── Main Step 10 Schema ────────────────────────────────────────────────────
|
|
12
|
+
export const step10WorldViewSchema = z.object({
|
|
13
|
+
/** View on animal cruelty */
|
|
14
|
+
viewOnAnimalCruelty: z
|
|
15
|
+
.enum([
|
|
16
|
+
'strongly_against',
|
|
17
|
+
'against_but_food',
|
|
18
|
+
'neutral',
|
|
19
|
+
'acceptable_in_tradition',
|
|
20
|
+
'prefer_not_to_say',
|
|
21
|
+
])
|
|
22
|
+
.optional(),
|
|
23
|
+
/** LGBTQ+ views — multi-select statements (reused from existing UDP) */
|
|
24
|
+
viewOnLgbtqStatements: z.array(z.string().trim()).optional(),
|
|
25
|
+
/** LGBTQ+ opinion — free text */
|
|
26
|
+
viewOnLgbtqOpinion: z.string().trim().max(500).optional(),
|
|
27
|
+
/** Transgender inclusion — multi-select statements (reused from existing UDP) */
|
|
28
|
+
viewOnTransgenderInclusion: z.array(z.string().trim()).optional(),
|
|
29
|
+
/** Transgender opinion — free text */
|
|
30
|
+
viewOnTransgenderOpinion: z.string().trim().max(500).optional(),
|
|
31
|
+
/** Facing caste-based discrimination */
|
|
32
|
+
facingCasteDiscrimination: z
|
|
33
|
+
.enum(['YES_OFTEN', 'YES_SOMETIMES', 'NO', 'PREFER_NOT_SAY'])
|
|
34
|
+
.optional(),
|
|
35
|
+
/** Places where caste discrimination is faced (multi-select) */
|
|
36
|
+
casteDiscriminationPlaces: z.array(z.string().trim()).optional(),
|
|
37
|
+
/** View on gender equality */
|
|
38
|
+
viewOnGenderEquality: z
|
|
39
|
+
.enum([
|
|
40
|
+
'strong_advocate',
|
|
41
|
+
'supportive',
|
|
42
|
+
'traditional_values',
|
|
43
|
+
'no_opinion',
|
|
44
|
+
'prefer_not_to_say',
|
|
45
|
+
])
|
|
46
|
+
.optional(),
|
|
123
47
|
});
|
|
124
48
|
//# sourceMappingURL=step-10.schema.js.map
|
|
@@ -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
|
|
1
|
+
{"version":3,"file":"step-10.schema.js","sourceRoot":"","sources":["../src/step-10.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,6BAA6B;IAC7B,mBAAmB,EAAE,CAAC;SACnB,IAAI,CAAC;QACJ,kBAAkB;QAClB,kBAAkB;QAClB,SAAS;QACT,yBAAyB;QACzB,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;IAEb,wEAAwE;IACxE,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IAE5D,iCAAiC;IACjC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAEzD,iFAAiF;IACjF,0BAA0B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEjE,sCAAsC;IACtC,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAE/D,wCAAwC;IACxC,yBAAyB,EAAE,CAAC;SACzB,IAAI,CAAC,CAAC,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;SAC5D,QAAQ,EAAE;IAEb,gEAAgE;IAChE,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEhE,8BAA8B;IAC9B,oBAAoB,EAAE,CAAC;SACpB,IAAI,CAAC;QACJ,iBAAiB;QACjB,YAAY;QACZ,oBAAoB;QACpB,YAAY;QACZ,mBAAmB;KACpB,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC","sourcesContent":["/**\n * Step 10 — World View & Experience\n *\n * Fields: viewOnAnimalCruelty, viewOnLgbtqStatements, viewOnLgbtqOpinion,\n * viewOnTransgenderInclusion, viewOnTransgenderOpinion,\n * facingCasteDiscrimination, casteDiscriminationPlaces, viewOnGenderEquality\n *\n * @module udp-schema/step-10\n */\n\nimport { z } from 'zod';\n\n// ─── Main Step 10 Schema ────────────────────────────────────────────────────\n\nexport const step10WorldViewSchema = z.object({\n /** View on animal cruelty */\n viewOnAnimalCruelty: z\n .enum([\n 'strongly_against',\n 'against_but_food',\n 'neutral',\n 'acceptable_in_tradition',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** LGBTQ+ views — multi-select statements (reused from existing UDP) */\n viewOnLgbtqStatements: z.array(z.string().trim()).optional(),\n\n /** LGBTQ+ opinion — free text */\n viewOnLgbtqOpinion: z.string().trim().max(500).optional(),\n\n /** Transgender inclusion — multi-select statements (reused from existing UDP) */\n viewOnTransgenderInclusion: z.array(z.string().trim()).optional(),\n\n /** Transgender opinion — free text */\n viewOnTransgenderOpinion: z.string().trim().max(500).optional(),\n\n /** Facing caste-based discrimination */\n facingCasteDiscrimination: z\n .enum(['YES_OFTEN', 'YES_SOMETIMES', 'NO', 'PREFER_NOT_SAY'])\n .optional(),\n\n /** Places where caste discrimination is faced (multi-select) */\n casteDiscriminationPlaces: z.array(z.string().trim()).optional(),\n\n /** View on gender equality */\n viewOnGenderEquality: z\n .enum([\n 'strong_advocate',\n 'supportive',\n 'traditional_values',\n 'no_opinion',\n 'prefer_not_to_say',\n ])\n .optional(),\n});\n\n// ─── Inferred types ─────────────────────────────────────────────────────────\n\nexport type Step10WorldViewInput = z.infer<typeof step10WorldViewSchema>;\n"]}
|
package/dist/step-11.schema.d.ts
CHANGED
|
@@ -1,96 +1,40 @@
|
|
|
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
1
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
2
|
+
* Step 11 — Residence & Address
|
|
3
|
+
*
|
|
4
|
+
* Simplified: 3 fields per address (state, district, village/colony).
|
|
5
|
+
* Fields: currentAddress, permanentAddress, homeNativePlace, ancestralPlace
|
|
6
|
+
*
|
|
7
|
+
* @module udp-schema/step-11
|
|
19
8
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export declare const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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>;
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
export declare const simplifiedAddressSchema: z.ZodObject<{
|
|
11
|
+
state: z.ZodOptional<z.ZodString>;
|
|
12
|
+
district: z.ZodOptional<z.ZodString>;
|
|
13
|
+
village: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const step11ResidenceSchema: z.ZodObject<{
|
|
16
|
+
currentAddress: z.ZodOptional<z.ZodObject<{
|
|
17
|
+
state: z.ZodOptional<z.ZodString>;
|
|
18
|
+
district: z.ZodOptional<z.ZodString>;
|
|
19
|
+
village: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
permanentAddress: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
state: z.ZodOptional<z.ZodString>;
|
|
23
|
+
district: z.ZodOptional<z.ZodString>;
|
|
24
|
+
village: z.ZodOptional<z.ZodString>;
|
|
25
|
+
sameAsCurrent: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
homeNativePlace: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
state: z.ZodOptional<z.ZodString>;
|
|
29
|
+
district: z.ZodOptional<z.ZodString>;
|
|
30
|
+
village: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
ancestralPlace: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
state: z.ZodOptional<z.ZodString>;
|
|
34
|
+
district: z.ZodOptional<z.ZodString>;
|
|
35
|
+
village: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
94
37
|
}, z.core.$strip>;
|
|
95
|
-
export type
|
|
38
|
+
export type SimplifiedAddressInput = z.infer<typeof simplifiedAddressSchema>;
|
|
39
|
+
export type Step11ResidenceInput = z.infer<typeof step11ResidenceSchema>;
|
|
96
40
|
//# sourceMappingURL=step-11.schema.d.ts.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"step-11.schema.d.ts","sourceRoot":"","sources":["../src/step-11.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,uBAAuB;;;;iBAOlC,CAAC;AAIH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;iBAgBhC,CAAC;AAIH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/step-11.schema.js
CHANGED
|
@@ -1,115 +1,36 @@
|
|
|
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
1
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
2
|
+
* Step 11 — Residence & Address
|
|
3
|
+
*
|
|
4
|
+
* Simplified: 3 fields per address (state, district, village/colony).
|
|
5
|
+
* Fields: currentAddress, permanentAddress, homeNativePlace, ancestralPlace
|
|
6
|
+
*
|
|
7
|
+
* @module udp-schema/step-11
|
|
39
8
|
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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(),
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
// ─── Address sub-schema (simplified) ─────────────────────────────────────────
|
|
11
|
+
/** Area reference — ObjectId string pointing to location-db entity */
|
|
12
|
+
const areaRefSchema = z.string().trim().optional();
|
|
13
|
+
export const simplifiedAddressSchema = z.object({
|
|
14
|
+
/** State area ref */
|
|
15
|
+
state: areaRefSchema,
|
|
16
|
+
/** District area ref */
|
|
17
|
+
district: areaRefSchema,
|
|
18
|
+
/** Smallest area unit — village, colony, ward, etc. */
|
|
19
|
+
village: areaRefSchema,
|
|
20
|
+
});
|
|
21
|
+
// ─── Main Step 11 Schema ────────────────────────────────────────────────────
|
|
22
|
+
export const step11ResidenceSchema = z.object({
|
|
23
|
+
/** Current living address */
|
|
24
|
+
currentAddress: simplifiedAddressSchema.optional(),
|
|
25
|
+
/** Permanent address — may have "same as current" flag */
|
|
26
|
+
permanentAddress: simplifiedAddressSchema
|
|
27
|
+
.extend({
|
|
28
|
+
sameAsCurrent: z.boolean().optional(),
|
|
29
|
+
})
|
|
30
|
+
.optional(),
|
|
31
|
+
/** Home native place */
|
|
32
|
+
homeNativePlace: simplifiedAddressSchema.optional(),
|
|
33
|
+
/** Ancestral place */
|
|
34
|
+
ancestralPlace: simplifiedAddressSchema.optional(),
|
|
114
35
|
});
|
|
115
36
|
//# sourceMappingURL=step-11.schema.js.map
|