@cofondateurauchomage/libs 1.1.72 → 1.1.73
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 +6 -9
- package/build/api.validate.js +2 -5
- package/build/db.model.d.ts +3 -2
- package/package.json +1 -1
package/build/api.d.ts
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import { IContact, INewsletter, IProject, IProspect, IReactionStatus, IUser, TPlan } from "./db.model";
|
|
2
|
-
export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "
|
|
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";
|
|
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" | "
|
|
5
|
+
createProject: Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & 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
|
-
|
|
12
|
-
active: boolean;
|
|
13
|
-
};
|
|
14
|
-
createUser: Omit<IUser, "id" | "plan" | "active" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & IContact & {
|
|
11
|
+
createUser: Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & IContact & {
|
|
15
12
|
newsletterMarketing?: boolean;
|
|
16
13
|
emailProspect: string;
|
|
17
14
|
};
|
|
18
15
|
deleteUser: {};
|
|
19
16
|
updateUser: Pick<IUser, "lastName" | "firstName" | "skills" | "zipCode" | "city" | "invest" | "motivations" | "partner" | "business" | "photo"> & Omit<IContact, "email">;
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
updateVisibility: {
|
|
18
|
+
visibility: TVisibility;
|
|
22
19
|
};
|
|
23
20
|
addStripeId: {
|
|
24
21
|
apiSecretKey: string;
|
package/build/api.validate.js
CHANGED
|
@@ -81,9 +81,6 @@ const validatorsForAllRoutes = {
|
|
|
81
81
|
partner,
|
|
82
82
|
logo,
|
|
83
83
|
},
|
|
84
|
-
activeProject: {
|
|
85
|
-
active: (0, validate_1.isBoolean)(),
|
|
86
|
-
},
|
|
87
84
|
createUser: {
|
|
88
85
|
email,
|
|
89
86
|
emailProspect: email,
|
|
@@ -119,8 +116,8 @@ const validatorsForAllRoutes = {
|
|
|
119
116
|
firstName,
|
|
120
117
|
lastName,
|
|
121
118
|
},
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
updateVisibility: {
|
|
120
|
+
visibility: (0, validate_1.isMatchEnum)(["public", "limited", "private"]),
|
|
124
121
|
},
|
|
125
122
|
addStripeId: {
|
|
126
123
|
apiSecretKey,
|
package/build/db.model.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare enum Collections {
|
|
|
11
11
|
}
|
|
12
12
|
export type TSkill = "Business" | "Design" | "Marketing" | "Produit" | "Tech";
|
|
13
13
|
export type TPlan = "free" | "pro" | "premium";
|
|
14
|
+
export type TVisibility = "public" | "limited" | "private";
|
|
14
15
|
export interface IClicks {
|
|
15
16
|
linkedin: number;
|
|
16
17
|
email: number;
|
|
@@ -32,7 +33,7 @@ export interface IUser {
|
|
|
32
33
|
business: string;
|
|
33
34
|
photo?: string;
|
|
34
35
|
plan: TPlan;
|
|
35
|
-
|
|
36
|
+
visibility: TVisibility;
|
|
36
37
|
clicks: IClicks;
|
|
37
38
|
creationDate: number;
|
|
38
39
|
lastConnection: number;
|
|
@@ -54,7 +55,7 @@ export interface IProject {
|
|
|
54
55
|
partner: string;
|
|
55
56
|
logo?: string;
|
|
56
57
|
plan: TPlan;
|
|
57
|
-
|
|
58
|
+
visibility: TVisibility;
|
|
58
59
|
clicks: IClicks;
|
|
59
60
|
creationDate: number;
|
|
60
61
|
lastConnection: number;
|