@likewatt/models 1.0.99 → 1.0.100
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/User.d.ts +14 -0
- package/dist/core/User.js +36 -1
- package/package.json +1 -1
package/dist/core/User.d.ts
CHANGED
|
@@ -30,6 +30,19 @@ export declare const RightsSchema: import("mongoose").Schema<Rights, import("mon
|
|
|
30
30
|
} & {
|
|
31
31
|
__v: number;
|
|
32
32
|
}>;
|
|
33
|
+
export declare class tokenData {
|
|
34
|
+
resetPasswordToken: string;
|
|
35
|
+
resetPasswordExpires: Date;
|
|
36
|
+
}
|
|
37
|
+
export declare const tokenDataSchema: import("mongoose").Schema<tokenData, import("mongoose").Model<tokenData, any, any, any, Document<unknown, any, tokenData, any, {}> & tokenData & {
|
|
38
|
+
_id: Types.ObjectId;
|
|
39
|
+
} & {
|
|
40
|
+
__v: number;
|
|
41
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, tokenData, Document<unknown, {}, import("mongoose").FlatRecord<tokenData>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<tokenData> & {
|
|
42
|
+
_id: Types.ObjectId;
|
|
43
|
+
} & {
|
|
44
|
+
__v: number;
|
|
45
|
+
}>;
|
|
33
46
|
export declare class WebhookParams {
|
|
34
47
|
endpoint?: string;
|
|
35
48
|
token?: string;
|
|
@@ -99,6 +112,7 @@ export declare class User {
|
|
|
99
112
|
siteTag: SiteTag;
|
|
100
113
|
rights: Rights;
|
|
101
114
|
webhook?: WebhookParams;
|
|
115
|
+
tokenData?: tokenData;
|
|
102
116
|
_createdAt?: string;
|
|
103
117
|
_lastConnected?: string;
|
|
104
118
|
}
|
package/dist/core/User.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.UserSchema = exports.User = exports.WebhookParamsSchema = exports.WebhookParams = exports.RightsSchema = exports.Rights = exports.SiteTagSchema = exports.SiteTag = void 0;
|
|
12
|
+
exports.UserSchema = exports.User = exports.WebhookParamsSchema = exports.WebhookParams = exports.tokenDataSchema = exports.tokenData = exports.RightsSchema = exports.Rights = exports.SiteTagSchema = exports.SiteTag = void 0;
|
|
13
13
|
const mongoose_1 = require("mongoose");
|
|
14
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
15
15
|
const mongoose_2 = require("@nestjs/mongoose");
|
|
@@ -69,6 +69,31 @@ exports.Rights = Rights = __decorate([
|
|
|
69
69
|
(0, mongoose_2.Schema)({ _id: false })
|
|
70
70
|
], Rights);
|
|
71
71
|
exports.RightsSchema = mongoose_2.SchemaFactory.createForClass(Rights);
|
|
72
|
+
let tokenData = class tokenData {
|
|
73
|
+
};
|
|
74
|
+
exports.tokenData = tokenData;
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, swagger_1.ApiProperty)({
|
|
77
|
+
description: "Token de réinitialisation du mot de passe",
|
|
78
|
+
example: true,
|
|
79
|
+
}),
|
|
80
|
+
(0, mongoose_2.Prop)({ type: String, required: true }),
|
|
81
|
+
(0, class_validator_1.IsString)(),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], tokenData.prototype, "resetPasswordToken", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, swagger_1.ApiProperty)({
|
|
86
|
+
description: "Date d'expiration du token de réinitialisation",
|
|
87
|
+
example: true,
|
|
88
|
+
}),
|
|
89
|
+
(0, mongoose_2.Prop)({ type: Date, required: true }),
|
|
90
|
+
(0, class_validator_1.IsDate)(),
|
|
91
|
+
__metadata("design:type", Date)
|
|
92
|
+
], tokenData.prototype, "resetPasswordExpires", void 0);
|
|
93
|
+
exports.tokenData = tokenData = __decorate([
|
|
94
|
+
(0, mongoose_2.Schema)({ _id: false })
|
|
95
|
+
], tokenData);
|
|
96
|
+
exports.tokenDataSchema = mongoose_2.SchemaFactory.createForClass(tokenData);
|
|
72
97
|
let WebhookParams = class WebhookParams {
|
|
73
98
|
};
|
|
74
99
|
exports.WebhookParams = WebhookParams;
|
|
@@ -564,6 +589,16 @@ __decorate([
|
|
|
564
589
|
}),
|
|
565
590
|
__metadata("design:type", WebhookParams)
|
|
566
591
|
], User.prototype, "webhook", void 0);
|
|
592
|
+
__decorate([
|
|
593
|
+
(0, swagger_1.ApiProperty)({
|
|
594
|
+
description: 'Données du token de réinitialisation du mot de passe',
|
|
595
|
+
example: '{ resetPasswordToken: "token", resetPasswordExpires: "date" }',
|
|
596
|
+
type: () => tokenData,
|
|
597
|
+
}),
|
|
598
|
+
(0, mongoose_2.Prop)({ type: exports.tokenDataSchema, required: false }),
|
|
599
|
+
(0, class_validator_1.IsOptional)(),
|
|
600
|
+
__metadata("design:type", tokenData)
|
|
601
|
+
], User.prototype, "tokenData", void 0);
|
|
567
602
|
__decorate([
|
|
568
603
|
(0, swagger_1.ApiProperty)({
|
|
569
604
|
description: 'Date interne de création (legacy)',
|