@likewatt/models 1.146.0 → 1.148.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.
|
@@ -2,6 +2,7 @@ import { Document } from 'mongoose';
|
|
|
2
2
|
import { SiteType } from './internal/enums';
|
|
3
3
|
import { BuildingData } from './internal/building-data';
|
|
4
4
|
import { BuildingDataStatus } from './enums/BuildingDataStatus';
|
|
5
|
+
import { GroupedConsentDraft } from './GroupedConsentDraft';
|
|
5
6
|
export type CollectiveSiteDocument = CollectiveSite & Document;
|
|
6
7
|
export declare class CollectiveSite {
|
|
7
8
|
readonly _id: string;
|
|
@@ -38,6 +39,8 @@ export declare class CollectiveSite {
|
|
|
38
39
|
demoTemplateSourceId?: string;
|
|
39
40
|
consentUploadEnabled?: boolean;
|
|
40
41
|
consentFraudConsentId?: string | null;
|
|
42
|
+
consentResentAfterFraudAt?: Date | null;
|
|
43
|
+
groupedConsentDraft?: GroupedConsentDraft | null;
|
|
41
44
|
deletedAt?: Date | null;
|
|
42
45
|
createdAt?: Date | string;
|
|
43
46
|
updatedAt?: Date | string;
|
|
@@ -18,6 +18,7 @@ const class_transformer_1 = require("class-transformer");
|
|
|
18
18
|
const enums_1 = require("./internal/enums");
|
|
19
19
|
const building_data_1 = require("./internal/building-data");
|
|
20
20
|
const BuildingDataStatus_1 = require("./enums/BuildingDataStatus");
|
|
21
|
+
const GroupedConsentDraft_1 = require("./GroupedConsentDraft");
|
|
21
22
|
let CollectiveSite = class CollectiveSite {
|
|
22
23
|
};
|
|
23
24
|
exports.CollectiveSite = CollectiveSite;
|
|
@@ -263,6 +264,32 @@ __decorate([
|
|
|
263
264
|
(0, class_validator_1.IsString)(),
|
|
264
265
|
__metadata("design:type", Object)
|
|
265
266
|
], CollectiveSite.prototype, "consentFraudConsentId", void 0);
|
|
267
|
+
__decorate([
|
|
268
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
269
|
+
description: "Date du dernier renvoi d'une demande groupée par e-mail sur un collectif bloqué pour fraude par sa propre demande ; absente ou null = aucun renvoi. Posée par la gateway, effacée au déblocage ou au changement de bloqueur.",
|
|
270
|
+
}),
|
|
271
|
+
(0, mongoose_1.Prop)({ type: Date, required: false, default: undefined }),
|
|
272
|
+
(0, class_validator_1.IsOptional)(),
|
|
273
|
+
(0, class_validator_1.IsDate)(),
|
|
274
|
+
(0, class_transformer_1.Type)(() => Date),
|
|
275
|
+
__metadata("design:type", Object)
|
|
276
|
+
], CollectiveSite.prototype, "consentResentAfterFraudAt", void 0);
|
|
277
|
+
__decorate([
|
|
278
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
279
|
+
description: 'Brouillon de demande de consentement groupée (un par collectif), photo du formulaire aux champs possiblement vides. Écrit par la gateway seule ; effacé à l’envoi réussi depuis le brouillon.',
|
|
280
|
+
type: GroupedConsentDraft_1.GroupedConsentDraft,
|
|
281
|
+
nullable: true,
|
|
282
|
+
}),
|
|
283
|
+
(0, mongoose_1.Prop)({
|
|
284
|
+
type: GroupedConsentDraft_1.GroupedConsentDraftSchema,
|
|
285
|
+
required: false,
|
|
286
|
+
default: undefined,
|
|
287
|
+
}),
|
|
288
|
+
(0, class_validator_1.IsOptional)(),
|
|
289
|
+
(0, class_validator_1.ValidateNested)(),
|
|
290
|
+
(0, class_transformer_1.Type)(() => GroupedConsentDraft_1.GroupedConsentDraft),
|
|
291
|
+
__metadata("design:type", Object)
|
|
292
|
+
], CollectiveSite.prototype, "groupedConsentDraft", void 0);
|
|
266
293
|
__decorate([
|
|
267
294
|
(0, swagger_1.ApiPropertyOptional)({
|
|
268
295
|
description: 'Date de suppression (passage au compte support) ; absente ou null = projet actif. Posée et effacée par la gateway.',
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Ligne d'un brouillon de demande groupée : nom et PDL tels que saisis, possiblement vides. */
|
|
2
|
+
export declare class GroupedConsentDraftMeter {
|
|
3
|
+
name: string;
|
|
4
|
+
pdl: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const GroupedConsentDraftMeterSchema: import("mongoose").Schema<GroupedConsentDraftMeter, import("mongoose").Model<GroupedConsentDraftMeter, any, any, any, import("mongoose").Document<unknown, any, GroupedConsentDraftMeter, any, {}> & GroupedConsentDraftMeter & {
|
|
7
|
+
_id: import("mongoose").Types.ObjectId;
|
|
8
|
+
} & {
|
|
9
|
+
__v: number;
|
|
10
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, GroupedConsentDraftMeter, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<GroupedConsentDraftMeter>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<GroupedConsentDraftMeter> & {
|
|
11
|
+
_id: import("mongoose").Types.ObjectId;
|
|
12
|
+
} & {
|
|
13
|
+
__v: number;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Brouillon d'une demande de consentement ACC groupée : photo du formulaire,
|
|
17
|
+
* champs possiblement vides. Un seul par collectif. N'a aucun effet (ni fiche
|
|
18
|
+
* de consentement, ni mail, ni compteur) : les règles s'appliquent à l'envoi.
|
|
19
|
+
*/
|
|
20
|
+
export declare class GroupedConsentDraft {
|
|
21
|
+
companyName: string;
|
|
22
|
+
firstname: string;
|
|
23
|
+
lastname: string;
|
|
24
|
+
email: string;
|
|
25
|
+
meters: GroupedConsentDraftMeter[];
|
|
26
|
+
updatedAt: Date;
|
|
27
|
+
}
|
|
28
|
+
export declare const GroupedConsentDraftSchema: import("mongoose").Schema<GroupedConsentDraft, import("mongoose").Model<GroupedConsentDraft, any, any, any, import("mongoose").Document<unknown, any, GroupedConsentDraft, any, {}> & GroupedConsentDraft & {
|
|
29
|
+
_id: import("mongoose").Types.ObjectId;
|
|
30
|
+
} & {
|
|
31
|
+
__v: number;
|
|
32
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, GroupedConsentDraft, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<GroupedConsentDraft>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<GroupedConsentDraft> & {
|
|
33
|
+
_id: import("mongoose").Types.ObjectId;
|
|
34
|
+
} & {
|
|
35
|
+
__v: number;
|
|
36
|
+
}>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GroupedConsentDraftSchema = exports.GroupedConsentDraft = exports.GroupedConsentDraftMeterSchema = exports.GroupedConsentDraftMeter = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const class_transformer_1 = require("class-transformer");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
/** Ligne d'un brouillon de demande groupée : nom et PDL tels que saisis, possiblement vides. */
|
|
18
|
+
let GroupedConsentDraftMeter = class GroupedConsentDraftMeter {
|
|
19
|
+
};
|
|
20
|
+
exports.GroupedConsentDraftMeter = GroupedConsentDraftMeter;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, swagger_1.ApiProperty)({ description: 'Nom du compteur (peut être vide)' }),
|
|
23
|
+
(0, mongoose_1.Prop)({ type: String, default: '' }),
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], GroupedConsentDraftMeter.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({ description: 'PDL tel que saisi (peut être vide)' }),
|
|
29
|
+
(0, mongoose_1.Prop)({ type: String, default: '' }),
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], GroupedConsentDraftMeter.prototype, "pdl", void 0);
|
|
33
|
+
exports.GroupedConsentDraftMeter = GroupedConsentDraftMeter = __decorate([
|
|
34
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
35
|
+
], GroupedConsentDraftMeter);
|
|
36
|
+
exports.GroupedConsentDraftMeterSchema = mongoose_1.SchemaFactory.createForClass(GroupedConsentDraftMeter);
|
|
37
|
+
/**
|
|
38
|
+
* Brouillon d'une demande de consentement ACC groupée : photo du formulaire,
|
|
39
|
+
* champs possiblement vides. Un seul par collectif. N'a aucun effet (ni fiche
|
|
40
|
+
* de consentement, ni mail, ni compteur) : les règles s'appliquent à l'envoi.
|
|
41
|
+
*/
|
|
42
|
+
let GroupedConsentDraft = class GroupedConsentDraft {
|
|
43
|
+
};
|
|
44
|
+
exports.GroupedConsentDraft = GroupedConsentDraft;
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, swagger_1.ApiProperty)({ description: 'Nom / raison sociale du titulaire' }),
|
|
47
|
+
(0, mongoose_1.Prop)({ type: String, default: '' }),
|
|
48
|
+
(0, class_validator_1.IsString)(),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], GroupedConsentDraft.prototype, "companyName", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, swagger_1.ApiProperty)({ description: 'Prénom du représentant' }),
|
|
53
|
+
(0, mongoose_1.Prop)({ type: String, default: '' }),
|
|
54
|
+
(0, class_validator_1.IsString)(),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], GroupedConsentDraft.prototype, "firstname", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, swagger_1.ApiProperty)({ description: 'Nom du représentant' }),
|
|
59
|
+
(0, mongoose_1.Prop)({ type: String, default: '' }),
|
|
60
|
+
(0, class_validator_1.IsString)(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], GroupedConsentDraft.prototype, "lastname", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, swagger_1.ApiProperty)({ description: 'Adresse e-mail du représentant' }),
|
|
65
|
+
(0, mongoose_1.Prop)({ type: String, default: '' }),
|
|
66
|
+
(0, class_validator_1.IsString)(),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], GroupedConsentDraft.prototype, "email", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, swagger_1.ApiProperty)({ type: [GroupedConsentDraftMeter] }),
|
|
71
|
+
(0, mongoose_1.Prop)({ type: [exports.GroupedConsentDraftMeterSchema], default: [] }),
|
|
72
|
+
(0, class_validator_1.IsArray)(),
|
|
73
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
74
|
+
(0, class_transformer_1.Type)(() => GroupedConsentDraftMeter),
|
|
75
|
+
__metadata("design:type", Array)
|
|
76
|
+
], GroupedConsentDraft.prototype, "meters", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, swagger_1.ApiProperty)({ description: 'Date du dernier enregistrement' }),
|
|
79
|
+
(0, mongoose_1.Prop)({ type: Date, required: true }),
|
|
80
|
+
(0, class_validator_1.IsDate)(),
|
|
81
|
+
(0, class_transformer_1.Type)(() => Date),
|
|
82
|
+
__metadata("design:type", Date)
|
|
83
|
+
], GroupedConsentDraft.prototype, "updatedAt", void 0);
|
|
84
|
+
exports.GroupedConsentDraft = GroupedConsentDraft = __decorate([
|
|
85
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
86
|
+
], GroupedConsentDraft);
|
|
87
|
+
exports.GroupedConsentDraftSchema = mongoose_1.SchemaFactory.createForClass(GroupedConsentDraft);
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './core/Scenario';
|
|
|
5
5
|
export * from './core/Site';
|
|
6
6
|
export * from './core/Customer';
|
|
7
7
|
export * from './core/Consent';
|
|
8
|
+
export * from './core/GroupedConsentDraft';
|
|
8
9
|
export * from './core/User';
|
|
9
10
|
export * from './core/License';
|
|
10
11
|
export * from './core/Subscription';
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __exportStar(require("./core/Scenario"), exports);
|
|
|
23
23
|
__exportStar(require("./core/Site"), exports);
|
|
24
24
|
__exportStar(require("./core/Customer"), exports);
|
|
25
25
|
__exportStar(require("./core/Consent"), exports);
|
|
26
|
+
__exportStar(require("./core/GroupedConsentDraft"), exports);
|
|
26
27
|
__exportStar(require("./core/User"), exports);
|
|
27
28
|
__exportStar(require("./core/License"), exports);
|
|
28
29
|
__exportStar(require("./core/Subscription"), exports);
|