@likewatt/models 1.102.0 → 1.103.0
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/dist/core/Consent.d.ts +18 -6
- package/dist/core/Consent.js +111 -6
- package/dist/core/Site.d.ts +1 -0
- package/dist/core/Site.js +9 -0
- package/dist/core/User.d.ts +1 -0
- package/dist/core/User.js +10 -0
- package/package.json +1 -1
package/dist/core/Consent.d.ts
CHANGED
|
@@ -8,20 +8,32 @@ import { Document } from 'mongoose';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class Consent {
|
|
10
10
|
readonly _id: string;
|
|
11
|
-
companyName
|
|
11
|
+
companyName?: string;
|
|
12
12
|
contractConsent: boolean;
|
|
13
13
|
courbeConsent: boolean;
|
|
14
14
|
userId: string;
|
|
15
15
|
workspaceId?: string;
|
|
16
|
-
date?: Date;
|
|
17
|
-
email
|
|
18
|
-
enedisNumber
|
|
19
|
-
firstname
|
|
16
|
+
date?: Date | string;
|
|
17
|
+
email?: string;
|
|
18
|
+
enedisNumber?: string;
|
|
19
|
+
firstname?: string;
|
|
20
20
|
indexConsent: boolean;
|
|
21
|
-
lastname
|
|
21
|
+
lastname?: string;
|
|
22
22
|
logo?: string;
|
|
23
23
|
mesureConsent: boolean;
|
|
24
24
|
siteId: string;
|
|
25
|
+
pdls?: string[];
|
|
26
|
+
collectiveSiteId?: string;
|
|
27
|
+
fileKey?: string;
|
|
28
|
+
via?: 'email' | 'upload';
|
|
29
|
+
isValidateConsent?: boolean;
|
|
30
|
+
dateConsentCheck?: Date;
|
|
31
|
+
pdlNotCovered?: boolean;
|
|
32
|
+
identityMismatch?: boolean;
|
|
33
|
+
forged?: boolean;
|
|
34
|
+
flagReason?: string;
|
|
35
|
+
prmConsent?: boolean;
|
|
36
|
+
likewattlogo?: string;
|
|
25
37
|
}
|
|
26
38
|
export type ConsentDocument = Consent & Document;
|
|
27
39
|
export declare const ConsentSchema: import("mongoose").Schema<Consent, import("mongoose").Model<Consent, any, any, any, Document<unknown, any, Consent, any, {}> & Consent & Required<{
|
package/dist/core/Consent.js
CHANGED
|
@@ -39,7 +39,8 @@ __decorate([
|
|
|
39
39
|
description: 'Nom de l’entreprise',
|
|
40
40
|
example: 'Example Company',
|
|
41
41
|
}),
|
|
42
|
-
(0, mongoose_1.Prop)({ type: String, required:
|
|
42
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
44
|
(0, class_validator_1.IsString)(),
|
|
44
45
|
__metadata("design:type", String)
|
|
45
46
|
], Consent.prototype, "companyName", void 0);
|
|
@@ -88,14 +89,15 @@ __decorate([
|
|
|
88
89
|
}),
|
|
89
90
|
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
90
91
|
(0, class_validator_1.IsOptional)(),
|
|
91
|
-
__metadata("design:type",
|
|
92
|
+
__metadata("design:type", Object)
|
|
92
93
|
], Consent.prototype, "date", void 0);
|
|
93
94
|
__decorate([
|
|
94
95
|
(0, swagger_1.ApiProperty)({
|
|
95
96
|
description: 'Adresse e-mail de l’utilisateur',
|
|
96
97
|
example: 'user@example.com',
|
|
97
98
|
}),
|
|
98
|
-
(0, mongoose_1.Prop)({ type: String, required:
|
|
99
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
99
101
|
(0, class_validator_1.IsString)(),
|
|
100
102
|
__metadata("design:type", String)
|
|
101
103
|
], Consent.prototype, "email", void 0);
|
|
@@ -104,7 +106,8 @@ __decorate([
|
|
|
104
106
|
description: 'Buffer Enedis',
|
|
105
107
|
example: 'https://example.com/logo.png',
|
|
106
108
|
}),
|
|
107
|
-
(0, mongoose_1.Prop)({ type: String, required:
|
|
109
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
110
|
+
(0, class_validator_1.IsOptional)(),
|
|
108
111
|
(0, class_validator_1.IsString)(),
|
|
109
112
|
__metadata("design:type", String)
|
|
110
113
|
], Consent.prototype, "enedisNumber", void 0);
|
|
@@ -113,7 +116,8 @@ __decorate([
|
|
|
113
116
|
description: 'Prénom de l’utilisateur',
|
|
114
117
|
example: 'https://example.com/logo.png',
|
|
115
118
|
}),
|
|
116
|
-
(0, mongoose_1.Prop)({ type: String, required:
|
|
119
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
120
|
+
(0, class_validator_1.IsOptional)(),
|
|
117
121
|
(0, class_validator_1.IsString)(),
|
|
118
122
|
__metadata("design:type", String)
|
|
119
123
|
], Consent.prototype, "firstname", void 0);
|
|
@@ -132,7 +136,8 @@ __decorate([
|
|
|
132
136
|
description: 'Nom de l’utilisateur',
|
|
133
137
|
example: 'https://example.com/logo.png',
|
|
134
138
|
}),
|
|
135
|
-
(0, mongoose_1.Prop)({ type: String, required:
|
|
139
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
140
|
+
(0, class_validator_1.IsOptional)(),
|
|
136
141
|
(0, class_validator_1.IsString)(),
|
|
137
142
|
__metadata("design:type", String)
|
|
138
143
|
], Consent.prototype, "lastname", void 0);
|
|
@@ -165,6 +170,106 @@ __decorate([
|
|
|
165
170
|
(0, class_validator_1.IsString)(),
|
|
166
171
|
__metadata("design:type", String)
|
|
167
172
|
], Consent.prototype, "siteId", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
175
|
+
description: 'PDL couverts par le document (ACI: 1, ACC: N)',
|
|
176
|
+
type: [String],
|
|
177
|
+
}),
|
|
178
|
+
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
179
|
+
(0, class_validator_1.IsOptional)(),
|
|
180
|
+
(0, class_validator_1.IsArray)(),
|
|
181
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
182
|
+
__metadata("design:type", Array)
|
|
183
|
+
], Consent.prototype, "pdls", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Projet collectif couvert (cas ACC)' }),
|
|
186
|
+
(0, mongoose_1.Prop)({ type: String, ref: 'CollectiveSite', required: false }),
|
|
187
|
+
(0, class_validator_1.IsOptional)(),
|
|
188
|
+
(0, class_validator_1.IsString)(),
|
|
189
|
+
__metadata("design:type", String)
|
|
190
|
+
], Consent.prototype, "collectiveSiteId", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
193
|
+
description: 'Clé du fichier de consentement (voie upload)',
|
|
194
|
+
}),
|
|
195
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
196
|
+
(0, class_validator_1.IsOptional)(),
|
|
197
|
+
(0, class_validator_1.IsString)(),
|
|
198
|
+
__metadata("design:type", String)
|
|
199
|
+
], Consent.prototype, "fileKey", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
202
|
+
description: "Voie d'obtention du consentement",
|
|
203
|
+
enum: ['email', 'upload'],
|
|
204
|
+
}),
|
|
205
|
+
(0, mongoose_1.Prop)({ type: String, enum: ['email', 'upload'], required: false }),
|
|
206
|
+
(0, class_validator_1.IsOptional)(),
|
|
207
|
+
(0, class_validator_1.IsString)(),
|
|
208
|
+
__metadata("design:type", String)
|
|
209
|
+
], Consent.prototype, "via", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
212
|
+
description: 'Statut de validation du consentement (révisable en admin)',
|
|
213
|
+
}),
|
|
214
|
+
(0, mongoose_1.Prop)({ type: Boolean, required: false }),
|
|
215
|
+
(0, class_validator_1.IsOptional)(),
|
|
216
|
+
(0, class_validator_1.IsBoolean)(),
|
|
217
|
+
__metadata("design:type", Boolean)
|
|
218
|
+
], Consent.prototype, "isValidateConsent", void 0);
|
|
219
|
+
__decorate([
|
|
220
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Date du contrôle OCR/IA' }),
|
|
221
|
+
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
222
|
+
(0, class_validator_1.IsOptional)(),
|
|
223
|
+
__metadata("design:type", Date)
|
|
224
|
+
], Consent.prototype, "dateConsentCheck", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
227
|
+
description: 'Signal : PDL du site absent du document',
|
|
228
|
+
}),
|
|
229
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
230
|
+
(0, class_validator_1.IsOptional)(),
|
|
231
|
+
(0, class_validator_1.IsBoolean)(),
|
|
232
|
+
__metadata("design:type", Boolean)
|
|
233
|
+
], Consent.prototype, "pdlNotCovered", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
236
|
+
description: 'Signal : même PDL déjà consenti dans le groupe avec une identité différente',
|
|
237
|
+
}),
|
|
238
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
239
|
+
(0, class_validator_1.IsOptional)(),
|
|
240
|
+
(0, class_validator_1.IsBoolean)(),
|
|
241
|
+
__metadata("design:type", Boolean)
|
|
242
|
+
], Consent.prototype, "identityMismatch", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
245
|
+
description: 'Signal : document suspecté falsifié (réservé v2)',
|
|
246
|
+
}),
|
|
247
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
248
|
+
(0, class_validator_1.IsOptional)(),
|
|
249
|
+
(0, class_validator_1.IsBoolean)(),
|
|
250
|
+
__metadata("design:type", Boolean)
|
|
251
|
+
], Consent.prototype, "forged", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Motif lisible du flag (suivi admin)' }),
|
|
254
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
255
|
+
(0, class_validator_1.IsOptional)(),
|
|
256
|
+
(0, class_validator_1.IsString)(),
|
|
257
|
+
__metadata("design:type", String)
|
|
258
|
+
], Consent.prototype, "flagReason", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Consentement PRM (legacy)' }),
|
|
261
|
+
(0, mongoose_1.Prop)({ type: Boolean, required: false }),
|
|
262
|
+
(0, class_validator_1.IsOptional)(),
|
|
263
|
+
(0, class_validator_1.IsBoolean)(),
|
|
264
|
+
__metadata("design:type", Boolean)
|
|
265
|
+
], Consent.prototype, "prmConsent", void 0);
|
|
266
|
+
__decorate([
|
|
267
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Logo Likewatt (legacy)' }),
|
|
268
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
269
|
+
(0, class_validator_1.IsOptional)(),
|
|
270
|
+
(0, class_validator_1.IsString)(),
|
|
271
|
+
__metadata("design:type", String)
|
|
272
|
+
], Consent.prototype, "likewattlogo", void 0);
|
|
168
273
|
exports.Consent = Consent = __decorate([
|
|
169
274
|
(0, mongoose_1.Schema)({
|
|
170
275
|
id: false,
|
package/dist/core/Site.d.ts
CHANGED
package/dist/core/Site.js
CHANGED
|
@@ -399,6 +399,15 @@ __decorate([
|
|
|
399
399
|
(0, class_validator_1.IsString)(),
|
|
400
400
|
__metadata("design:type", String)
|
|
401
401
|
], Site.prototype, "consentFileUrl", void 0);
|
|
402
|
+
__decorate([
|
|
403
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
404
|
+
description: 'Consent couvrant ce site (registre doc-centric)',
|
|
405
|
+
}),
|
|
406
|
+
(0, mongoose_1.Prop)({ type: String, ref: 'Consent', required: false }),
|
|
407
|
+
(0, class_validator_1.IsOptional)(),
|
|
408
|
+
(0, class_validator_1.IsString)(),
|
|
409
|
+
__metadata("design:type", String)
|
|
410
|
+
], Site.prototype, "consentId", void 0);
|
|
402
411
|
__decorate([
|
|
403
412
|
(0, swagger_1.ApiPropertyOptional)(),
|
|
404
413
|
(0, mongoose_1.Prop)({ type: Boolean, required: false }),
|
package/dist/core/User.d.ts
CHANGED
package/dist/core/User.js
CHANGED
|
@@ -378,6 +378,16 @@ __decorate([
|
|
|
378
378
|
(0, class_validator_1.IsBoolean)(),
|
|
379
379
|
__metadata("design:type", Boolean)
|
|
380
380
|
], User.prototype, "isAdmin", void 0);
|
|
381
|
+
__decorate([
|
|
382
|
+
(0, swagger_1.ApiProperty)({
|
|
383
|
+
description: 'Désactive le contrôle anti self-consent (même domaine email) pour cet utilisateur',
|
|
384
|
+
example: false,
|
|
385
|
+
}),
|
|
386
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
387
|
+
(0, class_validator_1.IsOptional)(),
|
|
388
|
+
(0, class_validator_1.IsBoolean)(),
|
|
389
|
+
__metadata("design:type", Boolean)
|
|
390
|
+
], User.prototype, "consentDomainCheckDisabled", void 0);
|
|
381
391
|
__decorate([
|
|
382
392
|
(0, swagger_1.ApiProperty)({
|
|
383
393
|
description: 'E-mail de renouvellement envoyé',
|