udp-schema 2.7.0 → 2.9.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/helpers.d.ts.map +1 -1
- package/dist/helpers.js +10 -3
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/onboarding-config.d.ts.map +1 -1
- package/dist/onboarding-config.js +14 -0
- package/dist/onboarding-config.js.map +1 -1
- package/dist/onboarding-form.d.ts +64 -6
- package/dist/onboarding-form.d.ts.map +1 -1
- package/dist/profile-fields/01-profile.d.ts +81 -9
- package/dist/profile-fields/01-profile.d.ts.map +1 -1
- package/dist/profile-fields/01-profile.js +107 -12
- package/dist/profile-fields/01-profile.js.map +1 -1
- package/dist/profile-fields/02-political.d.ts +188 -2
- package/dist/profile-fields/02-political.d.ts.map +1 -1
- package/dist/profile-fields/02-political.js +146 -4
- package/dist/profile-fields/02-political.js.map +1 -1
- package/dist/profile-fields/index.d.ts +1 -1
- package/dist/profile-fields/index.d.ts.map +1 -1
- package/dist/profile-fields/index.js +1 -1
- package/dist/profile-fields/index.js.map +1 -1
- package/dist/profile-fields/types.d.ts +9 -1
- package/dist/profile-fields/types.d.ts.map +1 -1
- package/dist/profile-fields/types.js.map +1 -1
- package/dist/progress-fields.d.ts.map +1 -1
- package/dist/progress-fields.js +2 -0
- package/dist/progress-fields.js.map +1 -1
- package/dist/step-01.schema.d.ts +15 -4
- package/dist/step-01.schema.d.ts.map +1 -1
- package/dist/step-01.schema.js +31 -4
- package/dist/step-01.schema.js.map +1 -1
- package/dist/step-02.schema.d.ts +47 -0
- package/dist/step-02.schema.d.ts.map +1 -1
- package/dist/step-02.schema.js +56 -4
- package/dist/step-02.schema.js.map +1 -1
- package/dist/step-10.schema.d.ts +1 -1
- package/dist/step-12.schema.d.ts +1 -1
- package/package.json +1 -1
package/dist/step-02.schema.d.ts
CHANGED
|
@@ -21,18 +21,65 @@ export declare const step02PoliticalSchema: z.ZodObject<{
|
|
|
21
21
|
apolitical: "apolitical";
|
|
22
22
|
}>>;
|
|
23
23
|
selfPartyAssociation: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
|
|
24
|
+
partyAssociationRole: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
prefer_not_to_say: "prefer_not_to_say";
|
|
26
|
+
none: "none";
|
|
27
|
+
member: "member";
|
|
28
|
+
active_worker: "active_worker";
|
|
29
|
+
office_bearer: "office_bearer";
|
|
30
|
+
candidate: "candidate";
|
|
31
|
+
spokesperson: "spokesperson";
|
|
32
|
+
volunteer: "volunteer";
|
|
33
|
+
sympathizer: "sympathizer";
|
|
34
|
+
}>>;
|
|
24
35
|
familyPartyAssociation: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
|
|
36
|
+
relativesInPolitics: z.ZodOptional<z.ZodEnum<{
|
|
37
|
+
prefer_not_to_say: "prefer_not_to_say";
|
|
38
|
+
none: "none";
|
|
39
|
+
immediate_family: "immediate_family";
|
|
40
|
+
extended_family: "extended_family";
|
|
41
|
+
both: "both";
|
|
42
|
+
dont_know: "dont_know";
|
|
43
|
+
}>>;
|
|
25
44
|
publicOfficeAndElections: z.ZodOptional<z.ZodObject<{
|
|
26
45
|
hasHeldOffice: z.ZodOptional<z.ZodEnum<{
|
|
27
46
|
prefer_not_to_say: "prefer_not_to_say";
|
|
28
47
|
yes: "yes";
|
|
29
48
|
no: "no";
|
|
30
49
|
}>>;
|
|
50
|
+
officeLevel: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
other: "other";
|
|
52
|
+
panchayat: "panchayat";
|
|
53
|
+
ward: "ward";
|
|
54
|
+
municipality: "municipality";
|
|
55
|
+
block: "block";
|
|
56
|
+
district: "district";
|
|
57
|
+
assembly: "assembly";
|
|
58
|
+
parliament: "parliament";
|
|
59
|
+
}>>;
|
|
60
|
+
officeYears: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
|
|
31
61
|
officeDetails: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
|
|
32
62
|
electionContested: z.ZodOptional<z.ZodEnum<{
|
|
33
63
|
yes: "yes";
|
|
34
64
|
no: "no";
|
|
35
65
|
}>>;
|
|
66
|
+
electionLevel: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
other: "other";
|
|
68
|
+
panchayat: "panchayat";
|
|
69
|
+
ward: "ward";
|
|
70
|
+
municipality: "municipality";
|
|
71
|
+
block: "block";
|
|
72
|
+
district: "district";
|
|
73
|
+
assembly: "assembly";
|
|
74
|
+
parliament: "parliament";
|
|
75
|
+
}>>;
|
|
76
|
+
electionYear: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
|
|
77
|
+
electionResult: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
won: "won";
|
|
79
|
+
lost: "lost";
|
|
80
|
+
withdrew: "withdrew";
|
|
81
|
+
ongoing: "ongoing";
|
|
82
|
+
}>>;
|
|
36
83
|
electionDetails: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
|
|
37
84
|
}, z.core.$strip>>;
|
|
38
85
|
networkAndCivicEngagement: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-02.schema.d.ts","sourceRoot":"","sources":["../src/step-02.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"step-02.schema.d.ts","sourceRoot":"","sources":["../src/step-02.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyFhC,CAAC;AAIH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/step-02.schema.js
CHANGED
|
@@ -25,16 +25,68 @@ export const step02PoliticalSchema = z.object({
|
|
|
25
25
|
'prefer_not_to_say',
|
|
26
26
|
])
|
|
27
27
|
.optional(),
|
|
28
|
-
/** Self party association */
|
|
28
|
+
/** Self party association — party key (e.g. "bjp", "inc", "none") */
|
|
29
29
|
selfPartyAssociation: optionalTrimmedString,
|
|
30
|
-
/**
|
|
30
|
+
/** Nature of association with the party — only meaningful when selfPartyAssociation is a real party. */
|
|
31
|
+
partyAssociationRole: z
|
|
32
|
+
.enum([
|
|
33
|
+
'member',
|
|
34
|
+
'active_worker',
|
|
35
|
+
'office_bearer',
|
|
36
|
+
'candidate',
|
|
37
|
+
'spokesperson',
|
|
38
|
+
'volunteer',
|
|
39
|
+
'sympathizer',
|
|
40
|
+
'none',
|
|
41
|
+
'prefer_not_to_say',
|
|
42
|
+
])
|
|
43
|
+
.optional(),
|
|
44
|
+
/** Family party association — same party-key enum via free string. */
|
|
31
45
|
familyPartyAssociation: optionalTrimmedString,
|
|
32
|
-
/**
|
|
46
|
+
/** Relatives in politics (immediate / extended / both / none / prefer-not). */
|
|
47
|
+
relativesInPolitics: z
|
|
48
|
+
.enum([
|
|
49
|
+
'none',
|
|
50
|
+
'immediate_family',
|
|
51
|
+
'extended_family',
|
|
52
|
+
'both',
|
|
53
|
+
'dont_know',
|
|
54
|
+
'prefer_not_to_say',
|
|
55
|
+
])
|
|
56
|
+
.optional(),
|
|
57
|
+
/** Public office and elections history. */
|
|
33
58
|
publicOfficeAndElections: z
|
|
34
59
|
.object({
|
|
35
60
|
hasHeldOffice: z.enum(['yes', 'no', 'prefer_not_to_say']).optional(),
|
|
36
|
-
|
|
61
|
+
officeLevel: z
|
|
62
|
+
.enum([
|
|
63
|
+
'panchayat',
|
|
64
|
+
'ward',
|
|
65
|
+
'municipality',
|
|
66
|
+
'block',
|
|
67
|
+
'district',
|
|
68
|
+
'assembly',
|
|
69
|
+
'parliament',
|
|
70
|
+
'other',
|
|
71
|
+
])
|
|
72
|
+
.optional(),
|
|
73
|
+
officeYears: optionalTrimmedString, // e.g. "2018-2023"
|
|
74
|
+
officeDetails: optionalTrimmedString, // free text — position name / notes
|
|
37
75
|
electionContested: z.enum(['yes', 'no']).optional(),
|
|
76
|
+
electionLevel: z
|
|
77
|
+
.enum([
|
|
78
|
+
'panchayat',
|
|
79
|
+
'ward',
|
|
80
|
+
'municipality',
|
|
81
|
+
'block',
|
|
82
|
+
'district',
|
|
83
|
+
'assembly',
|
|
84
|
+
'parliament',
|
|
85
|
+
'other',
|
|
86
|
+
])
|
|
87
|
+
.optional(),
|
|
88
|
+
electionYear: optionalTrimmedString, // e.g. "2023"
|
|
89
|
+
electionResult: z.enum(['won', 'lost', 'withdrew', 'ongoing']).optional(),
|
|
38
90
|
electionDetails: optionalTrimmedString,
|
|
39
91
|
})
|
|
40
92
|
.optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-02.schema.js","sourceRoot":"","sources":["../src/step-02.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,+EAA+E;AAE/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,+FAA+F;IAC/F,iBAAiB,EAAE,CAAC;SACjB,IAAI,CAAC;QACJ,UAAU;QACV,MAAM;QACN,aAAa;QACb,UAAU;QACV,cAAc;QACd,OAAO;QACP,WAAW;QACX,aAAa;QACb,YAAY;QACZ,mB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ACP,UAAU;YACV,UAAU;YACV,YAAY;YACZ,OAAO;SACR,CAAC;aACD,QAAQ,EAAE;QACb,WAAW,EAAE,qBAAqB,EAAE,mBAAmB;QACvD,aAAa,EAAE,qBAAqB,EAAE,oCAAoC;QAC1E,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE;QACnD,aAAa,EAAE,CAAC;aACb,IAAI,CAAC;YACJ,WAAW;YACX,MAAM;YACN,cAAc;YACd,OAAO;YACP,UAAU;YACV,UAAU;YACV,YAAY;YACZ,OAAO;SACR,CAAC;aACD,QAAQ,EAAE;QACb,YAAY,EAAE,qBAAqB,EAAE,cAAc;QACnD,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;QACzE,eAAe,EAAE,qBAAqB;KACvC,CAAC;SACD,QAAQ,EAAE;IAEb,kDAAkD;IAClD,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;CACjE,CAAC,CAAC","sourcesContent":["/**\n * Step 02 — Political Association & History\n *\n * Fields: politicalSpectrum, selfPartyAssociation, familyPartyAssociation,\n * publicOfficeAndElections, networkAndCivicEngagement\n *\n * @module udp-schema/step-02\n */\n\nimport { z } from 'zod';\nimport { optionalTrimmedString } from './zod-helpers.js';\n\n// ─── Main Step 02 Schema ────────────────────────────────────────────────────\n\nexport const step02PoliticalSchema = z.object({\n /** Political spectrum — left/right axis (matches dating-schema politicalOrientation values) */\n politicalSpectrum: z\n .enum([\n 'far_left',\n 'left',\n 'centre_left',\n 'centrist',\n 'centre_right',\n 'right',\n 'far_right',\n 'libertarian',\n 'apolitical',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** Self party association — party key (e.g. \"bjp\", \"inc\", \"none\") */\n selfPartyAssociation: optionalTrimmedString,\n\n /** Nature of association with the party — only meaningful when selfPartyAssociation is a real party. */\n partyAssociationRole: z\n .enum([\n 'member',\n 'active_worker',\n 'office_bearer',\n 'candidate',\n 'spokesperson',\n 'volunteer',\n 'sympathizer',\n 'none',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** Family party association — same party-key enum via free string. */\n familyPartyAssociation: optionalTrimmedString,\n\n /** Relatives in politics (immediate / extended / both / none / prefer-not). */\n relativesInPolitics: z\n .enum([\n 'none',\n 'immediate_family',\n 'extended_family',\n 'both',\n 'dont_know',\n 'prefer_not_to_say',\n ])\n .optional(),\n\n /** Public office and elections history. */\n publicOfficeAndElections: z\n .object({\n hasHeldOffice: z.enum(['yes', 'no', 'prefer_not_to_say']).optional(),\n officeLevel: z\n .enum([\n 'panchayat',\n 'ward',\n 'municipality',\n 'block',\n 'district',\n 'assembly',\n 'parliament',\n 'other',\n ])\n .optional(),\n officeYears: optionalTrimmedString, // e.g. \"2018-2023\"\n officeDetails: optionalTrimmedString, // free text — position name / notes\n electionContested: z.enum(['yes', 'no']).optional(),\n electionLevel: z\n .enum([\n 'panchayat',\n 'ward',\n 'municipality',\n 'block',\n 'district',\n 'assembly',\n 'parliament',\n 'other',\n ])\n .optional(),\n electionYear: optionalTrimmedString, // e.g. \"2023\"\n electionResult: z.enum(['won', 'lost', 'withdrew', 'ongoing']).optional(),\n electionDetails: optionalTrimmedString,\n })\n .optional(),\n\n /** Network and civic engagement (multi-select) */\n networkAndCivicEngagement: z.array(z.string().trim()).optional(),\n});\n\n// ─── Inferred types ─────────────────────────────────────────────────────────\n\nexport type Step02PoliticalInput = z.infer<typeof step02PoliticalSchema>;\n"]}
|
package/dist/step-10.schema.d.ts
CHANGED
|
@@ -21,10 +21,10 @@ export declare const step10WorldViewSchema: z.ZodObject<{
|
|
|
21
21
|
viewOnTransgenderInclusion: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
22
|
viewOnTransgenderOpinion: z.ZodOptional<z.ZodString>;
|
|
23
23
|
facingCasteDiscrimination: z.ZodOptional<z.ZodEnum<{
|
|
24
|
-
PREFER_NOT_SAY: "PREFER_NOT_SAY";
|
|
25
24
|
NO: "NO";
|
|
26
25
|
YES_OFTEN: "YES_OFTEN";
|
|
27
26
|
YES_SOMETIMES: "YES_SOMETIMES";
|
|
27
|
+
PREFER_NOT_SAY: "PREFER_NOT_SAY";
|
|
28
28
|
}>>;
|
|
29
29
|
casteDiscriminationPlaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
30
|
viewOnGenderEquality: z.ZodOptional<z.ZodEnum<{
|
package/dist/step-12.schema.d.ts
CHANGED
|
@@ -29,9 +29,9 @@ export declare const step12HouseholdSchema: z.ZodObject<{
|
|
|
29
29
|
}>>;
|
|
30
30
|
householdIncome: z.ZodOptional<z.ZodString>;
|
|
31
31
|
bplCard: z.ZodOptional<z.ZodEnum<{
|
|
32
|
+
dont_know: "dont_know";
|
|
32
33
|
yes: "yes";
|
|
33
34
|
no: "no";
|
|
34
|
-
dont_know: "dont_know";
|
|
35
35
|
applied: "applied";
|
|
36
36
|
}>>;
|
|
37
37
|
digitalAccess: z.ZodOptional<z.ZodArray<z.ZodString>>;
|