@cofondateurauchomage/libs 1.1.32 → 1.1.34

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
@@ -21,10 +21,12 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
21
21
  active: boolean;
22
22
  };
23
23
  addStripeId: {
24
+ apiSecretKey: string;
24
25
  email: string;
25
26
  stripeId: string;
26
27
  };
27
28
  updatePlan: {
29
+ apiSecretKey: string;
28
30
  stripeId: string;
29
31
  plan: TPlan;
30
32
  };
@@ -33,6 +35,7 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
33
35
  checkout_session: {
34
36
  stripeId?: string;
35
37
  email: string;
38
+ type: "user" | "project";
36
39
  };
37
40
  delete_customer: {
38
41
  stripeId: string;
@@ -31,6 +31,7 @@ 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
33
  const plan = (0, validate_1.isMatchEnum)(["free", "pro", "premium"]);
34
+ const apiSecretKey = (0, validate_1.isString)();
34
35
  const validatorsForAllRoutes = {
35
36
  ///////////////////
36
37
  // Cloud functions
@@ -104,10 +105,12 @@ const validatorsForAllRoutes = {
104
105
  active: (0, validate_1.isBoolean)(),
105
106
  },
106
107
  addStripeId: {
108
+ apiSecretKey,
107
109
  email,
108
110
  stripeId,
109
111
  },
110
112
  updatePlan: {
113
+ apiSecretKey,
111
114
  stripeId,
112
115
  plan,
113
116
  },
@@ -121,6 +124,7 @@ const validatorsForAllRoutes = {
121
124
  checkout_session: {
122
125
  stripeId: stripeId.isOptional(),
123
126
  email,
127
+ type: (0, validate_1.isMatchEnum)(["user", "project"]),
124
128
  },
125
129
  delete_customer: {
126
130
  stripeId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.1.32",
3
+ "version": "1.1.34",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {