@likewatt/models 1.0.86 → 1.0.88

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.
@@ -2,7 +2,7 @@ export declare class WebhookLog {
2
2
  id: number;
3
3
  endpoint: string;
4
4
  requestBody: string;
5
- responseBody: string;
5
+ responseBody?: string;
6
6
  responseStatus: number;
7
7
  createdOn?: Date;
8
8
  updatedOn?: Date;
package/dist/core/User.js CHANGED
@@ -52,7 +52,7 @@ __decorate([
52
52
  description: "Indique si l'utilisateur peut supprimer un site",
53
53
  example: true,
54
54
  }),
55
- (0, mongoose_2.Prop)({ type: Boolean, required: true }),
55
+ (0, mongoose_2.Prop)({ type: Boolean, required: true, default: false }),
56
56
  (0, class_validator_1.IsBoolean)(),
57
57
  __metadata("design:type", Boolean)
58
58
  ], Rights.prototype, "deleteSite", void 0);
@@ -61,7 +61,7 @@ __decorate([
61
61
  description: "Indique si l'utilisateur peut supprimer des sites",
62
62
  example: true,
63
63
  }),
64
- (0, mongoose_2.Prop)({ type: Boolean, required: true }),
64
+ (0, mongoose_2.Prop)({ type: Boolean, required: true, default: false }),
65
65
  (0, class_validator_1.IsBoolean)(),
66
66
  __metadata("design:type", Boolean)
67
67
  ], Rights.prototype, "deleteSites", void 0);
@@ -504,7 +504,11 @@ __decorate([
504
504
  description: 'Droits spécifiques de l’utilisateur',
505
505
  type: () => Rights,
506
506
  }),
507
- (0, mongoose_2.Prop)({ type: exports.RightsSchema, _id: false }),
507
+ (0, mongoose_2.Prop)({
508
+ type: exports.RightsSchema,
509
+ _id: false,
510
+ default: { deleteSite: false, deleteSites: false },
511
+ }),
508
512
  __metadata("design:type", Rights)
509
513
  ], User.prototype, "rights", void 0);
510
514
  __decorate([
@@ -0,0 +1,9 @@
1
+ export declare class WebhookLeadsOutput {
2
+ firstname?: string;
3
+ lastname?: string;
4
+ zip?: string;
5
+ address?: string;
6
+ city?: string;
7
+ email?: string;
8
+ phone?: string;
9
+ }
@@ -0,0 +1,51 @@
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.WebhookLeadsOutput = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class WebhookLeadsOutput {
15
+ }
16
+ exports.WebhookLeadsOutput = WebhookLeadsOutput;
17
+ __decorate([
18
+ (0, class_validator_1.IsOptional)(),
19
+ (0, class_validator_1.IsString)(),
20
+ __metadata("design:type", String)
21
+ ], WebhookLeadsOutput.prototype, "firstname", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsOptional)(),
24
+ (0, class_validator_1.IsString)(),
25
+ __metadata("design:type", String)
26
+ ], WebhookLeadsOutput.prototype, "lastname", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsOptional)(),
29
+ (0, class_validator_1.IsString)(),
30
+ __metadata("design:type", String)
31
+ ], WebhookLeadsOutput.prototype, "zip", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsOptional)(),
34
+ (0, class_validator_1.IsString)(),
35
+ __metadata("design:type", String)
36
+ ], WebhookLeadsOutput.prototype, "address", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsOptional)(),
39
+ (0, class_validator_1.IsString)(),
40
+ __metadata("design:type", String)
41
+ ], WebhookLeadsOutput.prototype, "city", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_validator_1.IsEmail)(),
45
+ __metadata("design:type", String)
46
+ ], WebhookLeadsOutput.prototype, "email", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.IsOptional)(),
49
+ (0, class_validator_1.IsString)(),
50
+ __metadata("design:type", String)
51
+ ], WebhookLeadsOutput.prototype, "phone", void 0);
@@ -0,0 +1,5 @@
1
+ export declare class WebhookOptimEndOutput {
2
+ uuid?: string;
3
+ solution?: string;
4
+ optimization_results?: string;
5
+ }
@@ -0,0 +1,28 @@
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.WebhookOptimEndOutput = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class WebhookOptimEndOutput {
15
+ }
16
+ exports.WebhookOptimEndOutput = WebhookOptimEndOutput;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ __metadata("design:type", String)
20
+ ], WebhookOptimEndOutput.prototype, "uuid", void 0);
21
+ __decorate([
22
+ (0, class_validator_1.IsString)(),
23
+ __metadata("design:type", String)
24
+ ], WebhookOptimEndOutput.prototype, "solution", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ __metadata("design:type", String)
28
+ ], WebhookOptimEndOutput.prototype, "optimization_results", void 0);
@@ -39,7 +39,7 @@ export interface User {
39
39
  optim_scenario_consumer: string[];
40
40
  synthesis_fi: string[];
41
41
  siteTag: SiteTag;
42
- rights?: Rights;
42
+ rights: Rights;
43
43
  _createdAt?: string;
44
44
  _lastConnected?: string;
45
45
  createdAt?: Date | string;
package/dist/index.d.ts CHANGED
@@ -64,3 +64,5 @@ export * from './core/internal/subscription-rate.model';
64
64
  export * from './core/internal/tarif';
65
65
  export * from './core/internal/folder.model';
66
66
  export * as FrontendTypes from './frontend';
67
+ export * from './core/webhookTypes/webhook-leads-output.dto';
68
+ export * from './core/webhookTypes/webhook-optimend-output.dto';
package/dist/index.js CHANGED
@@ -111,3 +111,6 @@ __exportStar(require("./core/internal/tarif"), exports);
111
111
  __exportStar(require("./core/internal/folder.model"), exports);
112
112
  // Frontend types (sans décorateurs)
113
113
  exports.FrontendTypes = __importStar(require("./frontend"));
114
+ // Webhook types
115
+ __exportStar(require("./core/webhookTypes/webhook-leads-output.dto"), exports);
116
+ __exportStar(require("./core/webhookTypes/webhook-optimend-output.dto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.0.86",
3
+ "version": "1.0.88",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {