@cofondateurauchomage/libs 1.1.31 → 1.1.33
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 +8 -3
- package/build/api.validate.js +8 -1
- package/build/const.d.ts +2 -1
- package/build/const.js +2 -1
- package/package.json +1 -1
package/build/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IContact, INewsletter, IProject, IUser } from "./db.model";
|
|
2
|
-
export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "activeProject" | "createUser" | "updateUser" | "deleteUser" | "activeUser" | "addStripeId" | "addStatsAssociation" | "updateNewsletter";
|
|
1
|
+
import { IContact, INewsletter, IProject, IUser, TPlan } from "./db.model";
|
|
2
|
+
export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "activeProject" | "createUser" | "updateUser" | "deleteUser" | "activeUser" | "addStripeId" | "updatePlan" | "addStatsAssociation" | "updateNewsletter";
|
|
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" | "active" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & IContact & {
|
|
@@ -9,7 +9,6 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
|
|
|
9
9
|
deleteProject: {};
|
|
10
10
|
updateProject: Pick<IProject, "city" | "description" | "invest" | "name" | "partner" | "skills" | "zipCode" | "status" | "status_detail" | "logo"> & Omit<IContact, "email">;
|
|
11
11
|
activeProject: {
|
|
12
|
-
stripeId: string;
|
|
13
12
|
active: boolean;
|
|
14
13
|
};
|
|
15
14
|
createUser: Omit<IUser, "id" | "plan" | "active" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & IContact & {
|
|
@@ -22,9 +21,15 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
|
|
|
22
21
|
active: boolean;
|
|
23
22
|
};
|
|
24
23
|
addStripeId: {
|
|
24
|
+
apiSecretKey: string;
|
|
25
25
|
email: string;
|
|
26
26
|
stripeId: string;
|
|
27
27
|
};
|
|
28
|
+
updatePlan: {
|
|
29
|
+
apiSecretKey: string;
|
|
30
|
+
stripeId: string;
|
|
31
|
+
plan: TPlan;
|
|
32
|
+
};
|
|
28
33
|
addStatsAssociation: {};
|
|
29
34
|
updateNewsletter: INewsletter;
|
|
30
35
|
checkout_session: {
|
package/build/api.validate.js
CHANGED
|
@@ -30,6 +30,8 @@ const status = (0, validate_1.isMatchEnum)(const_1.PROJECT_STATUS).isOptional();
|
|
|
30
30
|
const status_detail = (0, validate_1.isString)().setMax(300).isOptional();
|
|
31
31
|
const photo = (0, validate_1.isString)().isOptional();
|
|
32
32
|
const logo = (0, validate_1.isString)().isOptional();
|
|
33
|
+
const plan = (0, validate_1.isMatchEnum)(["free", "pro", "premium"]);
|
|
34
|
+
const apiSecretKey = (0, validate_1.isString)();
|
|
33
35
|
const validatorsForAllRoutes = {
|
|
34
36
|
///////////////////
|
|
35
37
|
// Cloud functions
|
|
@@ -69,7 +71,6 @@ const validatorsForAllRoutes = {
|
|
|
69
71
|
},
|
|
70
72
|
activeProject: {
|
|
71
73
|
active: (0, validate_1.isBoolean)(),
|
|
72
|
-
stripeId,
|
|
73
74
|
},
|
|
74
75
|
createUser: {
|
|
75
76
|
business,
|
|
@@ -104,9 +105,15 @@ const validatorsForAllRoutes = {
|
|
|
104
105
|
active: (0, validate_1.isBoolean)(),
|
|
105
106
|
},
|
|
106
107
|
addStripeId: {
|
|
108
|
+
apiSecretKey,
|
|
107
109
|
email,
|
|
108
110
|
stripeId,
|
|
109
111
|
},
|
|
112
|
+
updatePlan: {
|
|
113
|
+
apiSecretKey,
|
|
114
|
+
stripeId,
|
|
115
|
+
plan,
|
|
116
|
+
},
|
|
110
117
|
addStatsAssociation: {},
|
|
111
118
|
updateNewsletter: {
|
|
112
119
|
match: (0, validate_1.isBoolean)().isOptional(),
|
package/build/const.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { TProjectStatus, TSkill } from "./db.model";
|
|
1
|
+
import { TPlan, TProjectStatus, TSkill } from "./db.model";
|
|
2
2
|
export declare const EMAIL = "contact@cofondateurauchomage.fr";
|
|
3
3
|
export declare const SKILLS: TSkill[];
|
|
4
4
|
export declare const PROJECT_STATUS: TProjectStatus[];
|
|
5
|
+
export declare const PLANS: TPlan[];
|
package/build/const.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PROJECT_STATUS = exports.SKILLS = exports.EMAIL = void 0;
|
|
3
|
+
exports.PLANS = exports.PROJECT_STATUS = exports.SKILLS = exports.EMAIL = void 0;
|
|
4
4
|
exports.EMAIL = "contact@cofondateurauchomage.fr";
|
|
5
5
|
exports.SKILLS = [
|
|
6
6
|
"Business",
|
|
@@ -15,3 +15,4 @@ exports.PROJECT_STATUS = [
|
|
|
15
15
|
"launch",
|
|
16
16
|
"growth",
|
|
17
17
|
];
|
|
18
|
+
exports.PLANS = ["free", "pro"];
|