@likewatt/models 1.76.0 → 1.77.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.
@@ -1,4 +1,4 @@
1
- import { Document, Types } from 'mongoose';
1
+ import { Document } from 'mongoose';
2
2
  import { User } from './User';
3
3
  /**
4
4
  * Représente un utilisateur dans le système.
@@ -8,7 +8,7 @@ import { User } from './User';
8
8
  * - class-validator rules : validation runtime
9
9
  */
10
10
  export declare class Consent {
11
- _id: Types.ObjectId;
11
+ readonly _id: string;
12
12
  companyName: string;
13
13
  contractConsent: boolean;
14
14
  courbeConsent: boolean;
@@ -25,11 +25,11 @@ export declare class Consent {
25
25
  }
26
26
  export type ConsentDocument = Consent & Document;
27
27
  export declare const ConsentSchema: import("mongoose").Schema<Consent, import("mongoose").Model<Consent, any, any, any, Document<unknown, any, Consent, any, {}> & Consent & Required<{
28
- _id: Types.ObjectId;
28
+ _id: string;
29
29
  }> & {
30
30
  __v: number;
31
31
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Consent, Document<unknown, {}, import("mongoose").FlatRecord<Consent>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Consent> & Required<{
32
- _id: Types.ObjectId;
32
+ _id: string;
33
33
  }> & {
34
34
  __v: number;
35
35
  }>;
@@ -10,9 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ConsentSchema = exports.Consent = void 0;
13
- const mongoose_1 = require("mongoose");
14
13
  const swagger_1 = require("@nestjs/swagger");
15
- const mongoose_2 = require("@nestjs/mongoose");
14
+ const mongoose_1 = require("@nestjs/mongoose");
16
15
  const class_validator_1 = require("class-validator");
17
16
  const User_1 = require("./User");
18
17
  /**
@@ -27,19 +26,20 @@ let Consent = class Consent {
27
26
  exports.Consent = Consent;
28
27
  __decorate([
29
28
  (0, swagger_1.ApiProperty)({
30
- description: 'Identifiant unique MongoDB',
29
+ description: 'Identifiant unique (UUID ou custom string)',
31
30
  example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
32
- type: mongoose_1.Types.ObjectId,
31
+ type: String,
33
32
  readOnly: true,
34
33
  }),
35
- __metadata("design:type", mongoose_1.Types.ObjectId)
34
+ (0, mongoose_1.Prop)({ type: String }),
35
+ __metadata("design:type", String)
36
36
  ], Consent.prototype, "_id", void 0);
37
37
  __decorate([
38
38
  (0, swagger_1.ApiProperty)({
39
39
  description: 'Nom de l’entreprise',
40
40
  example: 'Example Company',
41
41
  }),
42
- (0, mongoose_2.Prop)({ type: String, required: true }),
42
+ (0, mongoose_1.Prop)({ type: String, required: true }),
43
43
  (0, class_validator_1.IsString)(),
44
44
  __metadata("design:type", String)
45
45
  ], Consent.prototype, "companyName", void 0);
@@ -48,7 +48,7 @@ __decorate([
48
48
  description: 'Consentement pour le contrat',
49
49
  example: true,
50
50
  }),
51
- (0, mongoose_2.Prop)({ type: Boolean, required: false, default: false }),
51
+ (0, mongoose_1.Prop)({ type: Boolean, required: false, default: false }),
52
52
  (0, class_validator_1.IsOptional)(),
53
53
  (0, class_validator_1.IsBoolean)(),
54
54
  __metadata("design:type", Boolean)
@@ -58,7 +58,7 @@ __decorate([
58
58
  description: 'Consentement pour la courbe de charge',
59
59
  example: true,
60
60
  }),
61
- (0, mongoose_2.Prop)({ type: Boolean, required: false, default: false }),
61
+ (0, mongoose_1.Prop)({ type: Boolean, required: false, default: false }),
62
62
  (0, class_validator_1.IsOptional)(),
63
63
  (0, class_validator_1.IsBoolean)(),
64
64
  __metadata("design:type", Boolean)
@@ -68,7 +68,7 @@ __decorate([
68
68
  description: 'Client associé au consentement',
69
69
  example: 'user@example.com',
70
70
  }),
71
- (0, mongoose_2.Prop)({ type: String, required: true }),
71
+ (0, mongoose_1.Prop)({ type: String, required: true }),
72
72
  (0, class_validator_1.IsObject)(),
73
73
  __metadata("design:type", User_1.User)
74
74
  ], Consent.prototype, "user", void 0);
@@ -77,7 +77,7 @@ __decorate([
77
77
  description: 'Date du consentement',
78
78
  example: '2023-01-01T00:00:00Z',
79
79
  }),
80
- (0, mongoose_2.Prop)({ type: Date, required: false }),
80
+ (0, mongoose_1.Prop)({ type: Date, required: false }),
81
81
  (0, class_validator_1.IsOptional)(),
82
82
  __metadata("design:type", Date)
83
83
  ], Consent.prototype, "date", void 0);
@@ -86,7 +86,7 @@ __decorate([
86
86
  description: 'Adresse e-mail de l’utilisateur',
87
87
  example: 'user@example.com',
88
88
  }),
89
- (0, mongoose_2.Prop)({ type: String, required: true }),
89
+ (0, mongoose_1.Prop)({ type: String, required: true }),
90
90
  (0, class_validator_1.IsString)(),
91
91
  __metadata("design:type", String)
92
92
  ], Consent.prototype, "email", void 0);
@@ -95,7 +95,7 @@ __decorate([
95
95
  description: 'Buffer Enedis',
96
96
  example: 'https://example.com/logo.png',
97
97
  }),
98
- (0, mongoose_2.Prop)({ type: String, required: true }),
98
+ (0, mongoose_1.Prop)({ type: String, required: true }),
99
99
  (0, class_validator_1.IsString)(),
100
100
  __metadata("design:type", String)
101
101
  ], Consent.prototype, "enedisNumber", void 0);
@@ -104,7 +104,7 @@ __decorate([
104
104
  description: 'Prénom de l’utilisateur',
105
105
  example: 'https://example.com/logo.png',
106
106
  }),
107
- (0, mongoose_2.Prop)({ type: String, required: true }),
107
+ (0, mongoose_1.Prop)({ type: String, required: true }),
108
108
  (0, class_validator_1.IsString)(),
109
109
  __metadata("design:type", String)
110
110
  ], Consent.prototype, "firstname", void 0);
@@ -113,7 +113,7 @@ __decorate([
113
113
  description: 'Consentement pour l’indexation',
114
114
  example: false,
115
115
  }),
116
- (0, mongoose_2.Prop)({ type: Boolean, required: false, default: false }),
116
+ (0, mongoose_1.Prop)({ type: Boolean, required: false, default: false }),
117
117
  (0, class_validator_1.IsOptional)(),
118
118
  (0, class_validator_1.IsBoolean)(),
119
119
  __metadata("design:type", Boolean)
@@ -123,7 +123,7 @@ __decorate([
123
123
  description: 'Nom de l’utilisateur',
124
124
  example: 'https://example.com/logo.png',
125
125
  }),
126
- (0, mongoose_2.Prop)({ type: String, required: true }),
126
+ (0, mongoose_1.Prop)({ type: String, required: true }),
127
127
  (0, class_validator_1.IsString)(),
128
128
  __metadata("design:type", String)
129
129
  ], Consent.prototype, "lastname", void 0);
@@ -132,7 +132,7 @@ __decorate([
132
132
  description: 'Logo utilisateur',
133
133
  example: 'https://example.com/logo.png',
134
134
  }),
135
- (0, mongoose_2.Prop)({ type: String, required: false }),
135
+ (0, mongoose_1.Prop)({ type: String, required: false }),
136
136
  (0, class_validator_1.IsOptional)(),
137
137
  (0, class_validator_1.IsString)(),
138
138
  __metadata("design:type", String)
@@ -142,7 +142,7 @@ __decorate([
142
142
  description: 'Consentement pour la mesure d’audience',
143
143
  example: true,
144
144
  }),
145
- (0, mongoose_2.Prop)({ type: Boolean, required: false, default: false }),
145
+ (0, mongoose_1.Prop)({ type: Boolean, required: false, default: false }),
146
146
  (0, class_validator_1.IsOptional)(),
147
147
  (0, class_validator_1.IsBoolean)(),
148
148
  __metadata("design:type", Boolean)
@@ -152,16 +152,16 @@ __decorate([
152
152
  description: 'Identifiant du site',
153
153
  example: 'site-12345',
154
154
  }),
155
- (0, mongoose_2.Prop)({ type: String, required: true }),
155
+ (0, mongoose_1.Prop)({ type: String, required: true }),
156
156
  (0, class_validator_1.IsString)(),
157
157
  __metadata("design:type", String)
158
158
  ], Consent.prototype, "siteId", void 0);
159
159
  exports.Consent = Consent = __decorate([
160
- (0, mongoose_2.Schema)({
160
+ (0, mongoose_1.Schema)({
161
161
  id: false,
162
162
  timestamps: true,
163
163
  toJSON: { virtuals: true, versionKey: false },
164
164
  toObject: { virtuals: true, versionKey: false },
165
165
  })
166
166
  ], Consent);
167
- exports.ConsentSchema = mongoose_2.SchemaFactory.createForClass(Consent);
167
+ exports.ConsentSchema = mongoose_1.SchemaFactory.createForClass(Consent);
@@ -682,7 +682,10 @@ __decorate([
682
682
  __metadata("design:type", Boolean)
683
683
  ], ScenarioType.prototype, "isLeads", void 0);
684
684
  __decorate([
685
- (0, swagger_1.ApiPropertyOptional)({ example: 0, description: 'Ordre du scénario leads (drag & drop)' }),
685
+ (0, swagger_1.ApiPropertyOptional)({
686
+ example: 0,
687
+ description: 'Ordre du scénario leads (drag & drop)',
688
+ }),
686
689
  (0, mongoose_1.Prop)({ type: Number, required: false }),
687
690
  (0, class_validator_1.IsOptional)(),
688
691
  (0, class_validator_1.IsNumber)(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.76.0",
3
+ "version": "1.77.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {