@cofondateurauchomage/libs 1.1.73 → 1.1.77

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,14 +1,14 @@
1
1
  import { IContact, INewsletter, IProject, IProspect, IReactionStatus, IUser, TPlan, TVisibility } from "./db.model";
2
- export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "createUser" | "updateUser" | "deleteUser" | "updateVisibility" | "addStripeId" | "updatePlan" | "addStatsAssociation" | "updateNewsletter" | "createProspect" | "createReaction" | "deleteReaction";
2
+ export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "createUser" | "updateUser" | "deleteUser" | "updateVisibility" | "addStripeId" | "updatePlan" | "addStatsAssociation" | "updateNewsletter" | "createProspect" | "getProspect" | "updateProspect" | "createReaction" | "deleteReaction";
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" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & IContact & {
5
+ createProject: Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId" | "active"> & IContact & {
6
6
  newsletterMarketing?: boolean;
7
7
  emailProspect: string;
8
8
  };
9
9
  deleteProject: {};
10
10
  updateProject: Pick<IProject, "name" | "lastName" | "firstName" | "skills" | "zipCode" | "city" | "invest" | "status" | "status_detail" | "turnover" | "description" | "partner" | "logo"> & Omit<IContact, "email">;
11
- createUser: Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & IContact & {
11
+ createUser: Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId" | "active"> & IContact & {
12
12
  newsletterMarketing?: boolean;
13
13
  emailProspect: string;
14
14
  };
@@ -29,7 +29,9 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
29
29
  };
30
30
  addStatsAssociation: {};
31
31
  updateNewsletter: Omit<INewsletter, "new_profil_last_sent_date">;
32
- createProspect: IProspect;
32
+ createProspect: Pick<IProspect, "email">;
33
+ getProspect: Pick<IProspect, "email">;
34
+ updateProspect: IProspect;
33
35
  createReaction: {
34
36
  toId: string;
35
37
  status: IReactionStatus;
@@ -140,6 +140,33 @@ const validatorsForAllRoutes = {
140
140
  createProspect: {
141
141
  email,
142
142
  },
143
+ getProspect: {
144
+ email,
145
+ },
146
+ updateProspect: {
147
+ email: email.isOptional(),
148
+ tel: tel.isOptional(),
149
+ linkedin: linkedin.isOptional(),
150
+ website: website.isOptional(),
151
+ lastName: lastName.isOptional(),
152
+ firstName: firstName.isOptional(),
153
+ business: business.isOptional(),
154
+ city: city.isOptional(),
155
+ invest: invest.isOptional(),
156
+ joblessDate: (0, validate_1.isMatchRegex)(regex_1.RGX.Date.regex).isOptional(),
157
+ motivations: motivations.isOptional(),
158
+ partner: partner.isOptional(),
159
+ skills: skills.isOptional(),
160
+ zipCode: zipCode.isOptional(),
161
+ name: name.isOptional(),
162
+ status: status.isOptional(),
163
+ status_detail: status_detail.isOptional(),
164
+ turnover: turnover.isOptional(),
165
+ description: description.isOptional(),
166
+ redstart: (0, validate_1.isBoolean)().isOptional(),
167
+ level: (0, validate_1.isBoolean)().isOptional(),
168
+ talentsMana: (0, validate_1.isBoolean)().isOptional(),
169
+ },
143
170
  createReaction: {
144
171
  toId: (0, validate_1.isString)(),
145
172
  status: reactionStatus,
@@ -33,6 +33,7 @@ export interface IUser {
33
33
  business: string;
34
34
  photo?: string;
35
35
  plan: TPlan;
36
+ active?: boolean;
36
37
  visibility: TVisibility;
37
38
  clicks: IClicks;
38
39
  creationDate: number;
@@ -55,6 +56,7 @@ export interface IProject {
55
56
  partner: string;
56
57
  logo?: string;
57
58
  plan: TPlan;
59
+ active?: boolean;
58
60
  visibility: TVisibility;
59
61
  clicks: IClicks;
60
62
  creationDate: number;
@@ -92,9 +94,7 @@ export interface INotification {
92
94
  body?: string;
93
95
  link?: string;
94
96
  }
95
- export interface IProspect {
96
- email: string;
97
- }
97
+ export type IProspect = Partial<Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId" | "active" | "photo">> & Partial<Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId" | "active" | "logo">> & Partial<IContact>;
98
98
  export type IReactionStatus = "like" | "dislike";
99
99
  export interface IReaction {
100
100
  fromUserId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.1.73",
3
+ "version": "1.1.77",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {