@cofondateurauchomage/libs 1.1.34 → 1.1.36

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
@@ -1,10 +1,12 @@
1
- import { IContact, INewsletter, IProject, IUser, TPlan } from "./db.model";
2
- export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "activeProject" | "createUser" | "updateUser" | "deleteUser" | "activeUser" | "addStripeId" | "updatePlan" | "addStatsAssociation" | "updateNewsletter";
1
+ import { IContact, INewsletter, IProject, IProspect, IUser, TPlan } from "./db.model";
2
+ export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "activeProject" | "createUser" | "updateUser" | "deleteUser" | "activeUser" | "addStripeId" | "updatePlan" | "addStatsAssociation" | "updateNewsletter" | "createProspect";
3
3
  export type RouteNames = "checkout_session" | "delete_customer" | "portal_session" | "webhook";
4
4
  export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
5
5
  createProject: Omit<IProject, "id" | "plan" | "active" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & IContact & {
6
6
  newsletterMatch?: boolean;
7
7
  newsletterMarketing?: boolean;
8
+ } & {
9
+ emailProspect: string;
8
10
  };
9
11
  deleteProject: {};
10
12
  updateProject: Pick<IProject, "city" | "description" | "invest" | "name" | "partner" | "skills" | "zipCode" | "status" | "status_detail" | "logo"> & Omit<IContact, "email">;
@@ -14,6 +16,8 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
14
16
  createUser: Omit<IUser, "id" | "plan" | "active" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & IContact & {
15
17
  newsletterMatch?: boolean;
16
18
  newsletterMarketing?: boolean;
19
+ } & {
20
+ emailProspect: string;
17
21
  };
18
22
  deleteUser: {};
19
23
  updateUser: Pick<IUser, "business" | "city" | "invest" | "motivations" | "partner" | "skills" | "zipCode" | "photo"> & Omit<IContact, "email">;
@@ -32,6 +36,7 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
32
36
  };
33
37
  addStatsAssociation: {};
34
38
  updateNewsletter: INewsletter;
39
+ createProspect: IProspect;
35
40
  checkout_session: {
36
41
  stripeId?: string;
37
42
  email: string;
@@ -32,6 +32,7 @@ const photo = (0, validate_1.isString)().isOptional();
32
32
  const logo = (0, validate_1.isString)().isOptional();
33
33
  const plan = (0, validate_1.isMatchEnum)(["free", "pro", "premium"]);
34
34
  const apiSecretKey = (0, validate_1.isString)();
35
+ const tel = (0, validate_1.isMatchRegex)(regex_1.RGX.Tel.regex).isOptional();
35
36
  const validatorsForAllRoutes = {
36
37
  ///////////////////
37
38
  // Cloud functions
@@ -54,6 +55,8 @@ const validatorsForAllRoutes = {
54
55
  newsletterMatch,
55
56
  newsletterMarketing,
56
57
  logo,
58
+ tel,
59
+ emailProspect: email,
57
60
  },
58
61
  deleteProject: {},
59
62
  updateProject: {
@@ -68,6 +71,7 @@ const validatorsForAllRoutes = {
68
71
  description,
69
72
  partner,
70
73
  logo,
74
+ tel,
71
75
  },
72
76
  activeProject: {
73
77
  active: (0, validate_1.isBoolean)(),
@@ -88,6 +92,8 @@ const validatorsForAllRoutes = {
88
92
  newsletterMatch,
89
93
  newsletterMarketing,
90
94
  photo,
95
+ tel,
96
+ emailProspect: email,
91
97
  },
92
98
  deleteUser: {},
93
99
  updateUser: {
@@ -100,6 +106,7 @@ const validatorsForAllRoutes = {
100
106
  skills,
101
107
  zipCode,
102
108
  photo,
109
+ tel,
103
110
  },
104
111
  activeUser: {
105
112
  active: (0, validate_1.isBoolean)(),
@@ -119,6 +126,9 @@ const validatorsForAllRoutes = {
119
126
  match: (0, validate_1.isBoolean)().isOptional(),
120
127
  marketing: (0, validate_1.isBoolean)().isOptional(),
121
128
  },
129
+ createProspect: {
130
+ email,
131
+ },
122
132
  //////////
123
133
  // Routes
124
134
  checkout_session: {
@@ -4,7 +4,8 @@ export declare enum Collections {
4
4
  contacts = "contacts",
5
5
  newsletters = "newsletters",
6
6
  stats = "stats",
7
- notifications = "notifications"
7
+ notifications = "notifications",
8
+ prospects = "prospects"
8
9
  }
9
10
  export type TSkill = "Business" | "Design" | "Marketing" | "Produit" | "Tech";
10
11
  export type TPlan = "free" | "pro" | "premium";
@@ -63,6 +64,7 @@ export type TProjectStatus = "idea" | "creation" | "launch" | "growth";
63
64
  export interface IContact {
64
65
  email: string;
65
66
  linkedin?: string;
67
+ tel?: string;
66
68
  }
67
69
  export interface INewsletter {
68
70
  match?: boolean;
@@ -79,3 +81,6 @@ export interface INotification {
79
81
  body?: string;
80
82
  link?: string;
81
83
  }
84
+ export interface IProspect {
85
+ email: string;
86
+ }
package/build/db.model.js CHANGED
@@ -9,4 +9,5 @@ var Collections;
9
9
  Collections["newsletters"] = "newsletters";
10
10
  Collections["stats"] = "stats";
11
11
  Collections["notifications"] = "notifications";
12
+ Collections["prospects"] = "prospects";
12
13
  })(Collections = exports.Collections || (exports.Collections = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.1.34",
3
+ "version": "1.1.36",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {