udp-schema 0.3.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 -1988
  8. package/dist/field-meta.js.map +1 -1
  9. package/dist/index.d.ts +17 -17
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +32 -32
  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 +76 -94
  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
package/dist/index.js CHANGED
@@ -1,43 +1,43 @@
1
1
  /**
2
- * udp-schema — Shared Zod schemas for User Detailed Profile
2
+ * udp-schema — Shared Zod schemas for User Detailed Profile (v2)
3
3
  *
4
4
  * Single source of truth consumed by both reform frontends and reform-backend.
5
+ * 12-step "1 question per screen" architecture.
5
6
  *
6
7
  * @module udp-schema
7
8
  */
8
- export { getImmutableFields, getUdpFieldMeta, getUdpFieldOptions, getUdpStepFields, } from './field-helpers.js';
9
- // Field Metadata & Helpers
10
- export { UDP_FIELD_META, } from './field-meta.js';
9
+ // Onboarding Configuration (mirrors dating-schema pattern)
10
+ export { getUdpOnboardingFieldConfig, UDP_ONBOARDING_FIELDS, UDP_ONBOARDING_STEP_GROUPS, UDP_TOTAL_MAIN_STEPS, UDP_TOTAL_SUB_STEPS, } from './onboarding-config.js';
11
+ // Field Helpers
12
+ export { getImmutableFields, getStepSchema } from './field-helpers.js';
13
+ // Field Metadata & Option Arrays
14
+ export { CASTE_DISCRIMINATION_PLACES_OPTIONS, CIVIC_ENGAGEMENT_OPTIONS, DIGITAL_ACCESS_OPTIONS, DISABILITY_STATUS_OPTIONS, FAMILY_MEMBERS_OPTIONS, GENDER_OPTIONS, LANGUAGE_OPTIONS, LEADERSHIP_SKILLSET_OPTIONS, LGBTQ_STATEMENTS_OPTIONS, MINORITY_STATUS_OPTIONS, NEURODIVERSITY_CONDITIONS_OPTIONS, PARTY_OPTIONS, POLITICAL_SPECTRUM_OPTIONS, QUALIFICATION_OPTIONS, RELIGION_OPTIONS, RESERVATION_STATUS_OPTIONS, SENSORY_PREFERENCES_OPTIONS, SUBSTANCE_USE_OPTIONS, SUPPORT_NEEDS_OPTIONS, TRANSGENDER_STATEMENTS_OPTIONS, VOTING_ISSUES_OPTIONS, } from './field-meta.js';
11
15
  // Progress Fields — Single source of truth for step progress counting
12
16
  export { calculateStepProgress as calculateUdpStepProgress, getNestedValue, isFieldFilled, UDP_PROGRESS_FIELDS, UDP_TOTAL_STEPS, } from './progress-fields.js';
13
- // Step 01 — Profile Onboarding
14
- export { assistedByVolunteerSchema, languageValueSchema, profilePhotoSchema, secondaryLanguageItemSchema, step01OnboardingSchema, } from './step-01.schema.js';
15
- // Step 02 — Contact Details
16
- export { optionalUrlSchema, step02ContactDetailsSchema, } from './step-02.schema.js';
17
- // Step 03 — Residence / Address
18
- export { addressSchema, areaRefSchema, step03ResidenceSchema, } from './step-03.schema.js';
19
- // Step 04 — Identity & Social Profile
20
- export { step04IdentitySchema, } from './step-04.schema.js';
21
- // Step 05 — Leadership, Contribution & Political Ambition
22
- export { step05LeadershipSchema, } from './step-05.schema.js';
23
- // Step 06 — Household, Economic & Digital Profile
24
- export { step06HouseholdSchema, } from './step-06.schema.js';
25
- // Step 07 — Education History
26
- export { certificateEntrySchema, degreeEntrySchema, step07EducationSchema, } from './step-07.schema.js';
27
- // Step 08 — Employment & Occupation
28
- export { step08EmploymentSchema, } from './step-08.schema.js';
29
- // Step 09 — Neurodiversity & Learning Profile
30
- export { step09NeurodiversitySchema, } from './step-09.schema.js';
31
- // Step 10 — Psychological Assessments
32
- export { step10PsychologicalSchema, } from './step-10.schema.js';
33
- // Step 11 — Political Association & History
34
- export { step11PoliticalSchema, } from './step-11.schema.js';
35
- // Step 12 — Electoral Details
36
- export { step12ElectoralSchema, } from './step-12.schema.js';
37
- // Step 13 — Health & Lifestyle
38
- export { step13HealthSchema, } from './step-13.schema.js';
39
- // Step 14 — Yearly Priorities & Life Goals
40
- export { step14PrioritiesSchema, } from './step-14.schema.js';
17
+ // Step 01 — Profile
18
+ export { step01ProfileSchema } from './step-01.schema.js';
19
+ // Step 02 — Political Association & History
20
+ export { step02PoliticalSchema } from './step-02.schema.js';
21
+ // Step 03 — Electoral Behaviour
22
+ export { step03ElectoralSchema } from './step-03.schema.js';
23
+ // Step 04 — Leadership & Ambitions
24
+ export { step04LeadershipSchema } from './step-04.schema.js';
25
+ // Step 05 — Psychological Assessment
26
+ export { step05PsychologicalSchema } from './step-05.schema.js';
27
+ // Step 06 — Education History
28
+ export { certificateEntrySchema, degreeEntrySchema, step06EducationSchema, } from './step-06.schema.js';
29
+ // Step 07 — Employment & Occupation
30
+ export { step07EmploymentSchema } from './step-07.schema.js';
31
+ // Step 08 — Neurodiversity
32
+ export { step08NeurodiversitySchema } from './step-08.schema.js';
33
+ // Step 09 — Health & Lifestyle
34
+ export { step09HealthSchema } from './step-09.schema.js';
35
+ // Step 10 — World View & Experience
36
+ export { step10WorldViewSchema } from './step-10.schema.js';
37
+ // Step 11 — Residence & Address
38
+ export { simplifiedAddressSchema, step11ResidenceSchema, } from './step-11.schema.js';
39
+ // Step 12 — Household & Economic Profile
40
+ export { step12HouseholdSchema } from './step-12.schema.js';
41
41
  // Zod Helpers
42
42
  export { emptyStringToUndefined, optionalPhoneSchema, optionalTrimmedString, optionalYearSchema, } from './zod-helpers.js';
43
43
  //# 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,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B,2BAA2B;AAC3B,OAAO,EACL,cAAc,GAGf,MAAM,iBAAiB,CAAC;AACzB,sEAAsE;AACtE,OAAO,EACL,qBAAqB,IAAI,wBAAwB,EACjD,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,+BAA+B;AAC/B,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAGlB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,4BAA4B;AAC5B,OAAO,EACL,iBAAiB,EAEjB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,gCAAgC;AAChC,OAAO,EAEL,aAAa,EACb,aAAa,EAEb,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,sCAAsC;AACtC,OAAO,EAEL,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,0DAA0D;AAC1D,OAAO,EAEL,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,kDAAkD;AAClD,OAAO,EAEL,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,8BAA8B;AAC9B,OAAO,EAEL,sBAAsB,EAEtB,iBAAiB,EAEjB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,oCAAoC;AACpC,OAAO,EAEL,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,8CAA8C;AAC9C,OAAO,EAEL,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,sCAAsC;AACtC,OAAO,EAEL,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,4CAA4C;AAC5C,OAAO,EAEL,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,8BAA8B;AAC9B,OAAO,EAEL,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,+BAA+B;AAC/B,OAAO,EAEL,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,2CAA2C;AAC3C,OAAO,EAEL,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,cAAc;AACd,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC","sourcesContent":["/**\n * udp-schema — Shared Zod schemas for User Detailed Profile\n *\n * Single source of truth consumed by both reform frontends and reform-backend.\n *\n * @module udp-schema\n */\n\nexport {\n getImmutableFields,\n getUdpFieldMeta,\n getUdpFieldOptions,\n getUdpStepFields,\n} from './field-helpers.js';\n\n// Field Metadata & Helpers\nexport {\n UDP_FIELD_META,\n type UdpFieldMeta,\n type UdpFieldOption,\n} from './field-meta.js';\n// Progress Fields — Single source of truth for step progress counting\nexport {\n calculateStepProgress as calculateUdpStepProgress,\n getNestedValue,\n isFieldFilled,\n UDP_PROGRESS_FIELDS,\n UDP_TOTAL_STEPS,\n} from './progress-fields.js';\n// Step 01 — Profile Onboarding\nexport {\n assistedByVolunteerSchema,\n languageValueSchema,\n profilePhotoSchema,\n type Step01OnboardingFormInput,\n type Step01OnboardingInput,\n secondaryLanguageItemSchema,\n step01OnboardingSchema,\n} from './step-01.schema.js';\n// Step 02 — Contact Details\nexport {\n optionalUrlSchema,\n type Step02ContactDetailsInput,\n step02ContactDetailsSchema,\n} from './step-02.schema.js';\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// Step 04 — Identity & Social Profile\nexport {\n type Step04IdentityInput,\n step04IdentitySchema,\n} from './step-04.schema.js';\n// Step 05 — Leadership, Contribution & Political Ambition\nexport {\n type Step05LeadershipInput,\n step05LeadershipSchema,\n} from './step-05.schema.js';\n// Step 06 — Household, Economic & Digital Profile\nexport {\n type Step06HouseholdInput,\n step06HouseholdSchema,\n} from './step-06.schema.js';\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// Step 08 — Employment & Occupation\nexport {\n type Step08EmploymentInput,\n step08EmploymentSchema,\n} from './step-08.schema.js';\n// Step 09 — Neurodiversity & Learning Profile\nexport {\n type Step09NeurodiversityInput,\n step09NeurodiversitySchema,\n} from './step-09.schema.js';\n// Step 10Psychological Assessments\nexport {\n type Step10PsychologicalInput,\n step10PsychologicalSchema,\n} from './step-10.schema.js';\n// Step 11Political Association & History\nexport {\n type Step11PoliticalInput,\n step11PoliticalSchema,\n} from './step-11.schema.js';\n// Step 12Electoral Details\nexport {\n type Step12ElectoralInput,\n step12ElectoralSchema,\n} from './step-12.schema.js';\n// Step 13 — Health & Lifestyle\nexport {\n type Step13HealthInput,\n step13HealthSchema,\n} from './step-13.schema.js';\n// Step 14Yearly Priorities & Life Goals\nexport {\n type Step14PrioritiesInput,\n step14PrioritiesSchema,\n} from './step-14.schema.js';\n// Zod Helpers\nexport {\n emptyStringToUndefined,\n optionalPhoneSchema,\n optionalTrimmedString,\n optionalYearSchema,\n} from './zod-helpers.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,2DAA2D;AAC3D,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,GAGpB,MAAM,wBAAwB,CAAC;AAEhC,gBAAgB;AAChB,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEvE,iCAAiC;AACjC,OAAO,EACL,mCAAmC,EACnC,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,iCAAiC,EACjC,aAAa,EACb,0BAA0B,EAC1B,qBAAqB,EACrB,gBAAgB,EAChB,0BAA0B,EAC1B,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,8BAA8B,EAE9B,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,sEAAsE;AACtE,OAAO,EACL,qBAAqB,IAAI,wBAAwB,EACjD,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAE9B,oBAAoB;AACpB,OAAO,EAAE,mBAAmB,EAA2B,MAAM,qBAAqB,CAAC;AAEnF,4CAA4C;AAC5C,OAAO,EAAE,qBAAqB,EAA6B,MAAM,qBAAqB,CAAC;AAEvF,gCAAgC;AAChC,OAAO,EAAE,qBAAqB,EAA6B,MAAM,qBAAqB,CAAC;AAEvF,mCAAmC;AACnC,OAAO,EAAE,sBAAsB,EAA8B,MAAM,qBAAqB,CAAC;AAEzF,qCAAqC;AACrC,OAAO,EAAE,yBAAyB,EAAiC,MAAM,qBAAqB,CAAC;AAE/F,8BAA8B;AAC9B,OAAO,EACL,sBAAsB,EAEtB,iBAAiB,EAEjB,qBAAqB,GAEtB,MAAM,qBAAqB,CAAC;AAE7B,oCAAoC;AACpC,OAAO,EAAE,sBAAsB,EAA8B,MAAM,qBAAqB,CAAC;AAEzF,2BAA2B;AAC3B,OAAO,EAAE,0BAA0B,EAAkC,MAAM,qBAAqB,CAAC;AAEjG,+BAA+B;AAC/B,OAAO,EAAE,kBAAkB,EAA0B,MAAM,qBAAqB,CAAC;AAEjF,oCAAoC;AACpC,OAAO,EAAE,qBAAqB,EAA6B,MAAM,qBAAqB,CAAC;AAEvF,gCAAgC;AAChC,OAAO,EACL,uBAAuB,EAEvB,qBAAqB,GAEtB,MAAM,qBAAqB,CAAC;AAE7B,yCAAyC;AACzC,OAAO,EAAE,qBAAqB,EAA6B,MAAM,qBAAqB,CAAC;AAEvF,cAAc;AACd,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC","sourcesContent":["/**\n * udp-schema — Shared Zod schemas for User Detailed Profile (v2)\n *\n * Single source of truth consumed by both reform frontends and reform-backend.\n * 12-step \"1 question per screen\" architecture.\n *\n * @module udp-schema\n */\n\n// Onboarding Configuration (mirrors dating-schema pattern)\nexport {\n getUdpOnboardingFieldConfig,\n UDP_ONBOARDING_FIELDS,\n UDP_ONBOARDING_STEP_GROUPS,\n UDP_TOTAL_MAIN_STEPS,\n UDP_TOTAL_SUB_STEPS,\n type UdpOnboardingFieldConfig,\n type UdpOnboardingStepGroup,\n} from './onboarding-config.js';\n\n// Field Helpers\nexport { getImmutableFields, getStepSchema } from './field-helpers.js';\n\n// Field Metadata & Option Arrays\nexport {\n CASTE_DISCRIMINATION_PLACES_OPTIONS,\n CIVIC_ENGAGEMENT_OPTIONS,\n DIGITAL_ACCESS_OPTIONS,\n DISABILITY_STATUS_OPTIONS,\n FAMILY_MEMBERS_OPTIONS,\n GENDER_OPTIONS,\n LANGUAGE_OPTIONS,\n LEADERSHIP_SKILLSET_OPTIONS,\n LGBTQ_STATEMENTS_OPTIONS,\n MINORITY_STATUS_OPTIONS,\n NEURODIVERSITY_CONDITIONS_OPTIONS,\n PARTY_OPTIONS,\n POLITICAL_SPECTRUM_OPTIONS,\n QUALIFICATION_OPTIONS,\n RELIGION_OPTIONS,\n RESERVATION_STATUS_OPTIONS,\n SENSORY_PREFERENCES_OPTIONS,\n SUBSTANCE_USE_OPTIONS,\n SUPPORT_NEEDS_OPTIONS,\n TRANSGENDER_STATEMENTS_OPTIONS,\n type UdpFieldOption,\n VOTING_ISSUES_OPTIONS,\n} from './field-meta.js';\n\n// Progress Fields — Single source of truth for step progress counting\nexport {\n calculateStepProgress as calculateUdpStepProgress,\n getNestedValue,\n isFieldFilled,\n UDP_PROGRESS_FIELDS,\n UDP_TOTAL_STEPS,\n} from './progress-fields.js';\n\n// Step 01 — Profile\nexport { step01ProfileSchema, type Step01ProfileInput } from './step-01.schema.js';\n\n// Step 02 — Political Association & History\nexport { step02PoliticalSchema, type Step02PoliticalInput } from './step-02.schema.js';\n\n// Step 03 — Electoral Behaviour\nexport { step03ElectoralSchema, type Step03ElectoralInput } from './step-03.schema.js';\n\n// Step 04 — Leadership & Ambitions\nexport { step04LeadershipSchema, type Step04LeadershipInput } from './step-04.schema.js';\n\n// Step 05 — Psychological Assessment\nexport { step05PsychologicalSchema, type Step05PsychologicalInput } from './step-05.schema.js';\n\n// Step 06 — Education History\nexport {\n certificateEntrySchema,\n type CertificateEntryInput,\n degreeEntrySchema,\n type DegreeEntryInput,\n step06EducationSchema,\n type Step06EducationInput,\n} from './step-06.schema.js';\n\n// Step 07 — Employment & Occupation\nexport { step07EmploymentSchema, type Step07EmploymentInput } from './step-07.schema.js';\n\n// Step 08 — Neurodiversity\nexport { step08NeurodiversitySchema, type Step08NeurodiversityInput } from './step-08.schema.js';\n\n// Step 09Health & Lifestyle\nexport { step09HealthSchema, type Step09HealthInput } from './step-09.schema.js';\n\n// Step 10World View & Experience\nexport { step10WorldViewSchema, type Step10WorldViewInput } from './step-10.schema.js';\n\n// Step 11Residence & Address\nexport {\n simplifiedAddressSchema,\n type SimplifiedAddressInput,\n step11ResidenceSchema,\n type Step11ResidenceInput,\n} from './step-11.schema.js';\n\n// Step 12Household & Economic Profile\nexport { step12HouseholdSchema, type Step12HouseholdInput } from './step-12.schema.js';\n\n// Zod Helpers\nexport {\n emptyStringToUndefined,\n optionalPhoneSchema,\n optionalTrimmedString,\n optionalYearSchema,\n} from './zod-helpers.js';\n"]}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * UDP Onboarding Field Configuration
3
+ * ====================================
4
+ * Single source of truth for all per-field onboarding metadata.
5
+ * Both frontend and backend import this.
6
+ *
7
+ * IMPORTANT: All string properties (title, subtitle, successMessage,
8
+ * step group label) are i18n KEYS, not display text. The frontend resolves
9
+ * them via useTranslations("udpOnboarding") → t(config.title).
10
+ *
11
+ * Translation files:
12
+ * - messages/en/udp-onboarding.json (English)
13
+ * - messages/hi/udp-onboarding.json (Hindi)
14
+ *
15
+ * @module udp-schema/onboarding-config
16
+ */
17
+ export interface UdpOnboardingFieldConfig {
18
+ /** i18n key for the question heading (resolved via t(title)) */
19
+ title: string;
20
+ /** i18n key for help text below the heading */
21
+ subtitle?: string;
22
+ /** i18n key for toast message on successful save */
23
+ successMessage: string;
24
+ /** Whether the field is required to proceed */
25
+ required: boolean;
26
+ }
27
+ /** Step grouping for the UDP onboarding flow */
28
+ export interface UdpOnboardingStepGroup {
29
+ /** i18n key for section label */
30
+ label: string;
31
+ /** Icon name from lucide-react (resolved at runtime by frontend) */
32
+ icon: string;
33
+ /** Ordered list of field keys in this section */
34
+ fields: string[];
35
+ }
36
+ export declare const UDP_ONBOARDING_FIELDS: Record<string, UdpOnboardingFieldConfig>;
37
+ export declare const UDP_ONBOARDING_STEP_GROUPS: UdpOnboardingStepGroup[];
38
+ /** Get onboarding config for a single field. */
39
+ export declare function getUdpOnboardingFieldConfig(fieldKey: string | undefined): UdpOnboardingFieldConfig | undefined;
40
+ /** Total number of main steps. */
41
+ export declare const UDP_TOTAL_MAIN_STEPS: number;
42
+ /** Total number of sub-steps across all main steps. */
43
+ export declare const UDP_TOTAL_SUB_STEPS: number;
44
+ //# sourceMappingURL=onboarding-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onboarding-config.d.ts","sourceRoot":"","sources":["../src/onboarding-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,MAAM,WAAW,wBAAwB;IACvC,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,cAAc,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,gDAAgD;AAChD,MAAM,WAAW,sBAAsB;IACrC,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAID,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAshB1E,CAAC;AAIF,eAAO,MAAM,0BAA0B,EAAE,sBAAsB,EAsJ9D,CAAC;AAIF,gDAAgD;AAChD,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,wBAAwB,GAAG,SAAS,CAGtC;AAED,kCAAkC;AAClC,eAAO,MAAM,oBAAoB,QAAoC,CAAC;AAEtE,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,QAG/B,CAAC"}