@cofondateurauchomage/libs 1.1.164 → 1.1.167
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/build/db.model.d.ts +15 -1
- package/build/db.model.js +2 -0
- package/build/regex.d.ts +0 -4
- package/build/regex.js +1 -6
- package/package.json +1 -1
package/build/db.model.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ export declare enum Collections {
|
|
|
9
9
|
reactions = "reactions",
|
|
10
10
|
visits = "visits",
|
|
11
11
|
blogHtmlArticles = "blog_html_articles",
|
|
12
|
-
crm_profiles = "crm_profiles"
|
|
12
|
+
crm_profiles = "crm_profiles",
|
|
13
|
+
admins = "admins",
|
|
14
|
+
crm_team_call_events = "crm_team_call_events"
|
|
13
15
|
}
|
|
14
16
|
export type TSkill = "Sales" | "Operation" | "Design" | "Marketing" | "Produit" | "Tech" | "Growth" | "Finance";
|
|
15
17
|
export type TPlan = "free" | "pro" | "premium";
|
|
@@ -152,6 +154,18 @@ export interface ICrmNote {
|
|
|
152
154
|
createdAt: number;
|
|
153
155
|
author: string;
|
|
154
156
|
}
|
|
157
|
+
/** CRM operator identity (document id = Firebase Auth uid). */
|
|
158
|
+
export interface IAdmin {
|
|
159
|
+
uid: string;
|
|
160
|
+
displayName: string;
|
|
161
|
+
email: string;
|
|
162
|
+
}
|
|
163
|
+
/** One logged team call (append-only; filter by `createdAt` for date ranges). */
|
|
164
|
+
export interface ICrmTeamCallEvent {
|
|
165
|
+
uid: string;
|
|
166
|
+
crmId: string;
|
|
167
|
+
createdAt: number;
|
|
168
|
+
}
|
|
155
169
|
export interface IContact {
|
|
156
170
|
email: string;
|
|
157
171
|
linkedin?: string;
|
package/build/db.model.js
CHANGED
|
@@ -14,4 +14,6 @@ var Collections;
|
|
|
14
14
|
Collections["visits"] = "visits";
|
|
15
15
|
Collections["blogHtmlArticles"] = "blog_html_articles";
|
|
16
16
|
Collections["crm_profiles"] = "crm_profiles";
|
|
17
|
+
Collections["admins"] = "admins";
|
|
18
|
+
Collections["crm_team_call_events"] = "crm_team_call_events";
|
|
17
19
|
})(Collections || (exports.Collections = Collections = {}));
|
package/build/regex.d.ts
CHANGED
|
@@ -10,22 +10,18 @@ export declare const RGX: {
|
|
|
10
10
|
};
|
|
11
11
|
Email: {
|
|
12
12
|
regex: RegExp;
|
|
13
|
-
pattern: string;
|
|
14
13
|
message: string;
|
|
15
14
|
};
|
|
16
15
|
Linkedin: {
|
|
17
16
|
regex: RegExp;
|
|
18
|
-
pattern: string;
|
|
19
17
|
message: string;
|
|
20
18
|
};
|
|
21
19
|
Name: {
|
|
22
20
|
regex: RegExp;
|
|
23
|
-
pattern: string;
|
|
24
21
|
message: string;
|
|
25
22
|
};
|
|
26
23
|
Tel: {
|
|
27
24
|
regex: RegExp;
|
|
28
|
-
pattern: string;
|
|
29
25
|
message: string;
|
|
30
26
|
};
|
|
31
27
|
};
|
package/build/regex.js
CHANGED
|
@@ -6,11 +6,10 @@ const regex = {
|
|
|
6
6
|
date: /^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))$/,
|
|
7
7
|
email: /^[\w.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/,
|
|
8
8
|
/** Saisie tolérante (schéma / attribut HTML). La valeur canonique est produite par `normalizeLinkedInUrl`. */
|
|
9
|
-
linkedin: /^(https?:\/\/)?(www\.)?([\w
|
|
9
|
+
linkedin: /^(https?:\/\/)?(www\.)?([\w\-]+\.)?linkedin\.com\/(pub|in|profile|company)\/.+$/i,
|
|
10
10
|
name: /^(?=.*[A-Za-zÜ-ü])[A-Za-zÜ-ü\s\-]{1,50}$/,
|
|
11
11
|
tel: /^([+][1-9]{2,3}[ .\-]?)?[0-9]{1,3}([ .\-]?[0-9]{2,3}){3,6}$/,
|
|
12
12
|
};
|
|
13
|
-
const pattern = (regex) => String(regex).replace("/^", "").replace("$/", "");
|
|
14
13
|
/**
|
|
15
14
|
* Accepte plusieurs formes d’URL profil LinkedIn et renvoie toujours
|
|
16
15
|
* `https://www.linkedin.com/.../` (slash final, sans query/hash).
|
|
@@ -51,22 +50,18 @@ exports.RGX = {
|
|
|
51
50
|
},
|
|
52
51
|
Email: {
|
|
53
52
|
regex: regex.email,
|
|
54
|
-
pattern: pattern(regex.email),
|
|
55
53
|
message: `Veuillez entrer une adresse email valide.`,
|
|
56
54
|
},
|
|
57
55
|
Linkedin: {
|
|
58
56
|
regex: regex.linkedin,
|
|
59
|
-
pattern: pattern(regex.linkedin),
|
|
60
57
|
message: `Le lien doit être un URL LinkedIn valide. (ex: https://www.linkedin.com/in/valentin-lemaire/)`,
|
|
61
58
|
},
|
|
62
59
|
Name: {
|
|
63
60
|
regex: regex.name,
|
|
64
|
-
pattern: pattern(regex.name),
|
|
65
61
|
message: `Accepte les noms composés (espace ou -) et les accents jusqu'à 50 caractères. Les caractères spéciaux et les chiffres ne sont pas autorisés.`,
|
|
66
62
|
},
|
|
67
63
|
Tel: {
|
|
68
64
|
regex: regex.tel,
|
|
69
|
-
pattern: pattern(regex.tel),
|
|
70
65
|
message: `Veuillez entrer un numéro de téléphone valide.`,
|
|
71
66
|
},
|
|
72
67
|
};
|