@likewatt/models 1.58.1 → 1.60.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.
@@ -9,6 +9,7 @@ import { RestOfTheYearTarifs } from './internal/rest-of-the-years-tarif';
9
9
  import { DataSourceHistory } from './internal/data-source-history';
10
10
  import { EnergyPriceTempo } from './internal/energy-price-tempo.model';
11
11
  import { BuildingDataStatus } from './enums/BuildingDataStatus';
12
+ import { RetryHint } from './enums/RetryHint';
12
13
  import { Comments } from './internal/comments';
13
14
  import { Rates } from './internal/rates';
14
15
  export declare class Site {
@@ -40,6 +41,8 @@ export declare class Site {
40
41
  startDate?: Date | string;
41
42
  endDate?: Date | string;
42
43
  automaticUpdateError?: string | null;
44
+ automaticUpdateErrorHint?: RetryHint | null;
45
+ automaticUpdateRetryAt?: Date | null;
43
46
  scenario?: string;
44
47
  user?: string;
45
48
  profile?: Profiles;
package/dist/core/Site.js CHANGED
@@ -24,6 +24,7 @@ const rest_of_the_years_tarif_1 = require("./internal/rest-of-the-years-tarif");
24
24
  const data_source_history_1 = require("./internal/data-source-history");
25
25
  const energy_price_tempo_model_1 = require("./internal/energy-price-tempo.model");
26
26
  const BuildingDataStatus_1 = require("./enums/BuildingDataStatus");
27
+ const RetryHint_1 = require("./enums/RetryHint");
27
28
  const comments_1 = require("./internal/comments");
28
29
  const rates_1 = require("./internal/rates");
29
30
  let Site = class Site {
@@ -217,6 +218,20 @@ __decorate([
217
218
  (0, class_validator_1.IsString)(),
218
219
  __metadata("design:type", Object)
219
220
  ], Site.prototype, "automaticUpdateError", void 0);
221
+ __decorate([
222
+ (0, swagger_1.ApiPropertyOptional)({ enum: RetryHint_1.RetryHint }),
223
+ (0, mongoose_1.Prop)({ type: String, enum: RetryHint_1.RetryHint, required: false }),
224
+ (0, class_validator_1.IsOptional)(),
225
+ (0, class_validator_1.IsEnum)(RetryHint_1.RetryHint),
226
+ __metadata("design:type", Object)
227
+ ], Site.prototype, "automaticUpdateErrorHint", void 0);
228
+ __decorate([
229
+ (0, swagger_1.ApiPropertyOptional)(),
230
+ (0, mongoose_1.Prop)({ type: Date, required: false }),
231
+ (0, class_validator_1.IsOptional)(),
232
+ (0, class_validator_1.IsDate)(),
233
+ __metadata("design:type", Object)
234
+ ], Site.prototype, "automaticUpdateRetryAt", void 0);
220
235
  __decorate([
221
236
  (0, swagger_1.ApiPropertyOptional)(),
222
237
  (0, mongoose_1.Prop)({ type: String, ref: 'Scenario' }),
@@ -2,6 +2,10 @@ export declare class UserFilters {
2
2
  id: string;
3
3
  fullName: string;
4
4
  email: string;
5
+ isActive: boolean;
6
+ isAdmin: boolean;
7
+ principalUser?: string | null;
8
+ company?: string | null;
5
9
  createdOn?: Date;
6
10
  updatedOn?: Date;
7
11
  }
@@ -15,17 +15,35 @@ let UserFilters = class UserFilters {
15
15
  };
16
16
  exports.UserFilters = UserFilters;
17
17
  __decorate([
18
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
18
+ (0, typeorm_1.PrimaryColumn)({ type: 'varchar', length: 36 }),
19
19
  __metadata("design:type", String)
20
20
  ], UserFilters.prototype, "id", void 0);
21
21
  __decorate([
22
- (0, typeorm_1.Column)({ nullable: false }),
22
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
23
23
  __metadata("design:type", String)
24
24
  ], UserFilters.prototype, "fullName", void 0);
25
25
  __decorate([
26
- (0, typeorm_1.Column)({ nullable: false }),
26
+ (0, typeorm_1.Index)(),
27
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
27
28
  __metadata("design:type", String)
28
29
  ], UserFilters.prototype, "email", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'boolean', default: true }),
32
+ __metadata("design:type", Boolean)
33
+ ], UserFilters.prototype, "isActive", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'boolean', default: false }),
36
+ __metadata("design:type", Boolean)
37
+ ], UserFilters.prototype, "isAdmin", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Index)(),
40
+ (0, typeorm_1.Column)({ type: 'varchar', length: 36, nullable: true }),
41
+ __metadata("design:type", Object)
42
+ ], UserFilters.prototype, "principalUser", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
45
+ __metadata("design:type", Object)
46
+ ], UserFilters.prototype, "company", void 0);
29
47
  __decorate([
30
48
  (0, typeorm_1.CreateDateColumn)(),
31
49
  __metadata("design:type", Date)
@@ -0,0 +1,5 @@
1
+ export declare enum RetryHint {
2
+ RETRY_SHORT = "retry_short",
3
+ RETRY_LONG = "retry_long",
4
+ UNRECOVERABLE = "unrecoverable"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetryHint = void 0;
4
+ var RetryHint;
5
+ (function (RetryHint) {
6
+ RetryHint["RETRY_SHORT"] = "retry_short";
7
+ RetryHint["RETRY_LONG"] = "retry_long";
8
+ RetryHint["UNRECOVERABLE"] = "unrecoverable";
9
+ })(RetryHint || (exports.RetryHint = RetryHint = {}));
@@ -0,0 +1,8 @@
1
+ import { RetryHint } from '../enums/RetryHint';
2
+ export interface MicroserviceErrorPayload {
3
+ statusCode: number;
4
+ message: string;
5
+ errorCode?: string;
6
+ source?: string;
7
+ retryHint: RetryHint;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.d.ts CHANGED
@@ -31,6 +31,8 @@ export * from './core/internal/enums';
31
31
  export * from './core/enums/BuildingDataStatus';
32
32
  export * from './core/enums/FileType';
33
33
  export * from './core/enums/ImageryQuality';
34
+ export * from './core/enums/RetryHint';
35
+ export * from './core/internal/microservice-error';
34
36
  export * from './core/internal/battery-params';
35
37
  export * from './core/internal/bounding-box';
36
38
  export * from './core/internal/building-data';
package/dist/index.js CHANGED
@@ -54,6 +54,9 @@ __exportStar(require("./core/internal/enums"), exports);
54
54
  __exportStar(require("./core/enums/BuildingDataStatus"), exports);
55
55
  __exportStar(require("./core/enums/FileType"), exports);
56
56
  __exportStar(require("./core/enums/ImageryQuality"), exports);
57
+ __exportStar(require("./core/enums/RetryHint"), exports);
58
+ // Error types
59
+ __exportStar(require("./core/internal/microservice-error"), exports);
57
60
  // Sub-models
58
61
  __exportStar(require("./core/internal/battery-params"), exports);
59
62
  __exportStar(require("./core/internal/bounding-box"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.58.1",
3
+ "version": "1.60.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {