@likewatt/models 1.140.0 → 1.142.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 +3 -0
- package/dist/core/Consent.js +30 -0
- package/dist/core/Site.d.ts +1 -0
- package/dist/core/Site.js +9 -0
- package/package.json +1 -1
package/dist/core/Consent.d.ts
CHANGED
|
@@ -77,6 +77,9 @@ export declare class Consent {
|
|
|
77
77
|
fraudReviewNote?: string;
|
|
78
78
|
fraudReviewedBy?: string;
|
|
79
79
|
fraudReviewedAt?: Date;
|
|
80
|
+
confirmationTokenHash?: string;
|
|
81
|
+
confirmationTokenExpiresAt?: Date;
|
|
82
|
+
acceptedAt?: Date;
|
|
80
83
|
}
|
|
81
84
|
export type ConsentDocument = Consent & Document;
|
|
82
85
|
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
|
@@ -384,6 +384,33 @@ __decorate([
|
|
|
384
384
|
(0, class_validator_1.IsDate)(),
|
|
385
385
|
__metadata("design:type", Date)
|
|
386
386
|
], Consent.prototype, "fraudReviewedAt", void 0);
|
|
387
|
+
__decorate([
|
|
388
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
389
|
+
description: 'Haché SHA-256 du jeton du lien de confirmation (jamais le jeton)',
|
|
390
|
+
}),
|
|
391
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
392
|
+
(0, class_validator_1.IsOptional)(),
|
|
393
|
+
(0, class_validator_1.IsString)(),
|
|
394
|
+
__metadata("design:type", String)
|
|
395
|
+
], Consent.prototype, "confirmationTokenHash", void 0);
|
|
396
|
+
__decorate([
|
|
397
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
398
|
+
description: "Date d'expiration du lien de confirmation",
|
|
399
|
+
}),
|
|
400
|
+
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
401
|
+
(0, class_validator_1.IsOptional)(),
|
|
402
|
+
(0, class_validator_1.IsDate)(),
|
|
403
|
+
__metadata("design:type", Date)
|
|
404
|
+
], Consent.prototype, "confirmationTokenExpiresAt", void 0);
|
|
405
|
+
__decorate([
|
|
406
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
407
|
+
description: "Date d'acceptation par le client via le lien ; absente tant que la demande est en attente",
|
|
408
|
+
}),
|
|
409
|
+
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
410
|
+
(0, class_validator_1.IsOptional)(),
|
|
411
|
+
(0, class_validator_1.IsDate)(),
|
|
412
|
+
__metadata("design:type", Date)
|
|
413
|
+
], Consent.prototype, "acceptedAt", void 0);
|
|
387
414
|
exports.Consent = Consent = __decorate([
|
|
388
415
|
(0, mongoose_1.Schema)({
|
|
389
416
|
id: false,
|
|
@@ -397,6 +424,9 @@ exports.ConsentSchema = mongoose_1.SchemaFactory.createForClass(Consent);
|
|
|
397
424
|
exports.ConsentSchema.index({ workspaceId: 1, pdls: 1 });
|
|
398
425
|
// Index pour la console admin de suivi anti-fraude (statut + récence)
|
|
399
426
|
exports.ConsentSchema.index({ fraudReviewStatus: 1, createdAt: -1 });
|
|
427
|
+
// Un jeton de confirmation désigne une seule fiche ; sparse car la plupart des
|
|
428
|
+
// consentements (voie upload, anciens) n'en ont pas
|
|
429
|
+
exports.ConsentSchema.index({ confirmationTokenHash: 1 }, { unique: true, sparse: true });
|
|
400
430
|
// Hook pre-save pour générer automatiquement un UUID si _id n'est pas fourni
|
|
401
431
|
exports.ConsentSchema.pre('save', function (next) {
|
|
402
432
|
if (!this._id) {
|
package/dist/core/Site.d.ts
CHANGED
package/dist/core/Site.js
CHANGED
|
@@ -409,6 +409,15 @@ __decorate([
|
|
|
409
409
|
(0, class_validator_1.IsString)(),
|
|
410
410
|
__metadata("design:type", String)
|
|
411
411
|
], Site.prototype, "consentId", void 0);
|
|
412
|
+
__decorate([
|
|
413
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
414
|
+
description: 'Fiche de consentement marquée Fraude par un admin ; présent = projet bloqué jusqu’à revue Légitime',
|
|
415
|
+
}),
|
|
416
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
417
|
+
(0, class_validator_1.IsOptional)(),
|
|
418
|
+
(0, class_validator_1.IsString)(),
|
|
419
|
+
__metadata("design:type", String)
|
|
420
|
+
], Site.prototype, "consentFraudConsentId", void 0);
|
|
412
421
|
__decorate([
|
|
413
422
|
(0, swagger_1.ApiPropertyOptional)(),
|
|
414
423
|
(0, mongoose_1.Prop)({ type: Boolean, required: false }),
|