udp-schema 2.26.0 → 2.30.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 +11 -1
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/onboarding-config.d.ts.map +1 -1
- package/dist/onboarding-config.js +106 -0
- package/dist/onboarding-config.js.map +1 -1
- package/dist/onboarding-form.d.ts +378 -0
- package/dist/onboarding-form.d.ts.map +1 -1
- package/dist/profile-fields/07-employment.d.ts.map +1 -1
- package/dist/profile-fields/07-employment.js +175 -35
- package/dist/profile-fields/07-employment.js.map +1 -1
- package/dist/profile-fields/12-household.d.ts +15 -2
- package/dist/profile-fields/12-household.d.ts.map +1 -1
- package/dist/profile-fields/12-household.js +166 -17
- package/dist/profile-fields/12-household.js.map +1 -1
- package/dist/profile-fields/types.d.ts +12 -3
- 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 +17 -0
- package/dist/progress-fields.js.map +1 -1
- package/dist/shared-enums.d.ts +78 -0
- package/dist/shared-enums.d.ts.map +1 -0
- package/dist/shared-enums.js +184 -0
- package/dist/shared-enums.js.map +1 -0
- package/dist/step-01.schema.d.ts.map +1 -1
- package/dist/step-01.schema.js +8 -79
- package/dist/step-01.schema.js.map +1 -1
- package/dist/step-06.schema.d.ts.map +1 -1
- package/dist/step-06.schema.js +4 -13
- package/dist/step-06.schema.js.map +1 -1
- package/dist/step-07.schema.d.ts.map +1 -1
- package/dist/step-07.schema.js +8 -114
- package/dist/step-07.schema.js.map +1 -1
- package/dist/step-12.schema.d.ts +434 -3
- package/dist/step-12.schema.d.ts.map +1 -1
- package/dist/step-12.schema.js +72 -3
- package/dist/step-12.schema.js.map +1 -1
- package/package.json +1 -1
- package/dist/field-meta.d.ts +0 -20
- package/dist/field-meta.d.ts.map +0 -1
- package/dist/field-meta.js +0 -19
- package/dist/field-meta.js.map +0 -1
- package/dist/step-13.schema.d.ts +0 -186
- package/dist/step-13.schema.d.ts.map +0 -1
- package/dist/step-13.schema.js +0 -215
- package/dist/step-13.schema.js.map +0 -1
- package/dist/step-14.schema.d.ts +0 -88
- package/dist/step-14.schema.d.ts.map +0 -1
- package/dist/step-14.schema.js +0 -135
- package/dist/step-14.schema.js.map +0 -1
package/dist/step-14.schema.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
// ─── Enums ────────────────────────────────────────────────────────────────────
|
|
3
|
-
/**
|
|
4
|
-
* Life areas the member wants to prioritise in the coming year.
|
|
5
|
-
* Expanded beyond spec: added POLITICAL_ACTIVISM, PERSONAL_GROWTH,
|
|
6
|
-
* CREATIVE_ARTS to capture the full range of meaningful life goals.
|
|
7
|
-
*/
|
|
8
|
-
export const PRIORITY_CATEGORY_TAGS = [
|
|
9
|
-
'CAREER', // Job growth, promotion, job change
|
|
10
|
-
'BUSINESS', // Starting or growing a business
|
|
11
|
-
'EDUCATION', // Degrees, certifications, self-study
|
|
12
|
-
'HEALTH', // Fitness, mental health, medical
|
|
13
|
-
'FAMILY', // Family duties, parenting, elder care
|
|
14
|
-
'MARRIAGE', // Marriage planning or relationship
|
|
15
|
-
'FINANCE', // Savings, investments, debt repayment
|
|
16
|
-
'SPIRITUAL', // Religion, meditation, personal faith
|
|
17
|
-
'SOCIAL_SERVICE', // Community work, volunteering
|
|
18
|
-
'POLITICAL_ACTIVISM', // Active participation in politics/movement — added beyond spec
|
|
19
|
-
'PERSONAL_GROWTH', // Self-improvement, habits, mindset — added beyond spec
|
|
20
|
-
'CREATIVE_ARTS', // Music, writing, art, craft — added beyond spec
|
|
21
|
-
'OTHER',
|
|
22
|
-
];
|
|
23
|
-
/**
|
|
24
|
-
* Skills the member wants to develop.
|
|
25
|
-
* Added beyond spec; enables the org to match training and mentoring programs.
|
|
26
|
-
*/
|
|
27
|
-
export const SKILLS_TO_LEARN = [
|
|
28
|
-
'PUBLIC_SPEAKING',
|
|
29
|
-
'LEADERSHIP',
|
|
30
|
-
'DIGITAL_MARKETING',
|
|
31
|
-
'DATA_ANALYSIS',
|
|
32
|
-
'FOREIGN_LANGUAGE',
|
|
33
|
-
'FINANCIAL_LITERACY',
|
|
34
|
-
'LEGAL_AWARENESS', // RTI, consumer rights, constitutional rights
|
|
35
|
-
'FARMING_AGRICULTURE',
|
|
36
|
-
'TECHNICAL_IT',
|
|
37
|
-
'TEACHING_TRAINING',
|
|
38
|
-
'SOCIAL_MEDIA_CONTENT',
|
|
39
|
-
'NEGOTIATION',
|
|
40
|
-
'FIRST_AID_HEALTH',
|
|
41
|
-
'CONFLICT_RESOLUTION',
|
|
42
|
-
'OTHER',
|
|
43
|
-
];
|
|
44
|
-
/**
|
|
45
|
-
* Hours per week the member can offer as a volunteer.
|
|
46
|
-
* Added beyond spec; essential for capacity planning.
|
|
47
|
-
*/
|
|
48
|
-
export const VOLUNTEERING_CAPACITY = [
|
|
49
|
-
'LESS_THAN_2_HRS', // < 2 hours per week
|
|
50
|
-
'TWO_TO_5_HRS', // 2–5 hours per week
|
|
51
|
-
'FIVE_TO_10_HRS', // 5–10 hours per week
|
|
52
|
-
'MORE_THAN_10_HRS', // 10+ hours per week
|
|
53
|
-
'FULL_TIME', // Available full-time for org work
|
|
54
|
-
];
|
|
55
|
-
/**
|
|
56
|
-
* What kind of support the member needs from the organisation.
|
|
57
|
-
* Added beyond spec — turns this step into a two-way conversation.
|
|
58
|
-
*/
|
|
59
|
-
export const HELP_NEEDED_FROM_ORG = [
|
|
60
|
-
'CAREER_GUIDANCE',
|
|
61
|
-
'LEGAL_SUPPORT',
|
|
62
|
-
'FINANCIAL_AID',
|
|
63
|
-
'HEALTH_SUPPORT',
|
|
64
|
-
'EDUCATION_SCHOLARSHIP',
|
|
65
|
-
'LEADERSHIP_TRAINING',
|
|
66
|
-
'NETWORK_CONNECTIONS',
|
|
67
|
-
'EMOTIONAL_SUPPORT',
|
|
68
|
-
'DIGITAL_TRAINING',
|
|
69
|
-
'BUSINESS_MENTORING',
|
|
70
|
-
'NONE',
|
|
71
|
-
];
|
|
72
|
-
// ─── Schema ───────────────────────────────────────────────────────────────────
|
|
73
|
-
export const step14PrioritiesSchema = z.object({
|
|
74
|
-
// ── 14.1 Top Priorities This Year ─────────────────────────────────────────
|
|
75
|
-
/**
|
|
76
|
-
* Open text: what are the member's most important goals for the next 12 months?
|
|
77
|
-
* Captures individual context that structured tags cannot.
|
|
78
|
-
*/
|
|
79
|
-
topPrioritiesThisYear: z.string().trim().optional(),
|
|
80
|
-
/**
|
|
81
|
-
* Structured tags for the same priorities.
|
|
82
|
-
* Used for filtering, grouping, and program matching at scale.
|
|
83
|
-
*/
|
|
84
|
-
priorityCategoryTags: z.array(z.enum(PRIORITY_CATEGORY_TAGS)).optional(),
|
|
85
|
-
// ── 14.2 Five-Year Vision ─────────────────────────────────────────────────
|
|
86
|
-
/**
|
|
87
|
-
* Where does the member see themselves in 5 years?
|
|
88
|
-
* Added beyond spec — key signal for leadership pipeline and mentoring.
|
|
89
|
-
*/
|
|
90
|
-
fiveYearVision: z.string().trim().optional(),
|
|
91
|
-
// ── 14.3 Biggest Personal Challenge ──────────────────────────────────────
|
|
92
|
-
/**
|
|
93
|
-
* The single biggest challenge or obstacle in their life right now.
|
|
94
|
-
* Added beyond spec — builds empathy map; helps org understand member barriers.
|
|
95
|
-
*/
|
|
96
|
-
biggestPersonalChallenge: z.string().trim().optional(),
|
|
97
|
-
// ── 14.4 Skills to Learn ──────────────────────────────────────────────────
|
|
98
|
-
/**
|
|
99
|
-
* Skills the member wants to develop or improve.
|
|
100
|
-
* Added beyond spec; enables matching with org training programs.
|
|
101
|
-
*/
|
|
102
|
-
skillsWantToLearn: z.array(z.enum(SKILLS_TO_LEARN)).optional(),
|
|
103
|
-
// ── 14.5 Alignment with Movement ─────────────────────────────────────────
|
|
104
|
-
/**
|
|
105
|
-
* How does the member's personal vision align with the organisation's goals?
|
|
106
|
-
* Open text — surfaces natural advocates and identifies misalignments early.
|
|
107
|
-
*/
|
|
108
|
-
alignmentWithMovement: z.string().trim().optional(),
|
|
109
|
-
// ── 14.6 Volunteering Willingness ────────────────────────────────────────
|
|
110
|
-
/**
|
|
111
|
-
* Is the member open to volunteering for org activities?
|
|
112
|
-
* Added beyond spec — fundamental for mobilisation planning.
|
|
113
|
-
*/
|
|
114
|
-
openToVolunteering: z.enum(['YES', 'NO', 'MAYBE']).optional(),
|
|
115
|
-
/**
|
|
116
|
-
* How many hours per week can they contribute as a volunteer?
|
|
117
|
-
* Shown only when openToVolunteering is YES or MAYBE.
|
|
118
|
-
*/
|
|
119
|
-
volunteeringCapacityPerWeek: z.enum(VOLUNTEERING_CAPACITY).optional(),
|
|
120
|
-
// ── 14.7 How the Org Can Help ─────────────────────────────────────────────
|
|
121
|
-
/**
|
|
122
|
-
* What support does the member need from the organisation?
|
|
123
|
-
* Added beyond spec — turns onboarding into a two-way conversation,
|
|
124
|
-
* creating immediate engagement and value for the member.
|
|
125
|
-
*/
|
|
126
|
-
helpNeededFromOrg: z.array(z.enum(HELP_NEEDED_FROM_ORG)).optional(),
|
|
127
|
-
// ── 14.8 Personal Message ─────────────────────────────────────────────────
|
|
128
|
-
/**
|
|
129
|
-
* Anything else the member wants to share — an open farewell message.
|
|
130
|
-
* Added beyond spec; surfaces strong motivations, concerns, or stories.
|
|
131
|
-
* Often the most revealing field in the entire survey.
|
|
132
|
-
*/
|
|
133
|
-
personalMessage: z.string().trim().optional(),
|
|
134
|
-
});
|
|
135
|
-
//# sourceMappingURL=step-14.schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"step-14.schema.js","sourceRoot":"","sources":["../src/step-14.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM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;OAGG;IACH,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAEnD;;;OAGG;IACH,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,QAAQ,EAAE;IAExE,6EAA6E;IAE7E;;;OAGG;IACH,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAE5C,4EAA4E;IAE5E;;;OAGG;IACH,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAEtD,6EAA6E;IAE7E;;;OAGG;IACH,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ,EAAE;IAE9D,4EAA4E;IAE5E;;;OAGG;IACH,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAEnD,4EAA4E;IAE5E;;;OAGG;IACH,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;IAE7D;;;OAGG;IACH,2BAA2B,EAAE,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;IAErE,6EAA6E;IAE7E;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,QAAQ,EAAE;IAEnE,6EAA6E;IAE7E;;;;OAIG;IACH,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n// ─── Enums ────────────────────────────────────────────────────────────────────\n\n/**\n * Life areas the member wants to prioritise in the coming year.\n * Expanded beyond spec: added POLITICAL_ACTIVISM, PERSONAL_GROWTH,\n * CREATIVE_ARTS to capture the full range of meaningful life goals.\n */\nexport const PRIORITY_CATEGORY_TAGS = [\n 'CAREER', // Job growth, promotion, job change\n 'BUSINESS', // Starting or growing a business\n 'EDUCATION', // Degrees, certifications, self-study\n 'HEALTH', // Fitness, mental health, medical\n 'FAMILY', // Family duties, parenting, elder care\n 'MARRIAGE', // Marriage planning or relationship\n 'FINANCE', // Savings, investments, debt repayment\n 'SPIRITUAL', // Religion, meditation, personal faith\n 'SOCIAL_SERVICE', // Community work, volunteering\n 'POLITICAL_ACTIVISM', // Active participation in politics/movement — added beyond spec\n 'PERSONAL_GROWTH', // Self-improvement, habits, mindset — added beyond spec\n 'CREATIVE_ARTS', // Music, writing, art, craft — added beyond spec\n 'OTHER',\n] as const;\n\n/**\n * Skills the member wants to develop.\n * Added beyond spec; enables the org to match training and mentoring programs.\n */\nexport const SKILLS_TO_LEARN = [\n 'PUBLIC_SPEAKING',\n 'LEADERSHIP',\n 'DIGITAL_MARKETING',\n 'DATA_ANALYSIS',\n 'FOREIGN_LANGUAGE',\n 'FINANCIAL_LITERACY',\n 'LEGAL_AWARENESS', // RTI, consumer rights, constitutional rights\n 'FARMING_AGRICULTURE',\n 'TECHNICAL_IT',\n 'TEACHING_TRAINING',\n 'SOCIAL_MEDIA_CONTENT',\n 'NEGOTIATION',\n 'FIRST_AID_HEALTH',\n 'CONFLICT_RESOLUTION',\n 'OTHER',\n] as const;\n\n/**\n * Hours per week the member can offer as a volunteer.\n * Added beyond spec; essential for capacity planning.\n */\nexport const VOLUNTEERING_CAPACITY = [\n 'LESS_THAN_2_HRS', // < 2 hours per week\n 'TWO_TO_5_HRS', // 2–5 hours per week\n 'FIVE_TO_10_HRS', // 5–10 hours per week\n 'MORE_THAN_10_HRS', // 10+ hours per week\n 'FULL_TIME', // Available full-time for org work\n] as const;\n\n/**\n * What kind of support the member needs from the organisation.\n * Added beyond spec — turns this step into a two-way conversation.\n */\nexport const HELP_NEEDED_FROM_ORG = [\n 'CAREER_GUIDANCE',\n 'LEGAL_SUPPORT',\n 'FINANCIAL_AID',\n 'HEALTH_SUPPORT',\n 'EDUCATION_SCHOLARSHIP',\n 'LEADERSHIP_TRAINING',\n 'NETWORK_CONNECTIONS',\n 'EMOTIONAL_SUPPORT',\n 'DIGITAL_TRAINING',\n 'BUSINESS_MENTORING',\n 'NONE',\n] as const;\n\n// ─── Schema ───────────────────────────────────────────────────────────────────\n\nexport const step14PrioritiesSchema = z.object({\n // ── 14.1 Top Priorities This Year ─────────────────────────────────────────\n\n /**\n * Open text: what are the member's most important goals for the next 12 months?\n * Captures individual context that structured tags cannot.\n */\n topPrioritiesThisYear: z.string().trim().optional(),\n\n /**\n * Structured tags for the same priorities.\n * Used for filtering, grouping, and program matching at scale.\n */\n priorityCategoryTags: z.array(z.enum(PRIORITY_CATEGORY_TAGS)).optional(),\n\n // ── 14.2 Five-Year Vision ─────────────────────────────────────────────────\n\n /**\n * Where does the member see themselves in 5 years?\n * Added beyond spec — key signal for leadership pipeline and mentoring.\n */\n fiveYearVision: z.string().trim().optional(),\n\n // ── 14.3 Biggest Personal Challenge ──────────────────────────────────────\n\n /**\n * The single biggest challenge or obstacle in their life right now.\n * Added beyond spec — builds empathy map; helps org understand member barriers.\n */\n biggestPersonalChallenge: z.string().trim().optional(),\n\n // ── 14.4 Skills to Learn ──────────────────────────────────────────────────\n\n /**\n * Skills the member wants to develop or improve.\n * Added beyond spec; enables matching with org training programs.\n */\n skillsWantToLearn: z.array(z.enum(SKILLS_TO_LEARN)).optional(),\n\n // ── 14.5 Alignment with Movement ─────────────────────────────────────────\n\n /**\n * How does the member's personal vision align with the organisation's goals?\n * Open text — surfaces natural advocates and identifies misalignments early.\n */\n alignmentWithMovement: z.string().trim().optional(),\n\n // ── 14.6 Volunteering Willingness ────────────────────────────────────────\n\n /**\n * Is the member open to volunteering for org activities?\n * Added beyond spec — fundamental for mobilisation planning.\n */\n openToVolunteering: z.enum(['YES', 'NO', 'MAYBE']).optional(),\n\n /**\n * How many hours per week can they contribute as a volunteer?\n * Shown only when openToVolunteering is YES or MAYBE.\n */\n volunteeringCapacityPerWeek: z.enum(VOLUNTEERING_CAPACITY).optional(),\n\n // ── 14.7 How the Org Can Help ─────────────────────────────────────────────\n\n /**\n * What support does the member need from the organisation?\n * Added beyond spec — turns onboarding into a two-way conversation,\n * creating immediate engagement and value for the member.\n */\n helpNeededFromOrg: z.array(z.enum(HELP_NEEDED_FROM_ORG)).optional(),\n\n // ── 14.8 Personal Message ─────────────────────────────────────────────────\n\n /**\n * Anything else the member wants to share — an open farewell message.\n * Added beyond spec; surfaces strong motivations, concerns, or stories.\n * Often the most revealing field in the entire survey.\n */\n personalMessage: z.string().trim().optional(),\n});\n\nexport type Step14PrioritiesInput = z.infer<typeof step14PrioritiesSchema>;\n"]}
|