@likewatt/models 1.0.79 → 1.0.81
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/Invitation.d.ts +24 -0
- package/dist/core/Invitation.js +73 -0
- package/dist/core/User.d.ts +0 -2
- package/dist/core/User.js +4 -16
- package/dist/frontend/Invitation.types.d.ts +6 -0
- package/dist/frontend/Invitation.types.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Document, Types } from 'mongoose';
|
|
2
|
+
/**
|
|
3
|
+
* Représente un utilisateur dans le système.
|
|
4
|
+
* - @Schema/timestamps : gère createdAt et updatedAt automatiques
|
|
5
|
+
* - @Prop : schéma Mongoose
|
|
6
|
+
* - @ApiProperty : documentation Swagger
|
|
7
|
+
* - class-validator rules : validation runtime
|
|
8
|
+
*/
|
|
9
|
+
export declare class Invitation {
|
|
10
|
+
_id: Types.ObjectId;
|
|
11
|
+
email: string;
|
|
12
|
+
principal: string;
|
|
13
|
+
_createdAt?: Date;
|
|
14
|
+
}
|
|
15
|
+
export type InvitationDocument = Invitation & Document;
|
|
16
|
+
export declare const InvitationSchema: import("mongoose").Schema<Invitation, import("mongoose").Model<Invitation, any, any, any, Document<unknown, any, Invitation, any, {}> & Invitation & Required<{
|
|
17
|
+
_id: Types.ObjectId;
|
|
18
|
+
}> & {
|
|
19
|
+
__v: number;
|
|
20
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Invitation, Document<unknown, {}, import("mongoose").FlatRecord<Invitation>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Invitation> & Required<{
|
|
21
|
+
_id: Types.ObjectId;
|
|
22
|
+
}> & {
|
|
23
|
+
__v: number;
|
|
24
|
+
}>;
|
|
@@ -0,0 +1,73 @@
|
|
|
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.InvitationSchema = exports.Invitation = void 0;
|
|
13
|
+
const mongoose_1 = require("mongoose");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const mongoose_2 = require("@nestjs/mongoose");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
/**
|
|
18
|
+
* Représente un utilisateur dans le système.
|
|
19
|
+
* - @Schema/timestamps : gère createdAt et updatedAt automatiques
|
|
20
|
+
* - @Prop : schéma Mongoose
|
|
21
|
+
* - @ApiProperty : documentation Swagger
|
|
22
|
+
* - class-validator rules : validation runtime
|
|
23
|
+
*/
|
|
24
|
+
let Invitation = class Invitation {
|
|
25
|
+
};
|
|
26
|
+
exports.Invitation = Invitation;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({
|
|
29
|
+
description: 'Identifiant unique MongoDB',
|
|
30
|
+
example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
|
|
31
|
+
type: mongoose_1.Types.ObjectId,
|
|
32
|
+
readOnly: true,
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", mongoose_1.Types.ObjectId)
|
|
35
|
+
], Invitation.prototype, "_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({
|
|
38
|
+
description: 'Adresse e-mail de l’utilisateur',
|
|
39
|
+
example: 'firstname.lastname@email.com',
|
|
40
|
+
format: 'email',
|
|
41
|
+
}),
|
|
42
|
+
(0, mongoose_2.Prop)({ type: String, required: true, unique: true }),
|
|
43
|
+
(0, class_validator_1.IsEmail)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], Invitation.prototype, "email", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({
|
|
48
|
+
description: 'ID de l’utilisateur qui a envoyé l’invitation',
|
|
49
|
+
example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
|
|
50
|
+
type: String,
|
|
51
|
+
}),
|
|
52
|
+
(0, mongoose_2.Prop)({ type: String, required: true, unique: true }),
|
|
53
|
+
(0, class_validator_1.IsEmail)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], Invitation.prototype, "principal", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiProperty)({
|
|
58
|
+
description: 'Date de création de l’invitation',
|
|
59
|
+
example: '30-04-2024',
|
|
60
|
+
type: String,
|
|
61
|
+
}),
|
|
62
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
63
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
|
+
(0, class_validator_1.IsString)(),
|
|
65
|
+
__metadata("design:type", Date)
|
|
66
|
+
], Invitation.prototype, "_createdAt", void 0);
|
|
67
|
+
exports.Invitation = Invitation = __decorate([
|
|
68
|
+
(0, mongoose_2.Schema)({
|
|
69
|
+
id: false,
|
|
70
|
+
timestamps: true,
|
|
71
|
+
})
|
|
72
|
+
], Invitation);
|
|
73
|
+
exports.InvitationSchema = mongoose_2.SchemaFactory.createForClass(Invitation);
|
package/dist/core/User.d.ts
CHANGED
package/dist/core/User.js
CHANGED
|
@@ -73,18 +73,6 @@ __decorate([
|
|
|
73
73
|
(0, class_validator_1.IsEmail)(),
|
|
74
74
|
__metadata("design:type", String)
|
|
75
75
|
], User.prototype, "email", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, swagger_1.ApiProperty)(),
|
|
78
|
-
(0, mongoose_2.Prop)({ type: Date, required: true }),
|
|
79
|
-
(0, class_validator_1.IsDate)(),
|
|
80
|
-
__metadata("design:type", Date)
|
|
81
|
-
], User.prototype, "endDate", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, swagger_1.ApiProperty)(),
|
|
84
|
-
(0, mongoose_2.Prop)({ type: Date, required: true }),
|
|
85
|
-
(0, class_validator_1.IsDate)(),
|
|
86
|
-
__metadata("design:type", Date)
|
|
87
|
-
], User.prototype, "startDate", void 0);
|
|
88
76
|
__decorate([
|
|
89
77
|
(0, swagger_1.ApiProperty)({
|
|
90
78
|
description: 'Mot de passe (stocké hashé)',
|
|
@@ -164,7 +152,7 @@ __decorate([
|
|
|
164
152
|
description: 'Nom de la société',
|
|
165
153
|
example: 'LIKEWATT',
|
|
166
154
|
}),
|
|
167
|
-
(0, mongoose_2.Prop)({ type: String, required:
|
|
155
|
+
(0, mongoose_2.Prop)({ type: String, required: true }),
|
|
168
156
|
(0, class_validator_1.IsOptional)(),
|
|
169
157
|
(0, class_validator_1.IsString)(),
|
|
170
158
|
__metadata("design:type", String)
|
|
@@ -174,7 +162,7 @@ __decorate([
|
|
|
174
162
|
description: 'Nom de la société',
|
|
175
163
|
example: 'LIKEWATT',
|
|
176
164
|
}),
|
|
177
|
-
(0, mongoose_2.Prop)({ type: String, required:
|
|
165
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
178
166
|
(0, class_validator_1.IsOptional)(),
|
|
179
167
|
(0, class_validator_1.IsString)(),
|
|
180
168
|
__metadata("design:type", String)
|
|
@@ -184,7 +172,7 @@ __decorate([
|
|
|
184
172
|
description: 'Adresse postale',
|
|
185
173
|
example: '1 rue de la République',
|
|
186
174
|
}),
|
|
187
|
-
(0, mongoose_2.Prop)({ type: String, required:
|
|
175
|
+
(0, mongoose_2.Prop)({ type: String, required: true }),
|
|
188
176
|
(0, class_validator_1.IsOptional)(),
|
|
189
177
|
(0, class_validator_1.IsString)(),
|
|
190
178
|
__metadata("design:type", String)
|
|
@@ -204,7 +192,7 @@ __decorate([
|
|
|
204
192
|
description: 'Code postal',
|
|
205
193
|
example: '69100',
|
|
206
194
|
}),
|
|
207
|
-
(0, mongoose_2.Prop)({ type: String, required:
|
|
195
|
+
(0, mongoose_2.Prop)({ type: String, required: true }),
|
|
208
196
|
(0, class_validator_1.IsOptional)(),
|
|
209
197
|
(0, class_validator_1.IsString)(),
|
|
210
198
|
__metadata("design:type", String)
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './core/Site';
|
|
|
4
4
|
export * from './core/User';
|
|
5
5
|
export * from './core/License';
|
|
6
6
|
export * from './core/ScenarioDefaultValue';
|
|
7
|
+
export * from './core/Invitation';
|
|
7
8
|
export * from './core/TypeORM/analysis';
|
|
8
9
|
export * from './core/TypeORM/OkwindHistory';
|
|
9
10
|
export * from './core/TypeORM/PvgisHistory';
|
package/dist/index.js
CHANGED
|
@@ -44,6 +44,7 @@ __exportStar(require("./core/Site"), exports);
|
|
|
44
44
|
__exportStar(require("./core/User"), exports);
|
|
45
45
|
__exportStar(require("./core/License"), exports);
|
|
46
46
|
__exportStar(require("./core/ScenarioDefaultValue"), exports);
|
|
47
|
+
__exportStar(require("./core/Invitation"), exports);
|
|
47
48
|
// TypeORM entities
|
|
48
49
|
__exportStar(require("./core/TypeORM/analysis"), exports);
|
|
49
50
|
__exportStar(require("./core/TypeORM/OkwindHistory"), exports);
|