@cofondateurauchomage/libs 1.1.92 → 1.1.96
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 +5 -4
- package/build/api.validate.js +2 -0
- package/build/db.model.d.ts +2 -0
- package/package.json +1 -1
package/build/api.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { IContact, INewsletter, IProject, IProspect, IReactionStatus, IUser, TPl
|
|
|
2
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" | "active"> & IContact & {
|
|
5
|
+
createProject: Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId" | "active" | "referrer"> & 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" | "active"> & IContact & {
|
|
11
|
+
createUser: Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId" | "active" | "referrer"> & IContact & {
|
|
12
12
|
newsletterMarketing?: boolean;
|
|
13
13
|
emailProspect: string;
|
|
14
14
|
};
|
|
@@ -25,13 +25,14 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
|
|
|
25
25
|
updatePlan: {
|
|
26
26
|
apiSecretKey: string;
|
|
27
27
|
stripeId: string;
|
|
28
|
+
email: string;
|
|
28
29
|
plan: TPlan;
|
|
29
30
|
};
|
|
30
31
|
addStatsAssociation: {};
|
|
31
32
|
updateNewsletter: Omit<INewsletter, "new_profil_last_sent_date">;
|
|
32
|
-
createProspect: Pick<IProspect, "email">;
|
|
33
|
+
createProspect: Pick<IProspect, "email" | "referrer">;
|
|
33
34
|
getProspect: Pick<IProspect, "email">;
|
|
34
|
-
updateProspect: Omit<IProspect, "creationDate">;
|
|
35
|
+
updateProspect: Omit<IProspect, "creationDate" | "referrer">;
|
|
35
36
|
createReaction: {
|
|
36
37
|
toId: string;
|
|
37
38
|
status: IReactionStatus;
|
package/build/api.validate.js
CHANGED
|
@@ -127,6 +127,7 @@ const validatorsForAllRoutes = {
|
|
|
127
127
|
updatePlan: {
|
|
128
128
|
apiSecretKey,
|
|
129
129
|
stripeId,
|
|
130
|
+
email: (0, validate_1.isString)(),
|
|
130
131
|
plan,
|
|
131
132
|
},
|
|
132
133
|
addStatsAssociation: {},
|
|
@@ -139,6 +140,7 @@ const validatorsForAllRoutes = {
|
|
|
139
140
|
},
|
|
140
141
|
createProspect: {
|
|
141
142
|
email,
|
|
143
|
+
referrer: (0, validate_1.isString)().isOptional(),
|
|
142
144
|
},
|
|
143
145
|
getProspect: {
|
|
144
146
|
email,
|
package/build/db.model.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export interface IUser {
|
|
|
39
39
|
creationDate: number;
|
|
40
40
|
lastConnection: number;
|
|
41
41
|
stripeId?: string;
|
|
42
|
+
referrer?: string;
|
|
42
43
|
}
|
|
43
44
|
export interface IProject {
|
|
44
45
|
id: string;
|
|
@@ -65,6 +66,7 @@ export interface IProject {
|
|
|
65
66
|
redstart?: boolean;
|
|
66
67
|
level?: boolean;
|
|
67
68
|
talentsMana?: boolean;
|
|
69
|
+
referrer?: string;
|
|
68
70
|
}
|
|
69
71
|
export type TProjectStatus = "idea" | "creation" | "launch" | "growth";
|
|
70
72
|
export interface IContact {
|