@cofondateurauchomage/libs 1.1.132 → 1.1.133

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.
@@ -76,10 +76,38 @@ const userBody = {
76
76
  industries: zod_1.z.array(zIndustryWithNeverMind).optional(),
77
77
  photo: zod_1.z.string().optional(),
78
78
  };
79
+ const FIELDS_LABEL = {
80
+ ambitions: "Ambitions",
81
+ availability: "Disponibilité",
82
+ bestStrength: "Meilleur atout",
83
+ business: "Business",
84
+ city: "Ville",
85
+ description: "Description",
86
+ email: "Email",
87
+ firstName: "Prénom",
88
+ industries: "Industries",
89
+ invest: "Investissement",
90
+ lastName: "Nom",
91
+ linkedin: "Linkedin",
92
+ motivations: "Motivations",
93
+ name: "Nom",
94
+ partner: "Partenaire",
95
+ partner_iii: "Partenaire III",
96
+ partner_swanbase: "Partenaire Swanbase",
97
+ productTypes: "Types de produits",
98
+ projectStatus: "Statut du projet",
99
+ skills: "Compétences",
100
+ status: "Statut",
101
+ status_detail: "Détail du statut",
102
+ tel: "Téléphone",
103
+ turnover: "Chiffre d'affaires",
104
+ website: "Site web",
105
+ yearsOfExperience: "Années d'expérience",
106
+ };
79
107
  function throwFromZodError(error) {
80
108
  const issue = error.issues[0];
81
109
  const key = issue.path.find((p) => typeof p === "string") ?? "champ";
82
- const humanKey = (0, utils_1.capitalize)(key.replaceAll("_", " "));
110
+ const humanKey = FIELDS_LABEL[key] ?? (0, utils_1.capitalize)(key.replaceAll("_", " "));
83
111
  if (issue.code === "invalid_type" &&
84
112
  /\breceived undefined\b/i.test(issue.message)) {
85
113
  throw new ValidationError(400, `${humanKey} requis`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.1.132",
3
+ "version": "1.1.133",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {