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.
Files changed (69) hide show
  1. package/dist/field-helpers.d.ts +10 -38
  2. package/dist/field-helpers.d.ts.map +1 -1
  3. package/dist/field-helpers.js +40 -66
  4. package/dist/field-helpers.js.map +1 -1
  5. package/dist/field-meta.d.ts +46 -28
  6. package/dist/field-meta.d.ts.map +1 -1
  7. package/dist/field-meta.js +304 -1016
  8. package/dist/field-meta.js.map +1 -1
  9. package/dist/index.d.ts +18 -18
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +34 -34
  12. package/dist/index.js.map +1 -1
  13. package/dist/onboarding-config.d.ts +44 -0
  14. package/dist/onboarding-config.d.ts.map +1 -0
  15. package/dist/onboarding-config.js +705 -0
  16. package/dist/onboarding-config.js.map +1 -0
  17. package/dist/progress-fields.d.ts +3 -3
  18. package/dist/progress-fields.d.ts.map +1 -1
  19. package/dist/progress-fields.js +73 -101
  20. package/dist/progress-fields.js.map +1 -1
  21. package/dist/step-01.schema.d.ts +84 -111
  22. package/dist/step-01.schema.d.ts.map +1 -1
  23. package/dist/step-01.schema.js +94 -101
  24. package/dist/step-01.schema.js.map +1 -1
  25. package/dist/step-02.schema.d.ts +31 -21
  26. package/dist/step-02.schema.d.ts.map +1 -1
  27. package/dist/step-02.schema.js +34 -27
  28. package/dist/step-02.schema.js.map +1 -1
  29. package/dist/step-03.schema.d.ts +24 -300
  30. package/dist/step-03.schema.d.ts.map +1 -1
  31. package/dist/step-03.schema.js +24 -60
  32. package/dist/step-03.schema.js.map +1 -1
  33. package/dist/step-04.schema.d.ts +56 -50
  34. package/dist/step-04.schema.d.ts.map +1 -1
  35. package/dist/step-04.schema.js +48 -43
  36. package/dist/step-04.schema.js.map +1 -1
  37. package/dist/step-05.schema.d.ts +13 -52
  38. package/dist/step-05.schema.d.ts.map +1 -1
  39. package/dist/step-05.schema.js +19 -40
  40. package/dist/step-05.schema.js.map +1 -1
  41. package/dist/step-06.schema.d.ts +101 -117
  42. package/dist/step-06.schema.d.ts.map +1 -1
  43. package/dist/step-06.schema.js +70 -75
  44. package/dist/step-06.schema.js.map +1 -1
  45. package/dist/step-07.schema.d.ts +44 -95
  46. package/dist/step-07.schema.d.ts.map +1 -1
  47. package/dist/step-07.schema.js +51 -78
  48. package/dist/step-07.schema.js.map +1 -1
  49. package/dist/step-08.schema.d.ts +31 -44
  50. package/dist/step-08.schema.d.ts.map +1 -1
  51. package/dist/step-08.schema.js +30 -47
  52. package/dist/step-08.schema.js.map +1 -1
  53. package/dist/step-09.schema.d.ts +48 -85
  54. package/dist/step-09.schema.d.ts.map +1 -1
  55. package/dist/step-09.schema.js +42 -120
  56. package/dist/step-09.schema.js.map +1 -1
  57. package/dist/step-10.schema.d.ts +32 -86
  58. package/dist/step-10.schema.d.ts.map +1 -1
  59. package/dist/step-10.schema.js +44 -120
  60. package/dist/step-10.schema.js.map +1 -1
  61. package/dist/step-11.schema.d.ts +36 -92
  62. package/dist/step-11.schema.d.ts.map +1 -1
  63. package/dist/step-11.schema.js +32 -111
  64. package/dist/step-11.schema.js.map +1 -1
  65. package/dist/step-12.schema.d.ts +56 -93
  66. package/dist/step-12.schema.d.ts.map +1 -1
  67. package/dist/step-12.schema.js +77 -133
  68. package/dist/step-12.schema.js.map +1 -1
  69. package/package.json +1 -1
@@ -1,80 +1,75 @@
1
+ /**
2
+ * Step 06 — Education History
3
+ *
4
+ * KEPT from old step-07 schema. Same structure: highest qualification,
5
+ * Class 10 & 12 details, degree repeaters, certificates, notes.
6
+ *
7
+ * @module udp-schema/step-06
8
+ */
1
9
  import { z } from 'zod';
2
- // ─── Step 06 Household, Economic & Digital Profile ─────────────────────────
3
- //
4
- // Covers: origins & migration, marital life, household & housing,
5
- // economic status (income / BPL / insurance), digital access & literacy,
6
- // and caregiving responsibilities.
7
- // ─────────────────────────────────────────────────────────────────────────────
8
- export const step06HouseholdSchema = z.object({
9
- // ── 6.1 Origins & Migration ───────────────────────────────────────────────
10
- // Note: birthplace is already captured in Step 3 (birthPlace field).
11
- /** Is this person living away from birthplace? */
12
- areYouMigrant: z.enum(['YES', 'NO'], {
13
- message: 'Please indicate if you are a migrant.',
14
- }),
15
- /** State and district migrated from (conditional: areYouMigrant == YES) */
16
- migrantFromStateDistrict: z.string().trim().optional(),
17
- /** Blood relatives in other Indian states? */
18
- bloodRelativesOtherState: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
19
- /** Blood relatives in other countries? */
20
- bloodRelativesOtherCountry: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
21
- /** Are any of those relatives NRIs? */
22
- bloodRelativesNri: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
23
- /** Is this person an NRI? */
24
- areYouNri: z.enum(['YES', 'NO', 'FORMER_NRI']).optional(),
25
- /** Brief international migration history (optional free text) */
26
- internationalMigrationHistory: z.string().trim().optional(),
27
- // ── 6.2 Marital Life ──────────────────────────────────────────────────────
28
- /** Current marital status */
29
- maritalStatus: z.enum(['SINGLE', 'ENGAGED', 'MARRIED', 'DIVORCED', 'WIDOWED', 'OTHER'], {
30
- message: 'Please select marital status.',
31
- }),
32
- /** Marriage timeline (conditional: maritalStatus != MARRIED) */
33
- planningMarriageTimeline: z
34
- .enum(['NOT_THINKING', 'WITHIN_1_YEAR', 'WITHIN_2_YEARS', 'AFTER_2_YEARS', 'ALREADY_MARRIED'])
10
+ import { optionalYearSchema } from './zod-helpers.js';
11
+ // ─── Reusable sub-schemas ────────────────────────────────────────────────────
12
+ export const degreeEntrySchema = z.object({
13
+ degreeName: z.string().trim().optional(),
14
+ institutionName: z.string().trim().optional(),
15
+ university: z.string().trim().optional(),
16
+ yearOfPassing: optionalYearSchema,
17
+ courseOrStream: z.string().trim().optional(),
18
+ marksOrGrade: z.string().trim().optional(),
19
+ isCurrentlyStudying: z.boolean().optional(),
20
+ });
21
+ export const certificateEntrySchema = z.object({
22
+ certificateName: z.string().trim().optional(),
23
+ institutionName: z.string().trim().optional(),
24
+ yearOfCompletion: optionalYearSchema,
25
+ fieldOrSubject: z.string().trim().optional(),
26
+ });
27
+ // ─── Main Step 06 Schema ────────────────────────────────────────────────────
28
+ export const step06EducationSchema = z.object({
29
+ /** Highest level of formal education completed or in progress */
30
+ highestQualification: z.enum([
31
+ 'CLASS_10',
32
+ 'CLASS_12',
33
+ 'DIPLOMA',
34
+ 'GRADUATION',
35
+ 'POST_GRAD',
36
+ 'PHD',
37
+ 'POST_DOCTORATE',
38
+ 'OTHER',
39
+ ], { message: 'Please select your highest qualification.' }),
40
+ /** Class 10 / Secondary school details */
41
+ education10th: z
42
+ .object({
43
+ board: z.string().trim().optional(),
44
+ schoolName: z.string().trim().optional(),
45
+ yearOfPassing: optionalYearSchema,
46
+ subjects: z.string().trim().optional(),
47
+ marksObtained: z.string().trim().optional(),
48
+ })
35
49
  .optional(),
36
- /** Actively looking for a marriage partner? */
37
- lookingForMarriagePartner: z
38
- .enum(['NO', 'YES_ACTIVE', 'YES_CASUAL', 'FAMILY_LOOKING'])
50
+ /** Class 12 / Higher Secondary details */
51
+ education12th: z
52
+ .object({
53
+ institutionName: z.string().trim().optional(),
54
+ boardOrUniversity: z.string().trim().optional(),
55
+ yearOfPassing: optionalYearSchema,
56
+ courseOrStream: z.string().trim().optional(),
57
+ marksOrGrade: z.string().trim().optional(),
58
+ })
39
59
  .optional(),
40
- // ── 6.3 Household & Housing ───────────────────────────────────────────────
41
- /** Family/household type */
42
- familyStructureType: z.enum(['NUCLEAR', 'JOINT', 'EXTENDED', 'SINGLE_PERSON'], {
43
- message: 'Please select family type.',
44
- }),
45
- /** Number of people sharing the same kitchen */
46
- householdSize: z
47
- .number({ message: 'Please enter a valid number.' })
48
- .int()
49
- .min(1, 'Household size must be at least 1.'),
50
- /** Type of house structure */
51
- housingType: z.enum(['KUTCHA', 'SEMI_PUCCA', 'PUCCA', 'APARTMENT', 'OTHER'], {
52
- message: 'Please select housing type.',
53
- }),
54
- /** Close family member settled in another state or abroad? */
55
- familyMemberSettledElsewhere: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
56
- // ── 6.4 Economic Status ───────────────────────────────────────────────────
57
- /** BPL (Below Poverty Line) ration card holder? */
58
- bplRationCardHolder: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
59
- /** Has life insurance? */
60
- hasLifeInsurance: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),
61
- /** Insurance details (conditional: hasLifeInsurance == YES) */
62
- lifeInsuranceDetails: z.string().trim().optional(),
63
- /** Annual personal income range */
64
- annualPersonalIncomeRange: z.enum(['BELOW_1L', '1_2L', '2_3L', '3_5L', '5_10L', 'ABOVE_10L', 'NO_INCOME', 'PREFER_NOT_SAY'], { message: 'Please select your personal income range.' }),
65
- /** Annual household income range */
66
- annualHouseholdIncomeRange: z.enum(['BELOW_1L', '1_2L', '2_3L', '3_5L', '5_10L', '10_20L', 'ABOVE_20L', 'PREFER_NOT_SAY'], { message: 'Please select household income range.' }),
67
- // ── 6.5 Digital Access & Literacy ─────────────────────────────────────────
68
- /** Which devices / connectivity options does this person have? */
69
- digitalAccess: z.array(z.string()).min(1, 'Please select at least one option.'),
70
- /** Self-assessed digital skill level */
71
- digitalSkillLevel: z.enum(['CANT_USE_SMARTPHONE', 'BASIC', 'COMFORTABLE_APPS_UPI', 'ADVANCED_TOOLS_CONTENT'], { message: 'Please select your digital skill level.' }),
72
- /** Reading & writing ability */
73
- literacyLevel: z.enum(['CANT_READ_WRITE', 'CAN_READ_ONLY', 'READ_WRITE_BASIC', 'FLUENT_ONE_LANGUAGE'], { message: 'Please select your literacy level.' }),
74
- // ── 6.6 Caregiving ────────────────────────────────────────────────────────
75
- /** Who does this person regularly care for? */
76
- caregivingResponsibilities: z.array(z.string()).optional(),
77
- /** Average daily caregiving hours (optional) */
78
- caregivingHoursPerDay: z.enum(['LESS_THAN_1', '1_TO_3', '3_TO_6', 'MORE_THAN_6']).optional(),
60
+ /** List of Diploma qualifications (one or more) */
61
+ diplomas: z.array(degreeEntrySchema).optional(),
62
+ /** List of Graduation / Bachelor's degree qualifications */
63
+ graduations: z.array(degreeEntrySchema).optional(),
64
+ /** List of Post Graduation / Master's degree qualifications */
65
+ postGraduations: z.array(degreeEntrySchema).optional(),
66
+ /** List of Doctorate / PhD qualifications */
67
+ doctorates: z.array(degreeEntrySchema).optional(),
68
+ /** List of Post Doctoral research or fellowships */
69
+ postDoctorates: z.array(degreeEntrySchema).optional(),
70
+ /** Other certificates, short courses, or professional qualifications */
71
+ otherCertificates: z.array(certificateEntrySchema).optional(),
72
+ /** Any additional notes about education background */
73
+ educationNotes: z.string().trim().optional(),
79
74
  });
80
75
  //# sourceMappingURL=step-06.schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"step-06.schema.js","sourceRoot":"","sources":["../src/step-06.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAChF,EAAE;AACF,kEAAkE;AAClE,yEAAyE;AACzE,mCAAmC;AACnC,gFAAgF;AAEhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,6EAA6E;IAC7E,qEAAqE;IAErE,kDAAkD;IAClD,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;QACnC,OAAO,EAAE,uCAAuC;KACjD,CAAC;IAEF,2EAA2E;IAC3E,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAEtD,8CAA8C;IAC9C,wBAAwB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;IAEtE,0CAA0C;IAC1C,0BAA0B,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CA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,EAAE,CAAC,CAAC,IAAI,CACvB,CAAC,qBAAqB,EAAE,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,CAAC,EAClF,EAAE,OAAO,EAAE,yCAAyC,EAAE,CACvD;IAED,gCAAgC;IAChC,aAAa,EAAE,CAAC,CAAC,IAAI,CACnB,CAAC,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAE,qBAAqB,CAAC,EAC/E,EAAE,OAAO,EAAE,oCAAoC,EAAE,CAClD;IAED,6EAA6E;IAE7E,+CAA+C;IAC/C,0BAA0B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAE1D,gDAAgD;IAChD,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC7F,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n// ─── Step 06 — Household, Economic & Digital Profile ─────────────────────────\n//\n// Covers: origins & migration, marital life, household & housing,\n// economic status (income / BPL / insurance), digital access & literacy,\n// and caregiving responsibilities.\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const step06HouseholdSchema = z.object({\n // ── 6.1 Origins & Migration ───────────────────────────────────────────────\n // Note: birthplace is already captured in Step 3 (birthPlace field).\n\n /** Is this person living away from birthplace? */\n areYouMigrant: z.enum(['YES', 'NO'], {\n message: 'Please indicate if you are a migrant.',\n }),\n\n /** State and district migrated from (conditional: areYouMigrant == YES) */\n migrantFromStateDistrict: z.string().trim().optional(),\n\n /** Blood relatives in other Indian states? */\n bloodRelativesOtherState: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n /** Blood relatives in other countries? */\n bloodRelativesOtherCountry: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n /** Are any of those relatives NRIs? */\n bloodRelativesNri: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n /** Is this person an NRI? */\n areYouNri: z.enum(['YES', 'NO', 'FORMER_NRI']).optional(),\n\n /** Brief international migration history (optional free text) */\n internationalMigrationHistory: z.string().trim().optional(),\n\n // ── 6.2 Marital Life ──────────────────────────────────────────────────────\n\n /** Current marital status */\n maritalStatus: z.enum(['SINGLE', 'ENGAGED', 'MARRIED', 'DIVORCED', 'WIDOWED', 'OTHER'], {\n message: 'Please select marital status.',\n }),\n\n /** Marriage timeline (conditional: maritalStatus != MARRIED) */\n planningMarriageTimeline: z\n .enum(['NOT_THINKING', 'WITHIN_1_YEAR', 'WITHIN_2_YEARS', 'AFTER_2_YEARS', 'ALREADY_MARRIED'])\n .optional(),\n\n /** Actively looking for a marriage partner? */\n lookingForMarriagePartner: z\n .enum(['NO', 'YES_ACTIVE', 'YES_CASUAL', 'FAMILY_LOOKING'])\n .optional(),\n\n // ── 6.3 Household & Housing ───────────────────────────────────────────────\n\n /** Family/household type */\n familyStructureType: z.enum(['NUCLEAR', 'JOINT', 'EXTENDED', 'SINGLE_PERSON'], {\n message: 'Please select family type.',\n }),\n\n /** Number of people sharing the same kitchen */\n householdSize: z\n .number({ message: 'Please enter a valid number.' })\n .int()\n .min(1, 'Household size must be at least 1.'),\n\n /** Type of house structure */\n housingType: z.enum(['KUTCHA', 'SEMI_PUCCA', 'PUCCA', 'APARTMENT', 'OTHER'], {\n message: 'Please select housing type.',\n }),\n\n /** Close family member settled in another state or abroad? */\n familyMemberSettledElsewhere: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n // ── 6.4 Economic Status ───────────────────────────────────────────────────\n\n /** BPL (Below Poverty Line) ration card holder? */\n bplRationCardHolder: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n /** Has life insurance? */\n hasLifeInsurance: z.enum(['YES', 'NO', 'NOT_SURE']).optional(),\n\n /** Insurance details (conditional: hasLifeInsurance == YES) */\n lifeInsuranceDetails: z.string().trim().optional(),\n\n /** Annual personal income range */\n annualPersonalIncomeRange: z.enum(\n ['BELOW_1L', '1_2L', '2_3L', '3_5L', '5_10L', 'ABOVE_10L', 'NO_INCOME', 'PREFER_NOT_SAY'],\n { message: 'Please select your personal income range.' },\n ),\n\n /** Annual household income range */\n annualHouseholdIncomeRange: z.enum(\n ['BELOW_1L', '1_2L', '2_3L', '3_5L', '5_10L', '10_20L', 'ABOVE_20L', 'PREFER_NOT_SAY'],\n { message: 'Please select household income range.' },\n ),\n\n // ── 6.5 Digital Access & Literacy ─────────────────────────────────────────\n\n /** Which devices / connectivity options does this person have? */\n digitalAccess: z.array(z.string()).min(1, 'Please select at least one option.'),\n\n /** Self-assessed digital skill level */\n digitalSkillLevel: z.enum(\n ['CANT_USE_SMARTPHONE', 'BASIC', 'COMFORTABLE_APPS_UPI', 'ADVANCED_TOOLS_CONTENT'],\n { message: 'Please select your digital skill level.' },\n ),\n\n /** Reading & writing ability */\n literacyLevel: z.enum(\n ['CANT_READ_WRITE', 'CAN_READ_ONLY', 'READ_WRITE_BASIC', 'FLUENT_ONE_LANGUAGE'],\n { message: 'Please select your literacy level.' },\n ),\n\n // ── 6.6 Caregiving ────────────────────────────────────────────────────────\n\n /** Who does this person regularly care for? */\n caregivingResponsibilities: z.array(z.string()).optional(),\n\n /** Average daily caregiving hours (optional) */\n caregivingHoursPerDay: z.enum(['LESS_THAN_1', '1_TO_3', '3_TO_6', 'MORE_THAN_6']).optional(),\n});\n\n// ─── Inferred types ──────────────────────────────────────────────────────────\n\nexport type Step06HouseholdInput = z.infer<typeof step06HouseholdSchema>;\n"]}
1
+ {"version":3,"file":"step-06.schema.js","sourceRoot":"","sources":["../src/step-06.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,gFAAgF;AAEhF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,UAAU,E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AAwE;IACxE,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,QAAQ,EAAE;IAE7D,sDAAsD;IACtD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC","sourcesContent":["/**\n * Step 06 — Education History\n *\n * KEPT from old step-07 schema. Same structure: highest qualification,\n * Class 10 & 12 details, degree repeaters, certificates, notes.\n *\n * @module udp-schema/step-06\n */\n\nimport { z } from 'zod';\nimport { optionalYearSchema } from './zod-helpers.js';\n\n// ─── Reusable sub-schemas ────────────────────────────────────────────────────\n\nexport const degreeEntrySchema = z.object({\n degreeName: z.string().trim().optional(),\n institutionName: z.string().trim().optional(),\n university: z.string().trim().optional(),\n yearOfPassing: optionalYearSchema,\n courseOrStream: z.string().trim().optional(),\n marksOrGrade: z.string().trim().optional(),\n isCurrentlyStudying: z.boolean().optional(),\n});\n\nexport const certificateEntrySchema = z.object({\n certificateName: z.string().trim().optional(),\n institutionName: z.string().trim().optional(),\n yearOfCompletion: optionalYearSchema,\n fieldOrSubject: z.string().trim().optional(),\n});\n\n// ─── Main Step 06 Schema ────────────────────────────────────────────────────\n\nexport const step06EducationSchema = z.object({\n /** Highest level of formal education completed or in progress */\n highestQualification: z.enum(\n [\n 'CLASS_10',\n 'CLASS_12',\n 'DIPLOMA',\n 'GRADUATION',\n 'POST_GRAD',\n 'PHD',\n 'POST_DOCTORATE',\n 'OTHER',\n ],\n { message: 'Please select your highest qualification.' },\n ),\n\n /** Class 10 / Secondary school details */\n education10th: z\n .object({\n board: z.string().trim().optional(),\n schoolName: z.string().trim().optional(),\n yearOfPassing: optionalYearSchema,\n subjects: z.string().trim().optional(),\n marksObtained: z.string().trim().optional(),\n })\n .optional(),\n\n /** Class 12 / Higher Secondary details */\n education12th: z\n .object({\n institutionName: z.string().trim().optional(),\n boardOrUniversity: z.string().trim().optional(),\n yearOfPassing: optionalYearSchema,\n courseOrStream: z.string().trim().optional(),\n marksOrGrade: z.string().trim().optional(),\n })\n .optional(),\n\n /** List of Diploma qualifications (one or more) */\n diplomas: z.array(degreeEntrySchema).optional(),\n\n /** List of Graduation / Bachelor's degree qualifications */\n graduations: z.array(degreeEntrySchema).optional(),\n\n /** List of Post Graduation / Master's degree qualifications */\n postGraduations: z.array(degreeEntrySchema).optional(),\n\n /** List of Doctorate / PhD qualifications */\n doctorates: z.array(degreeEntrySchema).optional(),\n\n /** List of Post Doctoral research or fellowships */\n postDoctorates: z.array(degreeEntrySchema).optional(),\n\n /** Other certificates, short courses, or professional qualifications */\n otherCertificates: z.array(certificateEntrySchema).optional(),\n\n /** Any additional notes about education background */\n educationNotes: z.string().trim().optional(),\n});\n\n// ─── Inferred types ──────────────────────────────────────────────────────────\n\nexport type DegreeEntryInput = z.infer<typeof degreeEntrySchema>;\nexport type CertificateEntryInput = z.infer<typeof certificateEntrySchema>;\nexport type Step06EducationInput = z.infer<typeof step06EducationSchema>;\n"]}
@@ -1,98 +1,47 @@
1
+ /**
2
+ * Step 07 — Employment & Occupation
3
+ *
4
+ * Fields: employmentStatus, occupation, workShift, comfortableWithShift,
5
+ * desiredShift, incomeRange, dreamOccupation
6
+ *
7
+ * @module udp-schema/step-07
8
+ */
1
9
  import { z } from 'zod';
2
- export declare const degreeEntrySchema: z.ZodObject<{
3
- degreeName: z.ZodOptional<z.ZodString>;
4
- institutionName: z.ZodOptional<z.ZodString>;
5
- university: z.ZodOptional<z.ZodString>;
6
- yearOfPassing: z.ZodOptional<z.ZodString>;
7
- courseOrStream: z.ZodOptional<z.ZodString>;
8
- marksOrGrade: z.ZodOptional<z.ZodString>;
9
- isCurrentlyStudying: z.ZodOptional<z.ZodBoolean>;
10
+ export declare const step07EmploymentSchema: z.ZodObject<{
11
+ employmentStatus: z.ZodOptional<z.ZodEnum<{
12
+ other: "other";
13
+ employed: "employed";
14
+ self_employed: "self_employed";
15
+ unemployed: "unemployed";
16
+ student: "student";
17
+ homemaker: "homemaker";
18
+ retired: "retired";
19
+ daily_wage: "daily_wage";
20
+ }>>;
21
+ occupation: z.ZodOptional<z.ZodString>;
22
+ workShift: z.ZodOptional<z.ZodEnum<{
23
+ day_shift: "day_shift";
24
+ night_shift: "night_shift";
25
+ rotating: "rotating";
26
+ flexible: "flexible";
27
+ work_from_home: "work_from_home";
28
+ not_applicable: "not_applicable";
29
+ }>>;
30
+ comfortableWithShift: z.ZodOptional<z.ZodEnum<{
31
+ yes: "yes";
32
+ no: "no";
33
+ somewhat: "somewhat";
34
+ }>>;
35
+ desiredShift: z.ZodOptional<z.ZodEnum<{
36
+ day_shift: "day_shift";
37
+ night_shift: "night_shift";
38
+ rotating: "rotating";
39
+ flexible: "flexible";
40
+ work_from_home: "work_from_home";
41
+ not_applicable: "not_applicable";
42
+ }>>;
43
+ incomeRange: z.ZodOptional<z.ZodString>;
44
+ dreamOccupation: z.ZodOptional<z.ZodString>;
10
45
  }, z.core.$strip>;
11
- export declare const certificateEntrySchema: z.ZodObject<{
12
- certificateName: z.ZodOptional<z.ZodString>;
13
- institutionName: z.ZodOptional<z.ZodString>;
14
- yearOfCompletion: z.ZodOptional<z.ZodString>;
15
- fieldOrSubject: z.ZodOptional<z.ZodString>;
16
- }, z.core.$strip>;
17
- export declare const step07EducationSchema: z.ZodObject<{
18
- highestQualification: z.ZodEnum<{
19
- OTHER: "OTHER";
20
- CLASS_10: "CLASS_10";
21
- CLASS_12: "CLASS_12";
22
- DIPLOMA: "DIPLOMA";
23
- GRADUATION: "GRADUATION";
24
- POST_GRAD: "POST_GRAD";
25
- PHD: "PHD";
26
- POST_DOCTORATE: "POST_DOCTORATE";
27
- }>;
28
- education10th: z.ZodOptional<z.ZodObject<{
29
- board: z.ZodOptional<z.ZodString>;
30
- schoolName: z.ZodOptional<z.ZodString>;
31
- yearOfPassing: z.ZodOptional<z.ZodString>;
32
- subjects: z.ZodOptional<z.ZodString>;
33
- marksObtained: z.ZodOptional<z.ZodString>;
34
- }, z.core.$strip>>;
35
- education12th: z.ZodOptional<z.ZodObject<{
36
- institutionName: z.ZodOptional<z.ZodString>;
37
- boardOrUniversity: z.ZodOptional<z.ZodString>;
38
- yearOfPassing: z.ZodOptional<z.ZodString>;
39
- courseOrStream: z.ZodOptional<z.ZodString>;
40
- marksOrGrade: z.ZodOptional<z.ZodString>;
41
- }, z.core.$strip>>;
42
- diplomas: z.ZodOptional<z.ZodArray<z.ZodObject<{
43
- degreeName: z.ZodOptional<z.ZodString>;
44
- institutionName: z.ZodOptional<z.ZodString>;
45
- university: z.ZodOptional<z.ZodString>;
46
- yearOfPassing: z.ZodOptional<z.ZodString>;
47
- courseOrStream: z.ZodOptional<z.ZodString>;
48
- marksOrGrade: z.ZodOptional<z.ZodString>;
49
- isCurrentlyStudying: z.ZodOptional<z.ZodBoolean>;
50
- }, z.core.$strip>>>;
51
- graduations: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
- degreeName: z.ZodOptional<z.ZodString>;
53
- institutionName: z.ZodOptional<z.ZodString>;
54
- university: z.ZodOptional<z.ZodString>;
55
- yearOfPassing: z.ZodOptional<z.ZodString>;
56
- courseOrStream: z.ZodOptional<z.ZodString>;
57
- marksOrGrade: z.ZodOptional<z.ZodString>;
58
- isCurrentlyStudying: z.ZodOptional<z.ZodBoolean>;
59
- }, z.core.$strip>>>;
60
- postGraduations: z.ZodOptional<z.ZodArray<z.ZodObject<{
61
- degreeName: z.ZodOptional<z.ZodString>;
62
- institutionName: z.ZodOptional<z.ZodString>;
63
- university: z.ZodOptional<z.ZodString>;
64
- yearOfPassing: z.ZodOptional<z.ZodString>;
65
- courseOrStream: z.ZodOptional<z.ZodString>;
66
- marksOrGrade: z.ZodOptional<z.ZodString>;
67
- isCurrentlyStudying: z.ZodOptional<z.ZodBoolean>;
68
- }, z.core.$strip>>>;
69
- doctorates: z.ZodOptional<z.ZodArray<z.ZodObject<{
70
- degreeName: z.ZodOptional<z.ZodString>;
71
- institutionName: z.ZodOptional<z.ZodString>;
72
- university: z.ZodOptional<z.ZodString>;
73
- yearOfPassing: z.ZodOptional<z.ZodString>;
74
- courseOrStream: z.ZodOptional<z.ZodString>;
75
- marksOrGrade: z.ZodOptional<z.ZodString>;
76
- isCurrentlyStudying: z.ZodOptional<z.ZodBoolean>;
77
- }, z.core.$strip>>>;
78
- postDoctorates: z.ZodOptional<z.ZodArray<z.ZodObject<{
79
- degreeName: z.ZodOptional<z.ZodString>;
80
- institutionName: z.ZodOptional<z.ZodString>;
81
- university: z.ZodOptional<z.ZodString>;
82
- yearOfPassing: z.ZodOptional<z.ZodString>;
83
- courseOrStream: z.ZodOptional<z.ZodString>;
84
- marksOrGrade: z.ZodOptional<z.ZodString>;
85
- isCurrentlyStudying: z.ZodOptional<z.ZodBoolean>;
86
- }, z.core.$strip>>>;
87
- otherCertificates: z.ZodOptional<z.ZodArray<z.ZodObject<{
88
- certificateName: z.ZodOptional<z.ZodString>;
89
- institutionName: z.ZodOptional<z.ZodString>;
90
- yearOfCompletion: z.ZodOptional<z.ZodString>;
91
- fieldOrSubject: z.ZodOptional<z.ZodString>;
92
- }, z.core.$strip>>>;
93
- educationNotes: z.ZodOptional<z.ZodString>;
94
- }, z.core.$strip>;
95
- export type DegreeEntryInput = z.infer<typeof degreeEntrySchema>;
96
- export type CertificateEntryInput = z.infer<typeof certificateEntrySchema>;
97
- export type Step07EducationInput = z.infer<typeof step07EducationSchema>;
46
+ export type Step07EmploymentInput = z.infer<typeof step07EmploymentSchema>;
98
47
  //# sourceMappingURL=step-07.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"step-07.schema.d.ts","sourceRoot":"","sources":["../src/step-07.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,iBAAiB;;;;;;;;iBAQ5B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AAIH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8EhC,CAAC;AAIH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC3E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"step-07.schema.d.ts","sourceRoot":"","sources":["../src/step-07.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkDjC,CAAC;AAIH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -1,83 +1,56 @@
1
+ /**
2
+ * Step 07 — Employment & Occupation
3
+ *
4
+ * Fields: employmentStatus, occupation, workShift, comfortableWithShift,
5
+ * desiredShift, incomeRange, dreamOccupation
6
+ *
7
+ * @module udp-schema/step-07
8
+ */
1
9
  import { z } from 'zod';
2
- import { optionalYearSchema } from './zod-helpers.js';
3
- // ─── Step 07 — Education History ──────────────────────────────────────────────
4
- //
5
- // Covers: highest qualification level, Class 10 & 12 details,
6
- // and repeater fields for Diploma, Graduation, Post Graduation,
7
- // Doctorate (PhD), Post Doctorate, and Other Certificates.
8
- // ─────────────────────────────────────────────────────────────────────────────
9
- // ─── Reusable sub-schemas ────────────────────────────────────────────────────
10
- export const degreeEntrySchema = z.object({
11
- degreeName: z.string().trim().optional(),
12
- institutionName: z.string().trim().optional(),
13
- university: z.string().trim().optional(),
14
- yearOfPassing: optionalYearSchema,
15
- courseOrStream: z.string().trim().optional(),
16
- marksOrGrade: z.string().trim().optional(),
17
- isCurrentlyStudying: z.boolean().optional(),
18
- });
19
- export const certificateEntrySchema = z.object({
20
- certificateName: z.string().trim().optional(),
21
- institutionName: z.string().trim().optional(),
22
- yearOfCompletion: optionalYearSchema,
23
- fieldOrSubject: z.string().trim().optional(),
24
- });
25
- // ─── Main Step 07 Schema ─────────────────────────────────────────────────────
26
- export const step07EducationSchema = z.object({
27
- // ── 7.1 Highest Qualification ─────────────────────────────────────────────
28
- /** Highest level of formal education completed or in progress */
29
- highestQualification: z.enum([
30
- 'CLASS_10',
31
- 'CLASS_12',
32
- 'DIPLOMA',
33
- 'GRADUATION',
34
- 'POST_GRAD',
35
- 'PHD',
36
- 'POST_DOCTORATE',
37
- 'OTHER',
38
- ], { message: 'Please select your highest qualification.' }),
39
- // ── 7.2 Class 10 / Secondary ──────────────────────────────────────────────
40
- /** Class 10 / Secondary school details */
41
- education10th: z
42
- .object({
43
- board: z.string().trim().optional(),
44
- schoolName: z.string().trim().optional(),
45
- yearOfPassing: optionalYearSchema,
46
- subjects: z.string().trim().optional(),
47
- marksObtained: z.string().trim().optional(),
48
- })
10
+ // ─── Main Step 07 Schema ────────────────────────────────────────────────────
11
+ export const step07EmploymentSchema = z.object({
12
+ /** Employment status */
13
+ employmentStatus: z
14
+ .enum([
15
+ 'employed',
16
+ 'self_employed',
17
+ 'unemployed',
18
+ 'student',
19
+ 'homemaker',
20
+ 'retired',
21
+ 'daily_wage',
22
+ 'other',
23
+ ])
24
+ .optional(),
25
+ /** Occupation — uses dating-schema profession option values */
26
+ occupation: z.string().trim().optional(),
27
+ /** Current work shift */
28
+ workShift: z
29
+ .enum([
30
+ 'day_shift',
31
+ 'night_shift',
32
+ 'rotating',
33
+ 'flexible',
34
+ 'work_from_home',
35
+ 'not_applicable',
36
+ ])
49
37
  .optional(),
50
- // ── 7.3 Class 12 / Higher Secondary ──────────────────────────────────────
51
- /** Class 12 / Higher Secondary details */
52
- education12th: z
53
- .object({
54
- institutionName: z.string().trim().optional(),
55
- boardOrUniversity: z.string().trim().optional(),
56
- yearOfPassing: optionalYearSchema,
57
- courseOrStream: z.string().trim().optional(),
58
- marksOrGrade: z.string().trim().optional(),
59
- })
38
+ /** Comfortable with current shift? */
39
+ comfortableWithShift: z.enum(['yes', 'no', 'somewhat']).optional(),
40
+ /** Desired shift */
41
+ desiredShift: z
42
+ .enum([
43
+ 'day_shift',
44
+ 'night_shift',
45
+ 'rotating',
46
+ 'flexible',
47
+ 'work_from_home',
48
+ 'not_applicable',
49
+ ])
60
50
  .optional(),
61
- // ── 7.4 Diplomas (repeater) ───────────────────────────────────────────────
62
- /** List of Diploma qualifications (one or more) */
63
- diplomas: z.array(degreeEntrySchema).optional(),
64
- // ── 7.5 Graduations (repeater) ───────────────────────────────────────────
65
- /** List of Graduation / Bachelor's degree qualifications */
66
- graduations: z.array(degreeEntrySchema).optional(),
67
- // ── 7.6 Post Graduations (repeater) ──────────────────────────────────────
68
- /** List of Post Graduation / Master's degree qualifications */
69
- postGraduations: z.array(degreeEntrySchema).optional(),
70
- // ── 7.7 Doctorates / PhD (repeater) ──────────────────────────────────────
71
- /** List of Doctorate / PhD qualifications */
72
- doctorates: z.array(degreeEntrySchema).optional(),
73
- // ── 7.8 Post Doctorates (repeater) ───────────────────────────────────────
74
- /** List of Post Doctoral research or fellowships */
75
- postDoctorates: z.array(degreeEntrySchema).optional(),
76
- // ── 7.9 Other Certificates (repeater) ────────────────────────────────────
77
- /** Other certificates, short courses, or professional qualifications */
78
- otherCertificates: z.array(certificateEntrySchema).optional(),
79
- // ── 7.10 Education Notes ─────────────────────────────────────────────────
80
- /** Any additional notes about education background */
81
- educationNotes: z.string().trim().optional(),
51
+ /** Income range */
52
+ incomeRange: z.string().trim().optional(),
53
+ /** Dream occupation — free text */
54
+ dreamOccupation: z.string().trim().max(500).optional(),
82
55
  });
83
56
  //# sourceMappingURL=step-07.schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"step-07.schema.js","sourceRoot":"","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;IAE/C,4EAA4E;IAE5E,4DAA4D;IAC5D,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;IAElD,4EAA4E;IAE5E,+DAA+D;IAC/D,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;IAEtD,4EAA4E;IAE5E,6CAA6C;IAC7C,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;IAEjD,4EAA4E;IAE5E,oDAAoD;IACpD,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;IAErD,4EAA4E;IAE5E,wEAAwE;IACxE,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,QAAQ,EAAE;IAE7D,4EAA4E;IAE5E,sDAAsD;IACtD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { optionalYearSchema } from './zod-helpers.js';\n\n// ─── Step 07 — Education History ──────────────────────────────────────────────\n//\n// Covers: highest qualification level, Class 10 & 12 details,\n// and repeater fields for Diploma, Graduation, Post Graduation,\n// Doctorate (PhD), Post Doctorate, and Other Certificates.\n// ─────────────────────────────────────────────────────────────────────────────\n\n// ─── Reusable sub-schemas ────────────────────────────────────────────────────\n\nexport const degreeEntrySchema = z.object({\n degreeName: z.string().trim().optional(),\n institutionName: z.string().trim().optional(),\n university: z.string().trim().optional(),\n yearOfPassing: optionalYearSchema,\n courseOrStream: z.string().trim().optional(),\n marksOrGrade: z.string().trim().optional(),\n isCurrentlyStudying: z.boolean().optional(),\n});\n\nexport const certificateEntrySchema = z.object({\n certificateName: z.string().trim().optional(),\n institutionName: z.string().trim().optional(),\n yearOfCompletion: optionalYearSchema,\n fieldOrSubject: z.string().trim().optional(),\n});\n\n// ─── Main Step 07 Schema ─────────────────────────────────────────────────────\n\nexport const step07EducationSchema = z.object({\n // ── 7.1 Highest Qualification ─────────────────────────────────────────────\n\n /** Highest level of formal education completed or in progress */\n highestQualification: z.enum(\n [\n 'CLASS_10',\n 'CLASS_12',\n 'DIPLOMA',\n 'GRADUATION',\n 'POST_GRAD',\n 'PHD',\n 'POST_DOCTORATE',\n 'OTHER',\n ],\n { message: 'Please select your highest qualification.' },\n ),\n\n // ── 7.2 Class 10 / Secondary ──────────────────────────────────────────────\n\n /** Class 10 / Secondary school details */\n education10th: z\n .object({\n board: z.string().trim().optional(),\n schoolName: z.string().trim().optional(),\n yearOfPassing: optionalYearSchema,\n subjects: z.string().trim().optional(),\n marksObtained: z.string().trim().optional(),\n })\n .optional(),\n\n // ── 7.3 Class 12 / Higher Secondary ──────────────────────────────────────\n\n /** Class 12 / Higher Secondary details */\n education12th: z\n .object({\n institutionName: z.string().trim().optional(),\n boardOrUniversity: z.string().trim().optional(),\n yearOfPassing: optionalYearSchema,\n courseOrStream: z.string().trim().optional(),\n marksOrGrade: z.string().trim().optional(),\n })\n .optional(),\n\n // ── 7.4 Diplomas (repeater) ───────────────────────────────────────────────\n\n /** List of Diploma qualifications (one or more) */\n diplomas: z.array(degreeEntrySchema).optional(),\n\n // ── 7.5 Graduations (repeater) ───────────────────────────────────────────\n\n /** List of Graduation / Bachelor's degree qualifications */\n graduations: z.array(degreeEntrySchema).optional(),\n\n // ── 7.6 Post Graduations (repeater) ──────────────────────────────────────\n\n /** List of Post Graduation / Master's degree qualifications */\n postGraduations: z.array(degreeEntrySchema).optional(),\n\n // ── 7.7 Doctorates / PhD (repeater) ──────────────────────────────────────\n\n /** List of Doctorate / PhD qualifications */\n doctorates: z.array(degreeEntrySchema).optional(),\n\n // ── 7.8 Post Doctorates (repeater) ───────────────────────────────────────\n\n /** List of Post Doctoral research or fellowships */\n postDoctorates: z.array(degreeEntrySchema).optional(),\n\n // ── 7.9 Other Certificates (repeater) ────────────────────────────────────\n\n /** Other certificates, short courses, or professional qualifications */\n otherCertificates: z.array(certificateEntrySchema).optional(),\n\n // ── 7.10 Education Notes ─────────────────────────────────────────────────\n\n /** Any additional notes about education background */\n educationNotes: z.string().trim().optional(),\n});\n\n// ─── Inferred types ──────────────────────────────────────────────────────────\n\nexport type DegreeEntryInput = z.infer<typeof degreeEntrySchema>;\nexport type CertificateEntryInput = z.infer<typeof certificateEntrySchema>;\nexport type Step07EducationInput = z.infer<typeof step07EducationSchema>;\n"]}
1
+ {"version":3,"file":"step-07.schema.js","sourceRoot":"","sources":["../src/step-07.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,wBAAwB;IACxB,gBAAgB,EAAE,CAAC;SAChB,IAAI,CAAC;QACJ,UAAU;QACV,eAAe;QACf,YAAY;QACZ,SAAS;QACT,WAAW;QACX,SAAS;QACT,YAAY;QACZ,OAAO;KACR,CAAC;SACD,QAAQ,EAAE;IAEb,+DAA+D;IAC/D,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAExC,yBAAyB;IACzB,SAAS,EAAE,CAAC;SACT,IAAI,CAAC;QACJ,WAAW;QACX,aAAa;QACb,UAAU;QACV,UAAU;QACV,gBAAgB;QAChB,gBAAgB;KACjB,CAAC;SACD,QAAQ,EAAE;IAEb,sCAAsC;IACtC,oBAAoB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;IAElE,oBAAoB;IACpB,YAAY,EAAE,CAAC;SACZ,IAAI,CAAC;QACJ,WAAW;QACX,aAAa;QACb,UAAU;QACV,UAAU;QACV,gBAAgB;QAChB,gBAAgB;KACjB,CAAC;SACD,QAAQ,EAAE;IAEb,mBAAmB;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAEzC,mCAAmC;IACnC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC","sourcesContent":["/**\n * Step 07 — Employment & Occupation\n *\n * Fields: employmentStatus, occupation, workShift, comfortableWithShift,\n * desiredShift, incomeRange, dreamOccupation\n *\n * @module udp-schema/step-07\n */\n\nimport { z } from 'zod';\n\n// ─── Main Step 07 Schema ────────────────────────────────────────────────────\n\nexport const step07EmploymentSchema = z.object({\n /** Employment status */\n employmentStatus: z\n .enum([\n 'employed',\n 'self_employed',\n 'unemployed',\n 'student',\n 'homemaker',\n 'retired',\n 'daily_wage',\n 'other',\n ])\n .optional(),\n\n /** Occupation uses dating-schema profession option values */\n occupation: z.string().trim().optional(),\n\n /** Current work shift */\n workShift: z\n .enum([\n 'day_shift',\n 'night_shift',\n 'rotating',\n 'flexible',\n 'work_from_home',\n 'not_applicable',\n ])\n .optional(),\n\n /** Comfortable with current shift? */\n comfortableWithShift: z.enum(['yes', 'no', 'somewhat']).optional(),\n\n /** Desired shift */\n desiredShift: z\n .enum([\n 'day_shift',\n 'night_shift',\n 'rotating',\n 'flexible',\n 'work_from_home',\n 'not_applicable',\n ])\n .optional(),\n\n /** Income range */\n incomeRange: z.string().trim().optional(),\n\n /** Dream occupation free text */\n dreamOccupation: z.string().trim().max(500).optional(),\n});\n\n// ─── Inferred types ─────────────────────────────────────────────────────────\n\nexport type Step07EmploymentInput = z.infer<typeof step07EmploymentSchema>;\n"]}