@likewatt/models 1.0.68 → 1.0.70
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/README.md +2 -2
- package/dist/core/License.d.ts +29 -0
- package/dist/core/License.js +129 -0
- package/dist/core/User.d.ts +12 -0
- package/dist/core/User.js +80 -0
- package/dist/core/internal/enssential.d.ts +15 -0
- package/dist/core/internal/enssential.js +41 -0
- package/dist/core/internal/manager-licenses.d.ts +15 -0
- package/dist/core/internal/manager-licenses.js +37 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @likewatt/models
|
|
2
2
|
|
|
3
|
-
This package is private and hosted
|
|
3
|
+
This package is private and hosted a private NPM repository.
|
|
4
4
|
It should not be shared to people outside of Likewatt.
|
|
5
5
|
|
|
6
6
|
# Release
|
|
7
7
|
|
|
8
8
|
This package uses CI/CD to deploy automatic new versions when a commit is pushed to the `main` branch.
|
|
9
|
-
The changelogs is also automatically generated.
|
|
9
|
+
The changelogs is also automatically generated.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { 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 License {
|
|
10
|
+
_id: Types.ObjectId;
|
|
11
|
+
license?: string;
|
|
12
|
+
domain?: boolean;
|
|
13
|
+
startDate: Date;
|
|
14
|
+
endDate: Date;
|
|
15
|
+
maxUsers?: number;
|
|
16
|
+
maxSite?: number;
|
|
17
|
+
trackerOkd: boolean;
|
|
18
|
+
acc?: boolean;
|
|
19
|
+
userId?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const LicenseSchema: import("mongoose").Schema<License, import("mongoose").Model<License, any, any, any, import("mongoose").Document<unknown, any, License, any, {}> & License & Required<{
|
|
22
|
+
_id: Types.ObjectId;
|
|
23
|
+
}> & {
|
|
24
|
+
__v: number;
|
|
25
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, License, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<License>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<License> & Required<{
|
|
26
|
+
_id: Types.ObjectId;
|
|
27
|
+
}> & {
|
|
28
|
+
__v: number;
|
|
29
|
+
}>;
|
|
@@ -0,0 +1,129 @@
|
|
|
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.LicenseSchema = exports.License = 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 License = class License {
|
|
25
|
+
};
|
|
26
|
+
exports.License = License;
|
|
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
|
+
], License.prototype, "_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({
|
|
38
|
+
description: 'Licence utilisateur',
|
|
39
|
+
example: 'Standard',
|
|
40
|
+
}),
|
|
41
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], License.prototype, "license", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({
|
|
48
|
+
description: 'Domaine d’activité',
|
|
49
|
+
example: true,
|
|
50
|
+
}),
|
|
51
|
+
(0, mongoose_2.Prop)({ type: Boolean, required: true, default: false }),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
(0, class_validator_1.IsBoolean)(),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], License.prototype, "domain", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiProperty)({
|
|
58
|
+
description: 'Date de début de la licence',
|
|
59
|
+
example: '2023-01-01T00:00:00Z',
|
|
60
|
+
}),
|
|
61
|
+
(0, mongoose_2.Prop)({ type: Date, required: true }),
|
|
62
|
+
(0, class_validator_1.IsDate)(),
|
|
63
|
+
__metadata("design:type", Date)
|
|
64
|
+
], License.prototype, "startDate", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, swagger_1.ApiProperty)({
|
|
67
|
+
description: 'Date de fin de la licence',
|
|
68
|
+
example: '2023-12-31T23:59:59Z',
|
|
69
|
+
}),
|
|
70
|
+
(0, mongoose_2.Prop)({ type: Date, required: true }),
|
|
71
|
+
(0, class_validator_1.IsDate)(),
|
|
72
|
+
__metadata("design:type", Date)
|
|
73
|
+
], License.prototype, "endDate", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, swagger_1.ApiProperty)({
|
|
76
|
+
description: 'Nombre maximum d’utilisateurs',
|
|
77
|
+
example: 1,
|
|
78
|
+
}),
|
|
79
|
+
(0, mongoose_2.Prop)({ type: Number, required: false }),
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
(0, class_validator_1.IsNumber)(),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], License.prototype, "maxUsers", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, swagger_1.ApiProperty)({
|
|
86
|
+
description: 'Nombre maximum de sites',
|
|
87
|
+
example: 1,
|
|
88
|
+
}),
|
|
89
|
+
(0, mongoose_2.Prop)({ type: Number, required: false }),
|
|
90
|
+
(0, class_validator_1.IsOptional)(),
|
|
91
|
+
(0, class_validator_1.IsNumber)(),
|
|
92
|
+
__metadata("design:type", Number)
|
|
93
|
+
], License.prototype, "maxSite", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, swagger_1.ApiProperty)({
|
|
96
|
+
description: 'Suivi OKD activé',
|
|
97
|
+
example: false,
|
|
98
|
+
}),
|
|
99
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
100
|
+
(0, class_validator_1.IsBoolean)(),
|
|
101
|
+
__metadata("design:type", Boolean)
|
|
102
|
+
], License.prototype, "trackerOkd", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, swagger_1.ApiProperty)({
|
|
105
|
+
description: 'Type de l’utilisateur',
|
|
106
|
+
example: 'CONSUMER_PLUS',
|
|
107
|
+
}),
|
|
108
|
+
(0, mongoose_2.Prop)({ type: Boolean, required: false, default: false }),
|
|
109
|
+
(0, class_validator_1.IsOptional)(),
|
|
110
|
+
(0, class_validator_1.IsBoolean)(),
|
|
111
|
+
__metadata("design:type", Boolean)
|
|
112
|
+
], License.prototype, "acc", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, swagger_1.ApiProperty)({
|
|
115
|
+
description: 'Identifiant de l’utilisateur',
|
|
116
|
+
example: 'Standard',
|
|
117
|
+
}),
|
|
118
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
119
|
+
(0, class_validator_1.IsOptional)(),
|
|
120
|
+
(0, class_validator_1.IsString)(),
|
|
121
|
+
__metadata("design:type", String)
|
|
122
|
+
], License.prototype, "userId", void 0);
|
|
123
|
+
exports.License = License = __decorate([
|
|
124
|
+
(0, mongoose_2.Schema)({
|
|
125
|
+
id: false,
|
|
126
|
+
timestamps: true,
|
|
127
|
+
})
|
|
128
|
+
], License);
|
|
129
|
+
exports.LicenseSchema = mongoose_2.SchemaFactory.createForClass(License);
|
package/dist/core/User.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Document, Types } from 'mongoose';
|
|
2
2
|
import { Folder } from './internal/folder.model';
|
|
3
|
+
import { ManagerLicenses } from './internal/manager-licenses';
|
|
3
4
|
/**
|
|
4
5
|
* Sous-schéma pour les tags liés au site de l’utilisateur.
|
|
5
6
|
*/
|
|
6
7
|
export declare class SiteTag {
|
|
7
8
|
hasConsumerTag: boolean;
|
|
9
|
+
hasConsumerPlusTag: boolean;
|
|
8
10
|
}
|
|
9
11
|
export declare const SiteTagSchema: import("mongoose").Schema<SiteTag, import("mongoose").Model<SiteTag, any, any, any, Document<unknown, any, SiteTag, any, {}> & SiteTag & {
|
|
10
12
|
_id: Types.ObjectId;
|
|
@@ -25,16 +27,25 @@ export declare const SiteTagSchema: import("mongoose").Schema<SiteTag, import("m
|
|
|
25
27
|
export declare class User {
|
|
26
28
|
_id: Types.ObjectId;
|
|
27
29
|
email: string;
|
|
30
|
+
endDate: Date;
|
|
31
|
+
startDate: Date;
|
|
28
32
|
password: string;
|
|
29
33
|
firstname: string;
|
|
30
34
|
folders: Folder[];
|
|
35
|
+
managerLicenses: ManagerLicenses;
|
|
36
|
+
managerLicensesUsed: ManagerLicenses;
|
|
37
|
+
renewLicense: object;
|
|
38
|
+
defaultRates: string[];
|
|
39
|
+
defaultScenarios: string[];
|
|
31
40
|
lastname: string;
|
|
32
41
|
phone?: string;
|
|
33
42
|
company?: string;
|
|
43
|
+
organization?: string;
|
|
34
44
|
address?: string;
|
|
35
45
|
addressCity?: string;
|
|
36
46
|
addressZipCode?: string;
|
|
37
47
|
isAdmin: boolean;
|
|
48
|
+
isRenewalEmailSent: boolean;
|
|
38
49
|
isManager: boolean;
|
|
39
50
|
active: boolean;
|
|
40
51
|
demo: boolean;
|
|
@@ -50,6 +61,7 @@ export declare class User {
|
|
|
50
61
|
trackerOkd: boolean;
|
|
51
62
|
isSignUpEmailSent: boolean;
|
|
52
63
|
isAdminEmailSent: boolean;
|
|
64
|
+
automaticRenew: boolean;
|
|
53
65
|
optimNumber?: number;
|
|
54
66
|
nbSitesActive?: number;
|
|
55
67
|
analysis_individual: string[];
|
package/dist/core/User.js
CHANGED
|
@@ -15,6 +15,7 @@ const swagger_1 = require("@nestjs/swagger");
|
|
|
15
15
|
const mongoose_2 = require("@nestjs/mongoose");
|
|
16
16
|
const class_validator_1 = require("class-validator");
|
|
17
17
|
const folder_model_1 = require("./internal/folder.model");
|
|
18
|
+
const manager_licenses_1 = require("./internal/manager-licenses");
|
|
18
19
|
/**
|
|
19
20
|
* Sous-schéma pour les tags liés au site de l’utilisateur.
|
|
20
21
|
*/
|
|
@@ -30,6 +31,15 @@ __decorate([
|
|
|
30
31
|
(0, class_validator_1.IsBoolean)(),
|
|
31
32
|
__metadata("design:type", Boolean)
|
|
32
33
|
], SiteTag.prototype, "hasConsumerTag", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiProperty)({
|
|
36
|
+
description: 'Indique si le site possède un tag consommateur',
|
|
37
|
+
example: true,
|
|
38
|
+
}),
|
|
39
|
+
(0, mongoose_2.Prop)({ type: Boolean, required: true }),
|
|
40
|
+
(0, class_validator_1.IsBoolean)(),
|
|
41
|
+
__metadata("design:type", Boolean)
|
|
42
|
+
], SiteTag.prototype, "hasConsumerPlusTag", void 0);
|
|
33
43
|
exports.SiteTag = SiteTag = __decorate([
|
|
34
44
|
(0, mongoose_2.Schema)({ _id: false })
|
|
35
45
|
], SiteTag);
|
|
@@ -63,6 +73,18 @@ __decorate([
|
|
|
63
73
|
(0, class_validator_1.IsEmail)(),
|
|
64
74
|
__metadata("design:type", String)
|
|
65
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);
|
|
66
88
|
__decorate([
|
|
67
89
|
(0, swagger_1.ApiProperty)({
|
|
68
90
|
description: 'Mot de passe (stocké hashé)',
|
|
@@ -88,6 +110,36 @@ __decorate([
|
|
|
88
110
|
(0, class_validator_1.IsArray)(),
|
|
89
111
|
__metadata("design:type", Array)
|
|
90
112
|
], User.prototype, "folders", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, swagger_1.ApiProperty)({ type: manager_licenses_1.ManagerLicenses }),
|
|
115
|
+
(0, mongoose_2.Prop)({ type: [folder_model_1.FolderSchema] }),
|
|
116
|
+
(0, class_validator_1.IsObject)(),
|
|
117
|
+
__metadata("design:type", manager_licenses_1.ManagerLicenses)
|
|
118
|
+
], User.prototype, "managerLicenses", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, swagger_1.ApiProperty)({ type: manager_licenses_1.ManagerLicenses }),
|
|
121
|
+
(0, mongoose_2.Prop)({ type: [folder_model_1.FolderSchema] }),
|
|
122
|
+
(0, class_validator_1.IsObject)(),
|
|
123
|
+
__metadata("design:type", manager_licenses_1.ManagerLicenses)
|
|
124
|
+
], User.prototype, "managerLicensesUsed", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, swagger_1.ApiProperty)({ type: Object }),
|
|
127
|
+
(0, mongoose_2.Prop)({ type: [Object] }),
|
|
128
|
+
(0, class_validator_1.IsObject)(),
|
|
129
|
+
__metadata("design:type", Object)
|
|
130
|
+
], User.prototype, "renewLicense", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, swagger_1.ApiProperty)({ type: [String] }),
|
|
133
|
+
(0, mongoose_2.Prop)({ type: [String], required: false, default: [] }),
|
|
134
|
+
(0, class_validator_1.IsArray)(),
|
|
135
|
+
__metadata("design:type", Array)
|
|
136
|
+
], User.prototype, "defaultRates", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, swagger_1.ApiProperty)({ type: [String] }),
|
|
139
|
+
(0, mongoose_2.Prop)({ type: [String], required: false, default: [] }),
|
|
140
|
+
(0, class_validator_1.IsArray)(),
|
|
141
|
+
__metadata("design:type", Array)
|
|
142
|
+
], User.prototype, "defaultScenarios", void 0);
|
|
91
143
|
__decorate([
|
|
92
144
|
(0, swagger_1.ApiProperty)({
|
|
93
145
|
description: 'Nom de famille de l’utilisateur',
|
|
@@ -117,6 +169,16 @@ __decorate([
|
|
|
117
169
|
(0, class_validator_1.IsString)(),
|
|
118
170
|
__metadata("design:type", String)
|
|
119
171
|
], User.prototype, "company", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, swagger_1.ApiProperty)({
|
|
174
|
+
description: 'Nom de la société',
|
|
175
|
+
example: 'LIKEWATT',
|
|
176
|
+
}),
|
|
177
|
+
(0, mongoose_2.Prop)({ type: String, required: true }),
|
|
178
|
+
(0, class_validator_1.IsOptional)(),
|
|
179
|
+
(0, class_validator_1.IsString)(),
|
|
180
|
+
__metadata("design:type", String)
|
|
181
|
+
], User.prototype, "organization", void 0);
|
|
120
182
|
__decorate([
|
|
121
183
|
(0, swagger_1.ApiProperty)({
|
|
122
184
|
description: 'Adresse postale',
|
|
@@ -156,6 +218,15 @@ __decorate([
|
|
|
156
218
|
(0, class_validator_1.IsBoolean)(),
|
|
157
219
|
__metadata("design:type", Boolean)
|
|
158
220
|
], User.prototype, "isAdmin", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
(0, swagger_1.ApiProperty)({
|
|
223
|
+
description: 'E-mail de renouvellement envoyé',
|
|
224
|
+
example: true,
|
|
225
|
+
}),
|
|
226
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
227
|
+
(0, class_validator_1.IsBoolean)(),
|
|
228
|
+
__metadata("design:type", Boolean)
|
|
229
|
+
], User.prototype, "isRenewalEmailSent", void 0);
|
|
159
230
|
__decorate([
|
|
160
231
|
(0, swagger_1.ApiProperty)({
|
|
161
232
|
description: 'Rôle manager',
|
|
@@ -298,6 +369,15 @@ __decorate([
|
|
|
298
369
|
(0, class_validator_1.IsBoolean)(),
|
|
299
370
|
__metadata("design:type", Boolean)
|
|
300
371
|
], User.prototype, "isAdminEmailSent", void 0);
|
|
372
|
+
__decorate([
|
|
373
|
+
(0, swagger_1.ApiProperty)({
|
|
374
|
+
description: 'Renouvellement automatique de l’abonnement',
|
|
375
|
+
example: false,
|
|
376
|
+
}),
|
|
377
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
378
|
+
(0, class_validator_1.IsBoolean)(),
|
|
379
|
+
__metadata("design:type", Boolean)
|
|
380
|
+
], User.prototype, "automaticRenew", void 0);
|
|
301
381
|
__decorate([
|
|
302
382
|
(0, swagger_1.ApiProperty)({
|
|
303
383
|
description: 'Numéro OPTIM',
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class Pricing {
|
|
2
|
+
BTINF: number;
|
|
3
|
+
BTINFACC: number;
|
|
4
|
+
BTSUP: number;
|
|
5
|
+
BTSUPACC: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const PricingSchema: import("mongoose").Schema<Pricing, import("mongoose").Model<Pricing, any, any, any, import("mongoose").Document<unknown, any, Pricing, any, {}> & Pricing & {
|
|
8
|
+
_id: import("mongoose").Types.ObjectId;
|
|
9
|
+
} & {
|
|
10
|
+
__v: number;
|
|
11
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Pricing, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Pricing>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Pricing> & {
|
|
12
|
+
_id: import("mongoose").Types.ObjectId;
|
|
13
|
+
} & {
|
|
14
|
+
__v: number;
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,41 @@
|
|
|
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.PricingSchema = exports.Pricing = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
let Pricing = class Pricing {
|
|
16
|
+
};
|
|
17
|
+
exports.Pricing = Pricing;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, mongoose_1.Prop)({ required: true, default: 0 }),
|
|
20
|
+
(0, class_validator_1.IsNumber)(),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], Pricing.prototype, "BTINF", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, mongoose_1.Prop)({ required: true, default: 0 }),
|
|
25
|
+
(0, class_validator_1.IsNumber)(),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], Pricing.prototype, "BTINFACC", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, mongoose_1.Prop)({ required: true, default: 0 }),
|
|
30
|
+
(0, class_validator_1.IsNumber)(),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], Pricing.prototype, "BTSUP", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, mongoose_1.Prop)({ required: true, default: 0 }),
|
|
35
|
+
(0, class_validator_1.IsNumber)(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], Pricing.prototype, "BTSUPACC", void 0);
|
|
38
|
+
exports.Pricing = Pricing = __decorate([
|
|
39
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
40
|
+
], Pricing);
|
|
41
|
+
exports.PricingSchema = mongoose_1.SchemaFactory.createForClass(Pricing);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Pricing } from './enssential';
|
|
2
|
+
export declare class ManagerLicenses {
|
|
3
|
+
essential: Pricing;
|
|
4
|
+
premium: Pricing;
|
|
5
|
+
standard: Pricing;
|
|
6
|
+
}
|
|
7
|
+
export declare const ManagerLicensesSchema: import("mongoose").Schema<ManagerLicenses, import("mongoose").Model<ManagerLicenses, any, any, any, import("mongoose").Document<unknown, any, ManagerLicenses, any, {}> & ManagerLicenses & {
|
|
8
|
+
_id: import("mongoose").Types.ObjectId;
|
|
9
|
+
} & {
|
|
10
|
+
__v: number;
|
|
11
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ManagerLicenses, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ManagerLicenses>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<ManagerLicenses> & {
|
|
12
|
+
_id: import("mongoose").Types.ObjectId;
|
|
13
|
+
} & {
|
|
14
|
+
__v: number;
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
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.ManagerLicensesSchema = exports.ManagerLicenses = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const enssential_1 = require("./enssential");
|
|
16
|
+
let ManagerLicenses = class ManagerLicenses {
|
|
17
|
+
};
|
|
18
|
+
exports.ManagerLicenses = ManagerLicenses;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
21
|
+
(0, class_validator_1.IsObject)(),
|
|
22
|
+
__metadata("design:type", enssential_1.Pricing)
|
|
23
|
+
], ManagerLicenses.prototype, "essential", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
26
|
+
(0, class_validator_1.IsObject)(),
|
|
27
|
+
__metadata("design:type", enssential_1.Pricing)
|
|
28
|
+
], ManagerLicenses.prototype, "premium", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
31
|
+
(0, class_validator_1.IsObject)(),
|
|
32
|
+
__metadata("design:type", enssential_1.Pricing)
|
|
33
|
+
], ManagerLicenses.prototype, "standard", void 0);
|
|
34
|
+
exports.ManagerLicenses = ManagerLicenses = __decorate([
|
|
35
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
36
|
+
], ManagerLicenses);
|
|
37
|
+
exports.ManagerLicensesSchema = mongoose_1.SchemaFactory.createForClass(ManagerLicenses);
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './core/CollectiveSite';
|
|
|
2
2
|
export * from './core/Scenario';
|
|
3
3
|
export * from './core/Site';
|
|
4
4
|
export * from './core/User';
|
|
5
|
+
export * from './core/License';
|
|
5
6
|
export * from './core/ScenarioDefaultValue';
|
|
6
7
|
export * from './core/TypeORM/analysis';
|
|
7
8
|
export * from './core/TypeORM/OkwindHistory';
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __exportStar(require("./core/CollectiveSite"), exports);
|
|
|
42
42
|
__exportStar(require("./core/Scenario"), exports);
|
|
43
43
|
__exportStar(require("./core/Site"), exports);
|
|
44
44
|
__exportStar(require("./core/User"), exports);
|
|
45
|
+
__exportStar(require("./core/License"), exports);
|
|
45
46
|
__exportStar(require("./core/ScenarioDefaultValue"), exports);
|
|
46
47
|
// TypeORM entities
|
|
47
48
|
__exportStar(require("./core/TypeORM/analysis"), exports);
|