@likewatt/models 1.93.1 → 1.95.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.
package/dist/core/Scenario.d.ts
CHANGED
|
@@ -47,9 +47,26 @@ export declare const DemandMultiplierSlotSchema: MSchema<DemandMultiplierSlot, i
|
|
|
47
47
|
} & {
|
|
48
48
|
__v: number;
|
|
49
49
|
}>;
|
|
50
|
+
export declare class DistributionKeyValue {
|
|
51
|
+
days: number[];
|
|
52
|
+
distributionKey: number;
|
|
53
|
+
endHour?: string;
|
|
54
|
+
id: string;
|
|
55
|
+
months?: Month[];
|
|
56
|
+
startHour?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare const DistributionKeyValueSchema: MSchema<DistributionKeyValue, import("mongoose").Model<DistributionKeyValue, any, any, any, Document<unknown, any, DistributionKeyValue, any, {}> & DistributionKeyValue & {
|
|
59
|
+
_id: import("mongoose").Types.ObjectId;
|
|
60
|
+
} & {
|
|
61
|
+
__v: number;
|
|
62
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DistributionKeyValue, Document<unknown, {}, import("mongoose").FlatRecord<DistributionKeyValue>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<DistributionKeyValue> & {
|
|
63
|
+
_id: import("mongoose").Types.ObjectId;
|
|
64
|
+
} & {
|
|
65
|
+
__v: number;
|
|
66
|
+
}>;
|
|
50
67
|
export declare class DistributionKey {
|
|
51
68
|
type?: string;
|
|
52
|
-
values?:
|
|
69
|
+
values?: DistributionKeyValue[];
|
|
53
70
|
}
|
|
54
71
|
export declare const DistributionKeySchema: MSchema<DistributionKey, import("mongoose").Model<DistributionKey, any, any, any, Document<unknown, any, DistributionKey, any, {}> & DistributionKey & {
|
|
55
72
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -130,7 +147,7 @@ export declare class ConfigSite {
|
|
|
130
147
|
demandMultiplier?: number;
|
|
131
148
|
demandMultiplierSlots?: DemandMultiplierSlot[];
|
|
132
149
|
demandMultiplierUnit?: string;
|
|
133
|
-
distributionKey?: DistributionKey
|
|
150
|
+
distributionKey?: DistributionKey;
|
|
134
151
|
priorityStage?: number;
|
|
135
152
|
rateOfGrowth?: RateOfGrowth[];
|
|
136
153
|
settings?: Record<string, unknown>;
|
package/dist/core/Scenario.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.ScenarioTypeSchema = exports.ScenarioType = exports.ScenarioSchema = exports.Scenario = exports.ConfigSiteSchema = exports.ConfigSite = exports.ConfigScenarioSchema = exports.ConfigScenario = exports.PvSchema = exports.Pv = exports.TechnologySchema = exports.Technology = exports.RateOfGrowthSchema = exports.RateOfGrowth = exports.DistributionKeySchema = exports.DistributionKey = exports.DemandMultiplierSlotSchema = exports.DemandMultiplierSlot = exports.MonthSchema = exports.Month = exports.ObjectiveSchema = exports.Objective = void 0;
|
|
12
|
+
exports.ScenarioTypeSchema = exports.ScenarioType = exports.ScenarioSchema = exports.Scenario = exports.ConfigSiteSchema = exports.ConfigSite = exports.ConfigScenarioSchema = exports.ConfigScenario = exports.PvSchema = exports.Pv = exports.TechnologySchema = exports.Technology = exports.RateOfGrowthSchema = exports.RateOfGrowth = exports.DistributionKeySchema = exports.DistributionKey = exports.DistributionKeyValueSchema = exports.DistributionKeyValue = exports.DemandMultiplierSlotSchema = exports.DemandMultiplierSlot = exports.MonthSchema = exports.Month = exports.ObjectiveSchema = exports.Objective = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
const uuid_1 = require("uuid");
|
|
@@ -138,6 +138,51 @@ exports.DemandMultiplierSlot = DemandMultiplierSlot = __decorate([
|
|
|
138
138
|
(0, mongoose_1.Schema)({ _id: false })
|
|
139
139
|
], DemandMultiplierSlot);
|
|
140
140
|
exports.DemandMultiplierSlotSchema = mongoose_1.SchemaFactory.createForClass(DemandMultiplierSlot);
|
|
141
|
+
let DistributionKeyValue = class DistributionKeyValue {
|
|
142
|
+
};
|
|
143
|
+
exports.DistributionKeyValue = DistributionKeyValue;
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, swagger_1.ApiProperty)({ example: [1, 2, 3, 4, 5, 6, 7] }),
|
|
146
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
147
|
+
(0, class_validator_1.IsArray)(),
|
|
148
|
+
__metadata("design:type", Array)
|
|
149
|
+
], DistributionKeyValue.prototype, "days", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, swagger_1.ApiProperty)({ example: 0 }),
|
|
152
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
153
|
+
(0, class_validator_1.IsNumber)(),
|
|
154
|
+
__metadata("design:type", Number)
|
|
155
|
+
], DistributionKeyValue.prototype, "distributionKey", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, swagger_1.ApiPropertyOptional)({ example: '00:00' }),
|
|
158
|
+
(0, mongoose_1.Prop)(),
|
|
159
|
+
(0, class_validator_1.IsOptional)(),
|
|
160
|
+
(0, class_validator_1.IsString)(),
|
|
161
|
+
__metadata("design:type", String)
|
|
162
|
+
], DistributionKeyValue.prototype, "endHour", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, swagger_1.ApiProperty)({ example: 'ee8e4d76-ed7c-4ee5-9e8f-be3584fa37f9' }),
|
|
165
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
166
|
+
(0, class_validator_1.IsString)(),
|
|
167
|
+
__metadata("design:type", String)
|
|
168
|
+
], DistributionKeyValue.prototype, "id", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
(0, swagger_1.ApiProperty)({ type: [Month] }),
|
|
171
|
+
(0, mongoose_1.Prop)({ type: [exports.MonthSchema], required: true }),
|
|
172
|
+
(0, class_validator_1.IsArray)(),
|
|
173
|
+
__metadata("design:type", Array)
|
|
174
|
+
], DistributionKeyValue.prototype, "months", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, swagger_1.ApiPropertyOptional)({ example: '00:00' }),
|
|
177
|
+
(0, mongoose_1.Prop)(),
|
|
178
|
+
(0, class_validator_1.IsOptional)(),
|
|
179
|
+
(0, class_validator_1.IsString)(),
|
|
180
|
+
__metadata("design:type", String)
|
|
181
|
+
], DistributionKeyValue.prototype, "startHour", void 0);
|
|
182
|
+
exports.DistributionKeyValue = DistributionKeyValue = __decorate([
|
|
183
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
184
|
+
], DistributionKeyValue);
|
|
185
|
+
exports.DistributionKeyValueSchema = mongoose_1.SchemaFactory.createForClass(DistributionKeyValue);
|
|
141
186
|
let DistributionKey = class DistributionKey {
|
|
142
187
|
};
|
|
143
188
|
exports.DistributionKey = DistributionKey;
|
|
@@ -149,10 +194,12 @@ __decorate([
|
|
|
149
194
|
__metadata("design:type", String)
|
|
150
195
|
], DistributionKey.prototype, "type", void 0);
|
|
151
196
|
__decorate([
|
|
152
|
-
(0, swagger_1.ApiProperty)({ example: [] }),
|
|
153
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
197
|
+
(0, swagger_1.ApiProperty)({ type: [DistributionKeyValue], example: [] }),
|
|
198
|
+
(0, mongoose_1.Prop)({ type: [exports.DistributionKeyValueSchema], required: false }),
|
|
154
199
|
(0, class_validator_1.IsOptional)(),
|
|
155
200
|
(0, class_validator_1.IsArray)(),
|
|
201
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
202
|
+
(0, class_transformer_1.Type)(() => DistributionKeyValue),
|
|
156
203
|
__metadata("design:type", Array)
|
|
157
204
|
], DistributionKey.prototype, "values", void 0);
|
|
158
205
|
exports.DistributionKey = DistributionKey = __decorate([
|
|
@@ -371,15 +418,15 @@ __decorate([
|
|
|
371
418
|
__metadata("design:type", String)
|
|
372
419
|
], ConfigSite.prototype, "demandMultiplierUnit", void 0);
|
|
373
420
|
__decorate([
|
|
374
|
-
(0, swagger_1.ApiProperty)({ type:
|
|
421
|
+
(0, swagger_1.ApiProperty)({ type: DistributionKey, required: false }),
|
|
375
422
|
(0, mongoose_1.Prop)({
|
|
376
|
-
type:
|
|
423
|
+
type: exports.DistributionKeySchema,
|
|
377
424
|
required: false,
|
|
378
425
|
default: undefined,
|
|
379
426
|
}),
|
|
380
427
|
(0, class_validator_1.IsOptional)(),
|
|
381
|
-
(0, class_validator_1.
|
|
382
|
-
__metadata("design:type",
|
|
428
|
+
(0, class_validator_1.IsObject)(),
|
|
429
|
+
__metadata("design:type", DistributionKey)
|
|
383
430
|
], ConfigSite.prototype, "distributionKey", void 0);
|
|
384
431
|
__decorate([
|
|
385
432
|
(0, swagger_1.ApiPropertyOptional)({ example: 1 }),
|
|
@@ -0,0 +1,53 @@
|
|
|
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.AuthAuditLog = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let AuthAuditLog = class AuthAuditLog {
|
|
15
|
+
};
|
|
16
|
+
exports.AuthAuditLog = AuthAuditLog;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint' }),
|
|
19
|
+
__metadata("design:type", Number)
|
|
20
|
+
], AuthAuditLog.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)({ name: 'user_id', type: 'varchar', length: 64, nullable: false }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], AuthAuditLog.prototype, "userId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 48, nullable: false }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], AuthAuditLog.prototype, "event", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 45, nullable: true }),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], AuthAuditLog.prototype, "ip", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({
|
|
35
|
+
name: 'user_agent',
|
|
36
|
+
type: 'varchar',
|
|
37
|
+
length: 255,
|
|
38
|
+
nullable: true,
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], AuthAuditLog.prototype, "userAgent", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], AuthAuditLog.prototype, "metadata", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
48
|
+
__metadata("design:type", Date)
|
|
49
|
+
], AuthAuditLog.prototype, "createdAt", void 0);
|
|
50
|
+
exports.AuthAuditLog = AuthAuditLog = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)('auth_audit_log'),
|
|
52
|
+
(0, typeorm_1.Index)('idx_user_created', ['userId', 'createdAt'])
|
|
53
|
+
], AuthAuditLog);
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from './core/Leads';
|
|
|
13
13
|
export * from './core/Regex';
|
|
14
14
|
export * from './core/InfoBanner';
|
|
15
15
|
export * from './core/TypeORM/analysis';
|
|
16
|
+
export * from './core/TypeORM/AuthAuditLog';
|
|
16
17
|
export * from './core/TypeORM/Co2History';
|
|
17
18
|
export * from './core/TypeORM/EnedisReportHistory';
|
|
18
19
|
export * from './core/TypeORM/FcrData';
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ __exportStar(require("./core/Regex"), exports);
|
|
|
32
32
|
__exportStar(require("./core/InfoBanner"), exports);
|
|
33
33
|
// TypeORM entities
|
|
34
34
|
__exportStar(require("./core/TypeORM/analysis"), exports);
|
|
35
|
+
__exportStar(require("./core/TypeORM/AuthAuditLog"), exports);
|
|
35
36
|
__exportStar(require("./core/TypeORM/Co2History"), exports);
|
|
36
37
|
__exportStar(require("./core/TypeORM/EnedisReportHistory"), exports);
|
|
37
38
|
__exportStar(require("./core/TypeORM/FcrData"), exports);
|