@cofondateurauchomage/libs 1.1.14 → 1.1.18

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,13 +1,13 @@
1
- import { INewsletter, IProject, IUser } from "./db.model";
2
- export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "addStripeIdToProject" | "activeProject" | "createUser" | "updateUser" | "deleteUser" | "addStatsAssociation" | "updateNewsletter";
1
+ import { IContact, INewsletter, IProject, IUser } from "./db.model";
2
+ export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "addStripeIdToProject" | "activeProject" | "createUser" | "updateUser" | "deleteUser" | "activeUser" | "addStatsAssociation" | "updateNewsletter";
3
3
  export type RouteNames = "checkout_session" | "delete_customer" | "portal_session" | "webhook";
4
4
  export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
5
- createProject: Omit<IProject, "id" | "active" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & {
5
+ createProject: Omit<IProject, "id" | "active" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & IContact & {
6
6
  newsletterMatch?: boolean;
7
7
  newsletterMarketing?: boolean;
8
8
  };
9
9
  deleteProject: {};
10
- updateProject: Pick<IProject, "city" | "description" | "invest" | "linkedin" | "name" | "partner" | "skills" | "zipCode">;
10
+ updateProject: Pick<IProject, "city" | "description" | "invest" | "name" | "partner" | "skills" | "zipCode"> & Omit<IContact, "email">;
11
11
  addStripeIdToProject: {
12
12
  email: string;
13
13
  stripeId: string;
@@ -16,12 +16,15 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
16
16
  stripeId: string;
17
17
  active: boolean;
18
18
  };
19
- createUser: Omit<IUser, "id" | "active" | "clicks" | "creationDate" | "lastConnection" | "likes"> & {
19
+ createUser: Omit<IUser, "id" | "active" | "clicks" | "creationDate" | "lastConnection" | "likes"> & IContact & {
20
20
  newsletterMatch?: boolean;
21
21
  newsletterMarketing?: boolean;
22
22
  };
23
23
  deleteUser: {};
24
- updateUser: Pick<IUser, "business" | "city" | "invest" | "linkedin" | "motivations" | "partner" | "skills" | "zipCode">;
24
+ updateUser: Pick<IUser, "business" | "city" | "invest" | "motivations" | "partner" | "skills" | "zipCode"> & Omit<IContact, "email">;
25
+ activeUser: {
26
+ active: boolean;
27
+ };
25
28
  addStatsAssociation: {};
26
29
  updateNewsletter: INewsletter;
27
30
  checkout_session: {
@@ -91,6 +91,9 @@ const validatorsForAllRoutes = {
91
91
  skills,
92
92
  zipCode,
93
93
  },
94
+ activeUser: {
95
+ active: (0, validate_1.isBoolean)(),
96
+ },
94
97
  addStatsAssociation: {},
95
98
  updateNewsletter: {
96
99
  match: (0, validate_1.isBoolean)().isOptional(),
@@ -1,8 +1,9 @@
1
1
  export declare enum Collections {
2
2
  users = "users",
3
3
  projects = "projects",
4
- stats = "stats",
5
- newsletters = "newsletters"
4
+ contacts = "contacts",
5
+ newsletters = "newsletters",
6
+ stats = "stats"
6
7
  }
7
8
  export type TSkill = "Business" | "Design" | "Marketing" | "Produit" | "Tech";
8
9
  export interface IClicks {
@@ -15,12 +16,10 @@ export interface IUser {
15
16
  id: string;
16
17
  business: string;
17
18
  city: string;
18
- email: string;
19
19
  firstName: string;
20
20
  invest?: number;
21
21
  joblessDate: string;
22
22
  lastName: string;
23
- linkedin?: string;
24
23
  motivations: string;
25
24
  partner: string;
26
25
  skills: TSkill[];
@@ -35,11 +34,9 @@ export interface IProject {
35
34
  id: string;
36
35
  city: string;
37
36
  description: string;
38
- email: string;
39
37
  firstName: string;
40
38
  invest?: number;
41
39
  lastName: string;
42
- linkedin?: string;
43
40
  name: string;
44
41
  partner: string;
45
42
  redstart?: boolean;
@@ -52,10 +49,14 @@ export interface IProject {
52
49
  likes: string[];
53
50
  stripeId?: string;
54
51
  }
55
- export interface IStatsAssociation {
56
- liste: string[];
52
+ export interface IContact {
53
+ email: string;
54
+ linkedin?: string;
57
55
  }
58
56
  export interface INewsletter {
59
57
  match?: boolean;
60
58
  marketing?: boolean;
61
59
  }
60
+ export interface IStatsAssociation {
61
+ liste: string[];
62
+ }
package/build/db.model.js CHANGED
@@ -5,6 +5,7 @@ var Collections;
5
5
  (function (Collections) {
6
6
  Collections["users"] = "users";
7
7
  Collections["projects"] = "projects";
8
- Collections["stats"] = "stats";
8
+ Collections["contacts"] = "contacts";
9
9
  Collections["newsletters"] = "newsletters";
10
+ Collections["stats"] = "stats";
10
11
  })(Collections = exports.Collections || (exports.Collections = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.1.14",
3
+ "version": "1.1.18",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {