@likewatt/models 1.131.0 → 1.132.1
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 +20 -1
- package/dist/core/Consent.js +54 -5
- package/dist/core/Scenario.js +1 -1
- package/package.json +1 -1
package/dist/core/Consent.d.ts
CHANGED
|
@@ -22,6 +22,23 @@ export declare const ConsentFraudFlagSchema: import("mongoose").Schema<ConsentFr
|
|
|
22
22
|
} & {
|
|
23
23
|
__v: number;
|
|
24
24
|
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Ligne de la table ACC : un nom de compteur + son PDL. Figées à la création
|
|
27
|
+
* d'une demande de consentement ACC multi-PDL ; `Consent.pdls[]` en est dérivé.
|
|
28
|
+
*/
|
|
29
|
+
export declare class ConsentMeterRow {
|
|
30
|
+
name: string;
|
|
31
|
+
pdl: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const ConsentMeterRowSchema: import("mongoose").Schema<ConsentMeterRow, import("mongoose").Model<ConsentMeterRow, any, any, any, Document<unknown, any, ConsentMeterRow, any, {}> & ConsentMeterRow & {
|
|
34
|
+
_id: import("mongoose").Types.ObjectId;
|
|
35
|
+
} & {
|
|
36
|
+
__v: number;
|
|
37
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ConsentMeterRow, Document<unknown, {}, import("mongoose").FlatRecord<ConsentMeterRow>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<ConsentMeterRow> & {
|
|
38
|
+
_id: import("mongoose").Types.ObjectId;
|
|
39
|
+
} & {
|
|
40
|
+
__v: number;
|
|
41
|
+
}>;
|
|
25
42
|
/**
|
|
26
43
|
* Représente un utilisateur dans le système.
|
|
27
44
|
* - @Schema/timestamps : gère createdAt et updatedAt automatiques
|
|
@@ -44,9 +61,11 @@ export declare class Consent {
|
|
|
44
61
|
lastname?: string;
|
|
45
62
|
logo?: string;
|
|
46
63
|
mesureConsent: boolean;
|
|
47
|
-
siteId
|
|
64
|
+
siteId?: string;
|
|
48
65
|
pdls?: string[];
|
|
49
66
|
collectiveSiteId?: string;
|
|
67
|
+
meterRows?: ConsentMeterRow[];
|
|
68
|
+
metersGeneratedAt?: Date;
|
|
50
69
|
fileKey?: string;
|
|
51
70
|
via?: 'email' | 'upload';
|
|
52
71
|
isValidateConsent?: boolean;
|
package/dist/core/Consent.js
CHANGED
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ConsentSchema = exports.Consent = exports.ConsentFraudFlagSchema = exports.ConsentFraudFlag = void 0;
|
|
12
|
+
exports.ConsentSchema = exports.Consent = exports.ConsentMeterRowSchema = exports.ConsentMeterRow = exports.ConsentFraudFlagSchema = exports.ConsentFraudFlag = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
@@ -65,6 +65,32 @@ exports.ConsentFraudFlag = ConsentFraudFlag = __decorate([
|
|
|
65
65
|
(0, mongoose_1.Schema)({ _id: false })
|
|
66
66
|
], ConsentFraudFlag);
|
|
67
67
|
exports.ConsentFraudFlagSchema = mongoose_1.SchemaFactory.createForClass(ConsentFraudFlag);
|
|
68
|
+
/**
|
|
69
|
+
* Ligne de la table ACC : un nom de compteur + son PDL. Figées à la création
|
|
70
|
+
* d'une demande de consentement ACC multi-PDL ; `Consent.pdls[]` en est dérivé.
|
|
71
|
+
*/
|
|
72
|
+
let ConsentMeterRow = class ConsentMeterRow {
|
|
73
|
+
};
|
|
74
|
+
exports.ConsentMeterRow = ConsentMeterRow;
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, swagger_1.ApiProperty)({ description: 'Nom du compteur', example: 'Compteur 1' }),
|
|
77
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
78
|
+
(0, class_validator_1.IsString)(),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], ConsentMeterRow.prototype, "name", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, swagger_1.ApiProperty)({
|
|
83
|
+
description: 'Numéro de PDL (normalisé à la création)',
|
|
84
|
+
example: '12345678901234',
|
|
85
|
+
}),
|
|
86
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
87
|
+
(0, class_validator_1.IsString)(),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], ConsentMeterRow.prototype, "pdl", void 0);
|
|
90
|
+
exports.ConsentMeterRow = ConsentMeterRow = __decorate([
|
|
91
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
92
|
+
], ConsentMeterRow);
|
|
93
|
+
exports.ConsentMeterRowSchema = mongoose_1.SchemaFactory.createForClass(ConsentMeterRow);
|
|
68
94
|
/**
|
|
69
95
|
* Représente un utilisateur dans le système.
|
|
70
96
|
* - @Schema/timestamps : gère createdAt et updatedAt automatiques
|
|
@@ -213,11 +239,13 @@ __decorate([
|
|
|
213
239
|
__metadata("design:type", Boolean)
|
|
214
240
|
], Consent.prototype, "mesureConsent", void 0);
|
|
215
241
|
__decorate([
|
|
216
|
-
(0, swagger_1.
|
|
217
|
-
description: 'Identifiant du site'
|
|
218
|
-
|
|
242
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
243
|
+
description: 'Identifiant du site (cas ACI). Optionnel : une demande ACC est ' +
|
|
244
|
+
'ancrée sur collectiveSiteId, sans site. Invariant (contrôlé au ' +
|
|
245
|
+
'gateway) : exactement un de siteId | collectiveSiteId est présent.',
|
|
219
246
|
}),
|
|
220
|
-
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
247
|
+
(0, mongoose_1.Prop)({ type: String, required: false, index: true }),
|
|
248
|
+
(0, class_validator_1.IsOptional)(),
|
|
221
249
|
(0, class_validator_1.IsString)(),
|
|
222
250
|
__metadata("design:type", String)
|
|
223
251
|
], Consent.prototype, "siteId", void 0);
|
|
@@ -239,6 +267,27 @@ __decorate([
|
|
|
239
267
|
(0, class_validator_1.IsString)(),
|
|
240
268
|
__metadata("design:type", String)
|
|
241
269
|
], Consent.prototype, "collectiveSiteId", void 0);
|
|
270
|
+
__decorate([
|
|
271
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
272
|
+
description: 'Lignes (nom, PDL) de la demande ACC, figées à la création. ' +
|
|
273
|
+
'`pdls[]` en est dérivé (normalisé). Vide pour un consentement ACI.',
|
|
274
|
+
type: [ConsentMeterRow],
|
|
275
|
+
}),
|
|
276
|
+
(0, mongoose_1.Prop)({ type: [exports.ConsentMeterRowSchema], default: [] }),
|
|
277
|
+
(0, class_validator_1.IsOptional)(),
|
|
278
|
+
(0, class_validator_1.IsArray)(),
|
|
279
|
+
__metadata("design:type", Array)
|
|
280
|
+
], Consent.prototype, "meterRows", void 0);
|
|
281
|
+
__decorate([
|
|
282
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
283
|
+
description: 'Date de génération des compteurs ACC (idempotence). ' +
|
|
284
|
+
'Absente tant que les compteurs ne sont pas générés.',
|
|
285
|
+
}),
|
|
286
|
+
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
287
|
+
(0, class_validator_1.IsOptional)(),
|
|
288
|
+
(0, class_validator_1.IsDate)(),
|
|
289
|
+
__metadata("design:type", Date)
|
|
290
|
+
], Consent.prototype, "metersGeneratedAt", void 0);
|
|
242
291
|
__decorate([
|
|
243
292
|
(0, swagger_1.ApiPropertyOptional)({
|
|
244
293
|
description: 'Clé du fichier de consentement (voie upload)',
|
package/dist/core/Scenario.js
CHANGED
|
@@ -698,7 +698,7 @@ __decorate([
|
|
|
698
698
|
], Scenario.prototype, "sellingPriceInflation", void 0);
|
|
699
699
|
__decorate([
|
|
700
700
|
(0, swagger_1.ApiProperty)({ example: 'site_12345' }),
|
|
701
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
701
|
+
(0, mongoose_1.Prop)({ required: true, index: true }),
|
|
702
702
|
(0, class_validator_1.IsString)(),
|
|
703
703
|
__metadata("design:type", String)
|
|
704
704
|
], Scenario.prototype, "siteId", void 0);
|