@cofondateurauchomage/libs 1.1.35 → 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;
@@ -56,6 +56,7 @@ const validatorsForAllRoutes = {
56
56
  newsletterMarketing,
57
57
  logo,
58
58
  tel,
59
+ emailProspect: email,
59
60
  },
60
61
  deleteProject: {},
61
62
  updateProject: {
@@ -92,6 +93,7 @@ const validatorsForAllRoutes = {
92
93
  newsletterMarketing,
93
94
  photo,
94
95
  tel,
96
+ emailProspect: email,
95
97
  },
96
98
  deleteUser: {},
97
99
  updateUser: {
@@ -124,6 +126,9 @@ const validatorsForAllRoutes = {
124
126
  match: (0, validate_1.isBoolean)().isOptional(),
125
127
  marketing: (0, validate_1.isBoolean)().isOptional(),
126
128
  },
129
+ createProspect: {
130
+ email,
131
+ },
127
132
  //////////
128
133
  // Routes
129
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";
@@ -80,3 +81,6 @@ export interface INotification {
80
81
  body?: string;
81
82
  link?: string;
82
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.35",
3
+ "version": "1.1.36",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {