@cofondateurauchomage/libs 1.1.13 → 1.1.15

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";
1
+ import { IContact, INewsletter, IProject, IUser } from "./db.model";
2
2
  export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "addStripeIdToProject" | "activeProject" | "createUser" | "updateUser" | "deleteUser" | "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,14 +16,14 @@ 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
25
  addStatsAssociation: {};
26
- updateNewsletter: Omit<INewsletter, "contact_id">;
26
+ updateNewsletter: INewsletter;
27
27
  checkout_session: {
28
28
  stripeId?: string;
29
29
  email: string;
@@ -26,7 +26,6 @@ const stripeId = (0, validate_1.isString)().setMin(4).setMax(50);
26
26
  const zipCode = (0, validate_1.isNumber)().setMin(1000).setMax(97680);
27
27
  const newsletterMatch = (0, validate_1.isBoolean)().isOptional();
28
28
  const newsletterMarketing = (0, validate_1.isBoolean)().isOptional();
29
- const contact_id = (0, validate_1.isString)();
30
29
  const validatorsForAllRoutes = {
31
30
  ///////////////////
32
31
  // Cloud functions
@@ -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,11 +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
- contact_id: string;
60
57
  match?: boolean;
61
58
  marketing?: boolean;
62
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.13",
3
+ "version": "1.1.15",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {