@cofondateurauchomage/libs 1.1.52 → 1.1.54

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
@@ -3,7 +3,6 @@ export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProj
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 & {
6
- newsletterMatch?: boolean;
7
6
  newsletterMarketing?: boolean;
8
7
  } & {
9
8
  emailProspect: string;
@@ -14,7 +13,6 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
14
13
  active: boolean;
15
14
  };
16
15
  createUser: Omit<IUser, "id" | "plan" | "active" | "clicks" | "creationDate" | "lastConnection" | "likes" | "stripeId"> & IContact & {
17
- newsletterMatch?: boolean;
18
16
  newsletterMarketing?: boolean;
19
17
  } & {
20
18
  emailProspect: string;
@@ -25,7 +25,6 @@ const skills = new validate_1.Validator((value) => !!(value &&
25
25
  value.every((skill) => const_1.SKILLS.includes(skill))));
26
26
  const stripeId = (0, validate_1.isString)().setMin(4).setMax(50);
27
27
  const zipCode = (0, validate_1.isNumber)().setMin(1000).setMax(97680);
28
- const newsletterMatch = (0, validate_1.isBoolean)().isOptional();
29
28
  const newsletterMarketing = (0, validate_1.isBoolean)().isOptional();
30
29
  const status = (0, validate_1.isMatchEnum)(const_1.PROJECT_STATUS).isOptional();
31
30
  const status_detail = (0, validate_1.isString)().setMax(300).isOptional();
@@ -57,7 +56,6 @@ const validatorsForAllRoutes = {
57
56
  partner,
58
57
  redstart: (0, validate_1.isBoolean)().isOptional(),
59
58
  level: (0, validate_1.isBoolean)().isOptional(),
60
- newsletterMatch,
61
59
  newsletterMarketing,
62
60
  logo,
63
61
  },
@@ -96,7 +94,6 @@ const validatorsForAllRoutes = {
96
94
  partner,
97
95
  skills,
98
96
  zipCode,
99
- newsletterMatch,
100
97
  newsletterMarketing,
101
98
  photo,
102
99
  },
@@ -6,3 +6,5 @@ export declare function pickObject<T extends object, K extends keyof T>(obj: T,
6
6
  * Omit certaines clés d'un objet
7
7
  */
8
8
  export declare function omitObject<T extends object, K extends keyof T>(obj: T, ...keys: K[]): Omit<T, K>;
9
+ export declare function typedKeys<T extends object>(obj: T): Array<keyof T>;
10
+ export declare function typedObjectEntries<T extends object>(obj: T): Array<[keyof T, T[keyof T]]>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.omitObject = exports.pickObject = void 0;
3
+ exports.typedObjectEntries = exports.typedKeys = exports.omitObject = exports.pickObject = void 0;
4
4
  /**
5
5
  * Pick certaines clés d'un objet
6
6
  */
@@ -20,3 +20,11 @@ function omitObject(obj, ...keys) {
20
20
  }, {});
21
21
  }
22
22
  exports.omitObject = omitObject;
23
+ function typedKeys(obj) {
24
+ return Object.keys(obj);
25
+ }
26
+ exports.typedKeys = typedKeys;
27
+ function typedObjectEntries(obj) {
28
+ return Object.entries(obj);
29
+ }
30
+ exports.typedObjectEntries = typedObjectEntries;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.1.52",
3
+ "version": "1.1.54",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {