@cofondateurauchomage/libs 1.1.121 → 1.1.123
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 +7 -3
- package/build/api.validate.js +9 -4
- package/package.json +1 -1
package/build/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IBlogHtmlArticle, IContact, INewsletter, IProject, IProspect, IReactionStatus, IUser, TPlan, TPlanOption, TVisibility } from "./db.model";
|
|
2
|
-
export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "createUser" | "updateUser" | "deleteUser" | "updateVisibility" | "addStripeId" | "updatePlan" | "addStatsAssociation" | "updateNewsletter" | "createProspect" | "getProspect" | "updateProspect" | "createReaction" | "deleteReaction" | "createBlogHtmlArticle";
|
|
2
|
+
export type CloudFunctionNames = "createProject" | "updateProject" | "getProfileCompletionRate" | "deleteProject" | "createUser" | "updateUser" | "deleteUser" | "updateVisibility" | "addStripeId" | "updatePlan" | "addStatsAssociation" | "updateNewsletter" | "createProspect" | "getProspect" | "updateProspect" | "createReaction" | "deleteReaction" | "createBlogHtmlArticle";
|
|
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" | "stripeId" | "referrer" | "postedOnLinkedInAt"> & IContact & {
|
|
@@ -7,13 +7,14 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
|
|
|
7
7
|
emailProspect: string;
|
|
8
8
|
};
|
|
9
9
|
deleteProject: {};
|
|
10
|
-
updateProject: Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer" | "postedOnLinkedInAt" | "partner_swanbase" | "partner_iii"> & Omit<IContact, "email"
|
|
10
|
+
updateProject: Partial<Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer" | "postedOnLinkedInAt" | "partner_swanbase" | "partner_iii"> & Omit<IContact, "email">>;
|
|
11
|
+
getProfileCompletionRate: {};
|
|
11
12
|
createUser: Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer"> & IContact & {
|
|
12
13
|
newsletterMarketing?: boolean;
|
|
13
14
|
emailProspect: string;
|
|
14
15
|
};
|
|
15
16
|
deleteUser: {};
|
|
16
|
-
updateUser: Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer"> & Omit<IContact, "email"
|
|
17
|
+
updateUser: Partial<Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer"> & Omit<IContact, "email">>;
|
|
17
18
|
updateVisibility: {
|
|
18
19
|
visibility: TVisibility;
|
|
19
20
|
};
|
|
@@ -73,6 +74,9 @@ export type ResponseForO<O extends CloudFunctionNames | RouteNames> = {
|
|
|
73
74
|
createProject: WriteResult;
|
|
74
75
|
deleteProject: WriteResult;
|
|
75
76
|
updateProject: WriteResult;
|
|
77
|
+
getProfileCompletionRate: {
|
|
78
|
+
completionRate: number;
|
|
79
|
+
};
|
|
76
80
|
createUser: WriteResult;
|
|
77
81
|
deleteUser: WriteResult;
|
|
78
82
|
updateUser: WriteResult;
|
package/build/api.validate.js
CHANGED
|
@@ -88,19 +88,24 @@ const schemasForAllRoutes = {
|
|
|
88
88
|
...contactCreate,
|
|
89
89
|
}),
|
|
90
90
|
deleteProject: zod_1.z.object({}),
|
|
91
|
-
updateProject: zod_1.z
|
|
91
|
+
updateProject: zod_1.z
|
|
92
|
+
.object({
|
|
92
93
|
...projectBody,
|
|
93
94
|
...contactUpdate,
|
|
94
|
-
})
|
|
95
|
+
})
|
|
96
|
+
.partial(),
|
|
97
|
+
getProfileCompletionRate: zod_1.z.object({}),
|
|
95
98
|
createUser: zod_1.z.object({
|
|
96
99
|
...userBody,
|
|
97
100
|
...contactCreate,
|
|
98
101
|
}),
|
|
99
102
|
deleteUser: zod_1.z.object({}),
|
|
100
|
-
updateUser: zod_1.z
|
|
103
|
+
updateUser: zod_1.z
|
|
104
|
+
.object({
|
|
101
105
|
...userBody,
|
|
102
106
|
...contactUpdate,
|
|
103
|
-
})
|
|
107
|
+
})
|
|
108
|
+
.partial(),
|
|
104
109
|
updateVisibility: zod_1.z.object({
|
|
105
110
|
visibility: zVisibility,
|
|
106
111
|
}),
|