@likewatt/models 1.11.2 → 1.12.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/Leads.d.ts +5 -0
- package/dist/core/Leads.js +53 -0
- package/package.json +1 -1
package/dist/core/Leads.d.ts
CHANGED
|
@@ -23,8 +23,13 @@ export declare class Leads {
|
|
|
23
23
|
_id: string;
|
|
24
24
|
userId: string;
|
|
25
25
|
url: string;
|
|
26
|
+
apiToken: string;
|
|
27
|
+
apiLogin?: string;
|
|
28
|
+
apiPassword?: string;
|
|
26
29
|
defaultScenarios: string[];
|
|
27
30
|
config?: LeadsConfig;
|
|
31
|
+
projects?: string[];
|
|
32
|
+
isActive: boolean;
|
|
28
33
|
}
|
|
29
34
|
export declare const LeadsSchema: import("mongoose").Schema<Leads, import("mongoose").Model<Leads, any, any, any, Document<unknown, any, Leads, any, {}> & Leads & Required<{
|
|
30
35
|
_id: string;
|
package/dist/core/Leads.js
CHANGED
|
@@ -94,6 +94,35 @@ __decorate([
|
|
|
94
94
|
(0, class_validator_1.IsString)(),
|
|
95
95
|
__metadata("design:type", String)
|
|
96
96
|
], Leads.prototype, "url", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, swagger_1.ApiProperty)({
|
|
99
|
+
description: "Token pour l'API (V2)",
|
|
100
|
+
example: 'tk_1234567890abcdef',
|
|
101
|
+
}),
|
|
102
|
+
(0, mongoose_1.Prop)({ type: String, required: true, unique: true }),
|
|
103
|
+
(0, class_validator_1.IsString)(),
|
|
104
|
+
__metadata("design:type", String)
|
|
105
|
+
], Leads.prototype, "apiToken", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
108
|
+
description: 'Login pour API V1',
|
|
109
|
+
example: 'client_login',
|
|
110
|
+
}),
|
|
111
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
112
|
+
(0, class_validator_1.IsString)(),
|
|
113
|
+
(0, class_validator_1.IsOptional)(),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], Leads.prototype, "apiLogin", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
118
|
+
description: 'Password hashé pour API V1',
|
|
119
|
+
example: '$2b$10$...',
|
|
120
|
+
}),
|
|
121
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
122
|
+
(0, class_validator_1.IsString)(),
|
|
123
|
+
(0, class_validator_1.IsOptional)(),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], Leads.prototype, "apiPassword", void 0);
|
|
97
126
|
__decorate([
|
|
98
127
|
(0, swagger_1.ApiProperty)({
|
|
99
128
|
description: 'Tableau des identifiants de scénarios par défaut',
|
|
@@ -119,6 +148,30 @@ __decorate([
|
|
|
119
148
|
(0, class_validator_1.IsOptional)(),
|
|
120
149
|
__metadata("design:type", LeadsConfig)
|
|
121
150
|
], Leads.prototype, "config", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
153
|
+
description: 'IDs des projets créés via cette URL',
|
|
154
|
+
example: [
|
|
155
|
+
'550e8400-e29b-41d4-a716-446655440010',
|
|
156
|
+
'550e8400-e29b-41d4-a716-446655440011',
|
|
157
|
+
],
|
|
158
|
+
type: [String],
|
|
159
|
+
}),
|
|
160
|
+
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
161
|
+
(0, class_validator_1.IsArray)(),
|
|
162
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
163
|
+
(0, class_validator_1.IsOptional)(),
|
|
164
|
+
__metadata("design:type", Array)
|
|
165
|
+
], Leads.prototype, "projects", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, swagger_1.ApiProperty)({
|
|
168
|
+
description: 'Indique si le compte Leads est actif',
|
|
169
|
+
example: true,
|
|
170
|
+
}),
|
|
171
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: true }),
|
|
172
|
+
(0, class_validator_1.IsBoolean)(),
|
|
173
|
+
__metadata("design:type", Boolean)
|
|
174
|
+
], Leads.prototype, "isActive", void 0);
|
|
122
175
|
exports.Leads = Leads = __decorate([
|
|
123
176
|
(0, mongoose_1.Schema)({
|
|
124
177
|
id: false,
|