@cofondateurauchomage/libs 1.1.74 → 1.1.78

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,5 +1,5 @@
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
5
  createProject: Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId" | "active"> & IContact & {
@@ -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,
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,
@@ -94,9 +94,9 @@ export interface INotification {
94
94
  body?: string;
95
95
  link?: string;
96
96
  }
97
- export interface IProspect {
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
  email: string;
99
- }
99
+ };
100
100
  export type IReactionStatus = "like" | "dislike";
101
101
  export interface IReaction {
102
102
  fromUserId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.1.74",
3
+ "version": "1.1.78",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {