@cofondateurauchomage/libs 1.1.117 → 1.1.119

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
@@ -44,10 +44,15 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
44
44
  apiSecretKey: string;
45
45
  };
46
46
  checkout_session: {
47
- stripeId?: string;
48
- email: string;
49
- type: "user" | "project";
47
+ customer: {
48
+ email: string;
49
+ stripeId?: string;
50
+ type: "user" | "project";
51
+ creationDate: number;
52
+ referrer: string | null;
53
+ };
50
54
  planOption: TPlanOption;
55
+ checkoutOrigin: string | null;
51
56
  };
52
57
  delete_customer: {
53
58
  stripeId: string;
@@ -174,10 +174,15 @@ const schemasForAllRoutes = {
174
174
  toc: zod_1.z.string().optional(),
175
175
  }),
176
176
  checkout_session: zod_1.z.object({
177
- stripeId: zStrMax50.optional(),
178
- email: zod_1.z.string(),
179
- type: zod_1.z.enum(["user", "project"]),
177
+ customer: zod_1.z.object({
178
+ email: zod_1.z.string(),
179
+ stripeId: zStrMax50.optional(),
180
+ type: zod_1.z.enum(["user", "project"]),
181
+ creationDate: zod_1.z.number(),
182
+ referrer: zod_1.z.string().nullable(),
183
+ }),
180
184
  planOption: zod_1.z.enum(const_1.PLAN_OPTIONS),
185
+ checkoutOrigin: zod_1.z.string().nullable(),
181
186
  }),
182
187
  delete_customer: zod_1.z.object({
183
188
  stripeId: zStrMax50,
package/build/regex.js CHANGED
@@ -5,7 +5,7 @@ const regex = {
5
5
  date: /^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))$/,
6
6
  email: /^[\w.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/,
7
7
  linkedin: /^(http(s)?:\/\/)?([\w]+\.)?linkedin\.com\/(pub|in|profile)\/.+$/,
8
- name: /^[A-Za-zÜ-ü\s\-]{1,50}$/,
8
+ name: /^(?=.*[A-Za-zÜ-ü])[A-Za-zÜ-ü\s\-]{1,50}$/,
9
9
  tel: /^([+][1-9]{2,3}[ .\-]?)?[0-9]{1,3}([ .\-]?[0-9]{2,3}){3,6}$/,
10
10
  };
11
11
  const pattern = (regex) => String(regex).replace("/^", "").replace("$/", "");
@@ -11,10 +11,10 @@ function capitalize(str) {
11
11
  return str
12
12
  .toLowerCase()
13
13
  .split(" ")
14
- .map((w) => w && w[0].toUpperCase() + w.slice(1))
14
+ .map((w) => w && w.at(0)?.toUpperCase() + w.slice(1))
15
15
  .join(" ")
16
16
  .split("-")
17
- .map((w) => w && w[0].toUpperCase() + w.slice(1))
17
+ .map((w) => w && w.at(0)?.toUpperCase() + w.slice(1))
18
18
  .join("-")
19
19
  .replace(" ", " ");
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.1.117",
3
+ "version": "1.1.119",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {