@likewatt/models 1.55.0 → 1.57.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.
@@ -12,6 +12,7 @@ export declare class DefaultRate {
12
12
  _id: string;
13
13
  name?: string;
14
14
  userId: string;
15
+ rateId?: string;
15
16
  tarifs: Rates[];
16
17
  restOfTheYear: RestOfTheYearTarifs;
17
18
  }
@@ -57,6 +57,13 @@ __decorate([
57
57
  (0, class_validator_1.IsOptional)(),
58
58
  __metadata("design:type", String)
59
59
  ], DefaultRate.prototype, "userId", void 0);
60
+ __decorate([
61
+ (0, swagger_1.ApiProperty)(),
62
+ (0, mongoose_1.Prop)({ type: String, required: false }),
63
+ (0, class_validator_1.IsOptional)(),
64
+ (0, class_validator_1.IsString)(),
65
+ __metadata("design:type", String)
66
+ ], DefaultRate.prototype, "rateId", void 0);
60
67
  __decorate([
61
68
  (0, swagger_1.ApiProperty)({ type: [rates_1.Rates] }),
62
69
  (0, mongoose_1.Prop)({ required: true }),
@@ -169,15 +169,14 @@ export declare class Scenario {
169
169
  version?: number;
170
170
  isFullSellOut?: boolean;
171
171
  isACCScenario?: boolean;
172
+ __v?: number;
172
173
  createdAt?: Date | string;
173
174
  updatedAt?: Date | string;
174
175
  }
175
176
  export type ScenarioDocument = Scenario & Document;
176
177
  export declare const ScenarioSchema: MSchema<Scenario, import("mongoose").Model<Scenario, any, any, any, Document<unknown, any, Scenario, any, {}> & Scenario & Required<{
177
178
  _id: string;
178
- }> & {
179
- __v: number;
180
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Scenario, Document<unknown, {}, import("mongoose").FlatRecord<Scenario>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Scenario> & Required<{
179
+ }>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Scenario, Document<unknown, {}, import("mongoose").FlatRecord<Scenario>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Scenario> & Required<{
181
180
  _id: string;
182
181
  }> & {
183
182
  __v: number;
@@ -192,9 +191,7 @@ export declare class ScenarioType extends Scenario {
192
191
  export type ScenarioTypeDocument = ScenarioType & Document;
193
192
  export declare const ScenarioTypeSchema: MSchema<ScenarioType, import("mongoose").Model<ScenarioType, any, any, any, Document<unknown, any, ScenarioType, any, {}> & ScenarioType & Required<{
194
193
  _id: string;
195
- }> & {
196
- __v: number;
197
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ScenarioType, Document<unknown, {}, import("mongoose").FlatRecord<ScenarioType>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<ScenarioType> & Required<{
194
+ }>, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ScenarioType, Document<unknown, {}, import("mongoose").FlatRecord<ScenarioType>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<ScenarioType> & Required<{
198
195
  _id: string;
199
196
  }> & {
200
197
  __v: number;
@@ -602,6 +602,12 @@ __decorate([
602
602
  (0, class_validator_1.IsBoolean)(),
603
603
  __metadata("design:type", Boolean)
604
604
  ], Scenario.prototype, "isACCScenario", void 0);
605
+ __decorate([
606
+ (0, swagger_1.ApiPropertyOptional)(),
607
+ (0, class_validator_1.IsOptional)(),
608
+ (0, class_validator_1.IsNumber)(),
609
+ __metadata("design:type", Number)
610
+ ], Scenario.prototype, "__v", void 0);
605
611
  __decorate([
606
612
  (0, swagger_1.ApiPropertyOptional)({ example: '2025-04-24T14:05:00.000Z' }),
607
613
  (0, class_validator_1.IsOptional)(),
@@ -72,13 +72,13 @@ export declare class User {
72
72
  password: string;
73
73
  firstname: string;
74
74
  folders: Folder[];
75
- managerLicenses: ManagerLicenses;
76
- managerLicensesUsed: ManagerLicenses;
77
- renewLicense: object;
75
+ managerLicenses?: ManagerLicenses;
76
+ managerLicensesUsed?: ManagerLicenses;
77
+ renewLicense?: object;
78
78
  defaultRates: string[];
79
79
  defaultScenarios: string[];
80
80
  lastname: string;
81
- usersList: UsersList[];
81
+ usersList?: UsersList[];
82
82
  phone?: string;
83
83
  company?: string;
84
84
  organization?: string;
@@ -117,8 +117,8 @@ export declare class User {
117
117
  webhook?: WebhookParams;
118
118
  tokenData?: tokenData;
119
119
  _lastConnected?: string;
120
- startDate?: Date;
121
- endDate?: Date;
120
+ startDate?: Date | string;
121
+ endDate?: Date | string;
122
122
  stripeCustomerId?: string;
123
123
  hasLeads?: boolean;
124
124
  }
package/dist/core/User.js CHANGED
@@ -201,19 +201,19 @@ __decorate([
201
201
  __decorate([
202
202
  (0, swagger_1.ApiProperty)({ type: manager_licenses_1.ManagerLicenses }),
203
203
  (0, mongoose_1.Prop)({ type: [folder_model_1.FolderSchema] }),
204
- (0, class_validator_1.IsObject)(),
204
+ (0, class_validator_1.IsOptional)(),
205
205
  __metadata("design:type", manager_licenses_1.ManagerLicenses)
206
206
  ], User.prototype, "managerLicenses", void 0);
207
207
  __decorate([
208
208
  (0, swagger_1.ApiProperty)({ type: manager_licenses_1.ManagerLicenses }),
209
209
  (0, mongoose_1.Prop)({ type: [folder_model_1.FolderSchema] }),
210
- (0, class_validator_1.IsObject)(),
210
+ (0, class_validator_1.IsOptional)(),
211
211
  __metadata("design:type", manager_licenses_1.ManagerLicenses)
212
212
  ], User.prototype, "managerLicensesUsed", void 0);
213
213
  __decorate([
214
214
  (0, swagger_1.ApiProperty)({ type: Object }),
215
215
  (0, mongoose_1.Prop)({ type: [Object] }),
216
- (0, class_validator_1.IsObject)(),
216
+ (0, class_validator_1.IsOptional)(),
217
217
  __metadata("design:type", Object)
218
218
  ], User.prototype, "renewLicense", void 0);
219
219
  __decorate([
@@ -240,7 +240,8 @@ __decorate([
240
240
  __decorate([
241
241
  (0, swagger_1.ApiProperty)({ type: [users_list_1.UsersList] }),
242
242
  (0, mongoose_1.Prop)({ type: [users_list_1.UsersListSchema], required: true, default: [] }),
243
- (0, class_validator_1.IsObject)(),
243
+ (0, class_validator_1.IsOptional)(),
244
+ (0, class_validator_1.IsArray)(),
244
245
  __metadata("design:type", Array)
245
246
  ], User.prototype, "usersList", void 0);
246
247
  __decorate([
@@ -631,14 +632,14 @@ __decorate([
631
632
  __decorate([
632
633
  (0, swagger_1.ApiProperty)(),
633
634
  (0, mongoose_1.Prop)({ type: Date, required: false }),
634
- (0, class_validator_1.IsDate)(),
635
- __metadata("design:type", Date)
635
+ (0, class_validator_1.IsOptional)(),
636
+ __metadata("design:type", Object)
636
637
  ], User.prototype, "startDate", void 0);
637
638
  __decorate([
638
639
  (0, swagger_1.ApiProperty)(),
639
640
  (0, mongoose_1.Prop)({ type: Date, required: false }),
640
- (0, class_validator_1.IsDate)(),
641
- __metadata("design:type", Date)
641
+ (0, class_validator_1.IsOptional)(),
642
+ __metadata("design:type", Object)
642
643
  ], User.prototype, "endDate", void 0);
643
644
  __decorate([
644
645
  (0, swagger_1.ApiProperty)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.55.0",
3
+ "version": "1.57.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {