@cofondateurauchomage/libs 1.1.3 → 1.1.5

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/api.d.ts CHANGED
@@ -4,7 +4,7 @@ export type RouteNames = "checkout_session" | "delete_customer" | "portal_sessio
4
4
  export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
5
5
  createProjectCall: Omit<IProject, "active" | "clicks" | "creationDate" | "likes" | "stripeId">;
6
6
  deleteProjectCall: {};
7
- updateProjectCall: Pick<IProject, "city" | "description" | "invest" | "linkedin" | "partner" | "skills" | "tel" | "zipCode">;
7
+ updateProjectCall: Pick<IProject, "city" | "description" | "invest" | "linkedin" | "partner" | "skills" | "zipCode">;
8
8
  addStripeIdToProjectCall: {
9
9
  email: string;
10
10
  stripeId: string;
@@ -15,7 +15,7 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
15
15
  };
16
16
  createUserCall: Omit<IUser, "clicks" | "creationDate" | "likes">;
17
17
  deleteUserCall: {};
18
- updateUserCall: Pick<IUser, "business" | "city" | "invest" | "linkedin" | "motivations" | "partner" | "skills" | "tel" | "zipCode">;
18
+ updateUserCall: Pick<IUser, "business" | "city" | "invest" | "linkedin" | "motivations" | "partner" | "skills" | "zipCode">;
19
19
  addStatsAssociationCall: {};
20
20
  checkout_session: {
21
21
  stripeId?: string;
@@ -16,15 +16,12 @@ const lastName = (0, validate_1.isMatchRegex)(regex_1.RGX.Name.regex);
16
16
  const linkedin = (0, validate_1.isMatchRegex)(regex_1.RGX.Linkedin.regex);
17
17
  const motivations = (0, validate_1.isString)().setMin(10).setMax(500);
18
18
  const partner = (0, validate_1.isString)().setMin(10).setMax(300);
19
- const skills = new validate_1.Validator((value) => value &&
19
+ const skills = new validate_1.Validator((value) => !!(value &&
20
20
  Array.isArray(value) &&
21
21
  value.length >= 1 &&
22
22
  value.length <= 2 &&
23
- value.every((skill) => const_1.SKILLS.includes(skill))
24
- ? true
25
- : false);
23
+ value.every((skill) => const_1.SKILLS.includes(skill))));
26
24
  const stripeId = (0, validate_1.isString)().setMin(4).setMax(50);
27
- const tel = (0, validate_1.isMatchRegex)(regex_1.RGX.Tel.regex).isOptional();
28
25
  const zipCode = (0, validate_1.isNumber)().setMin(1000).setMax(97680);
29
26
  const validatorsForAllRoutes = {
30
27
  ///////////////////
@@ -41,7 +38,6 @@ const validatorsForAllRoutes = {
41
38
  partner,
42
39
  redstart: (0, validate_1.isBoolean)().isOptional(),
43
40
  skills,
44
- tel,
45
41
  zipCode,
46
42
  },
47
43
  deleteProjectCall: {},
@@ -52,7 +48,6 @@ const validatorsForAllRoutes = {
52
48
  linkedin,
53
49
  partner,
54
50
  skills,
55
- tel,
56
51
  zipCode,
57
52
  },
58
53
  addStripeIdToProjectCall: {
@@ -75,7 +70,6 @@ const validatorsForAllRoutes = {
75
70
  motivations,
76
71
  partner,
77
72
  skills,
78
- tel,
79
73
  zipCode,
80
74
  },
81
75
  deleteUserCall: {},
@@ -87,7 +81,6 @@ const validatorsForAllRoutes = {
87
81
  motivations,
88
82
  partner,
89
83
  skills,
90
- tel,
91
84
  zipCode,
92
85
  },
93
86
  addStatsAssociationCall: {},
@@ -1,6 +1,7 @@
1
1
  export declare enum Collections {
2
2
  users = "users",
3
- projects = "projects"
3
+ projects = "projects",
4
+ stats = "stats"
4
5
  }
5
6
  export type TSkill = "Business" | "Design" | "Marketing" | "Produit" | "Tech";
6
7
  export interface IClicks {
@@ -21,7 +22,6 @@ export interface IUser {
21
22
  motivations: string;
22
23
  partner: string;
23
24
  skills: TSkill[];
24
- tel?: string;
25
25
  zipCode: number;
26
26
  clicks: IClicks;
27
27
  creationDate: number;
@@ -39,7 +39,6 @@ export interface IProject {
39
39
  partner: string;
40
40
  redstart?: boolean;
41
41
  skills: TSkill[];
42
- tel?: string;
43
42
  zipCode: number;
44
43
  active: boolean;
45
44
  clicks: IClicks;
@@ -47,3 +46,6 @@ export interface IProject {
47
46
  likes: string[];
48
47
  stripeId?: string;
49
48
  }
49
+ export interface IStatsAssociation {
50
+ liste: string[];
51
+ }
package/build/db.model.js CHANGED
@@ -5,4 +5,5 @@ var Collections;
5
5
  (function (Collections) {
6
6
  Collections["users"] = "users";
7
7
  Collections["projects"] = "projects";
8
+ Collections["stats"] = "stats";
8
9
  })(Collections = exports.Collections || (exports.Collections = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {