@likewatt/models 1.0.88 → 1.0.90
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 +38 -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 WebhookParams {
|
|
34
|
+
endpoint?: string;
|
|
35
|
+
token?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const WebhookParamsSchema: import("mongoose").Schema<WebhookParams, import("mongoose").Model<WebhookParams, any, any, any, Document<unknown, any, WebhookParams, any, {}> & WebhookParams & {
|
|
38
|
+
_id: Types.ObjectId;
|
|
39
|
+
} & {
|
|
40
|
+
__v: number;
|
|
41
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, WebhookParams, Document<unknown, {}, import("mongoose").FlatRecord<WebhookParams>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<WebhookParams> & {
|
|
42
|
+
_id: Types.ObjectId;
|
|
43
|
+
} & {
|
|
44
|
+
__v: number;
|
|
45
|
+
}>;
|
|
33
46
|
/**
|
|
34
47
|
* Représente un utilisateur dans le système.
|
|
35
48
|
* - @Schema/timestamps : gère createdAt et updatedAt automatiques
|
|
@@ -84,6 +97,7 @@ export declare class User {
|
|
|
84
97
|
synthesis_fi: string[];
|
|
85
98
|
siteTag: SiteTag;
|
|
86
99
|
rights: Rights;
|
|
100
|
+
webhook?: WebhookParams;
|
|
87
101
|
_createdAt?: string;
|
|
88
102
|
_lastConnected?: string;
|
|
89
103
|
}
|
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.RightsSchema = exports.Rights = exports.SiteTagSchema = exports.SiteTag = void 0;
|
|
12
|
+
exports.UserSchema = exports.User = exports.WebhookParamsSchema = exports.WebhookParams = 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 WebhookParams = class WebhookParams {
|
|
73
|
+
};
|
|
74
|
+
exports.WebhookParams = WebhookParams;
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, swagger_1.ApiProperty)({
|
|
77
|
+
description: "Endpoint de l'utilisateur pour le webhook",
|
|
78
|
+
example: true,
|
|
79
|
+
}),
|
|
80
|
+
(0, mongoose_2.Prop)({ type: String, required: false, default: "https://example.com/webhook" }),
|
|
81
|
+
(0, class_validator_1.IsString)(),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], WebhookParams.prototype, "endpoint", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, swagger_1.ApiProperty)({
|
|
86
|
+
description: "Token de l'utilisateur pour le webhook",
|
|
87
|
+
example: true,
|
|
88
|
+
}),
|
|
89
|
+
(0, mongoose_2.Prop)({ type: String, required: false, default: "myToken_XXXX" }),
|
|
90
|
+
(0, class_validator_1.IsString)(),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], WebhookParams.prototype, "token", void 0);
|
|
93
|
+
exports.WebhookParams = WebhookParams = __decorate([
|
|
94
|
+
(0, mongoose_2.Schema)({ _id: false })
|
|
95
|
+
], WebhookParams);
|
|
96
|
+
exports.WebhookParamsSchema = mongoose_2.SchemaFactory.createForClass(WebhookParams);
|
|
72
97
|
/**
|
|
73
98
|
* Représente un utilisateur dans le système.
|
|
74
99
|
* - @Schema/timestamps : gère createdAt et updatedAt automatiques
|
|
@@ -511,6 +536,18 @@ __decorate([
|
|
|
511
536
|
}),
|
|
512
537
|
__metadata("design:type", Rights)
|
|
513
538
|
], User.prototype, "rights", void 0);
|
|
539
|
+
__decorate([
|
|
540
|
+
(0, swagger_1.ApiProperty)({
|
|
541
|
+
description: 'Configuration du webhook',
|
|
542
|
+
type: () => WebhookParams,
|
|
543
|
+
}),
|
|
544
|
+
(0, mongoose_2.Prop)({
|
|
545
|
+
type: exports.WebhookParamsSchema,
|
|
546
|
+
_id: false,
|
|
547
|
+
default: { endpoint: "https://example.com/webhook", token: "myToken_XXXXX" },
|
|
548
|
+
}),
|
|
549
|
+
__metadata("design:type", WebhookParams)
|
|
550
|
+
], User.prototype, "webhook", void 0);
|
|
514
551
|
__decorate([
|
|
515
552
|
(0, swagger_1.ApiProperty)({
|
|
516
553
|
description: 'Date interne de création (legacy)',
|