@cofondateurauchomage/libs 1.1.50 → 1.1.52
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.validate.js
CHANGED
|
@@ -131,6 +131,9 @@ const validatorsForAllRoutes = {
|
|
|
131
131
|
updateNewsletter: {
|
|
132
132
|
match: (0, validate_1.isBoolean)().isOptional(),
|
|
133
133
|
marketing: (0, validate_1.isBoolean)().isOptional(),
|
|
134
|
+
notification: (0, validate_1.isBoolean)().isOptional(),
|
|
135
|
+
feature: (0, validate_1.isBoolean)().isOptional(),
|
|
136
|
+
new_profil: (0, validate_1.isBoolean)().isOptional(),
|
|
134
137
|
},
|
|
135
138
|
createProspect: {
|
|
136
139
|
email,
|
package/build/db.model.d.ts
CHANGED
|
@@ -68,8 +68,11 @@ export interface IContact {
|
|
|
68
68
|
website?: string;
|
|
69
69
|
}
|
|
70
70
|
export interface INewsletter {
|
|
71
|
-
match?: boolean;
|
|
72
71
|
marketing?: boolean;
|
|
72
|
+
notification?: boolean;
|
|
73
|
+
feature?: boolean;
|
|
74
|
+
match?: boolean;
|
|
75
|
+
new_profil?: boolean;
|
|
73
76
|
}
|
|
74
77
|
export interface IStatsAssociation {
|
|
75
78
|
liste: string[];
|
|
@@ -6,3 +6,7 @@ export declare function includes<T extends string>(array: T[], value: string): v
|
|
|
6
6
|
* Retourne un array sans valeurs null ou undefined
|
|
7
7
|
*/
|
|
8
8
|
export declare const compact: <T>(array: (T | null | undefined)[]) => T[];
|
|
9
|
+
/**
|
|
10
|
+
* Divise un tableau en lots de taille maximale
|
|
11
|
+
*/
|
|
12
|
+
export declare function chunkArray<T>(array: T[], size: number): T[][];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compact = exports.includes = void 0;
|
|
3
|
+
exports.chunkArray = exports.compact = exports.includes = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Includes typé
|
|
6
6
|
*/
|
|
@@ -13,3 +13,14 @@ exports.includes = includes;
|
|
|
13
13
|
*/
|
|
14
14
|
const compact = (array) => array.filter(Boolean);
|
|
15
15
|
exports.compact = compact;
|
|
16
|
+
/**
|
|
17
|
+
* Divise un tableau en lots de taille maximale
|
|
18
|
+
*/
|
|
19
|
+
function chunkArray(array, size) {
|
|
20
|
+
const result = [];
|
|
21
|
+
for (let i = 0; i < array.length; i += size) {
|
|
22
|
+
result.push(array.slice(i, i + size));
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
exports.chunkArray = chunkArray;
|