@likewatt/models 1.14.0 → 1.14.2
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Document } from 'mongoose';
|
|
2
2
|
import { AuthMode } from './enums/LeadsAuthMode';
|
|
3
|
-
export type
|
|
3
|
+
export type LeadTenantDocument = LeadTenant & Document;
|
|
4
4
|
export declare class LeadThemeConfig {
|
|
5
5
|
logoUrl?: string;
|
|
6
6
|
backgroundImageUrl?: string;
|
|
@@ -30,7 +30,7 @@ export declare const LeadAuthConfigSchema: import("mongoose").Schema<LeadAuthCon
|
|
|
30
30
|
} & {
|
|
31
31
|
__v: number;
|
|
32
32
|
}>;
|
|
33
|
-
export declare class
|
|
33
|
+
export declare class LeadTenant {
|
|
34
34
|
_id: string;
|
|
35
35
|
tenantId: string;
|
|
36
36
|
subdomain: string;
|
|
@@ -40,11 +40,11 @@ export declare class LeadWidgetTenant {
|
|
|
40
40
|
theme?: LeadThemeConfig;
|
|
41
41
|
isActive: boolean;
|
|
42
42
|
}
|
|
43
|
-
export declare const
|
|
43
|
+
export declare const LeadTenantSchema: import("mongoose").Schema<LeadTenant, import("mongoose").Model<LeadTenant, any, any, any, Document<unknown, any, LeadTenant, any, {}> & LeadTenant & Required<{
|
|
44
44
|
_id: string;
|
|
45
45
|
}> & {
|
|
46
46
|
__v: number;
|
|
47
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions,
|
|
47
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, LeadTenant, Document<unknown, {}, import("mongoose").FlatRecord<LeadTenant>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<LeadTenant> & Required<{
|
|
48
48
|
_id: string;
|
|
49
49
|
}> & {
|
|
50
50
|
__v: number;
|
package/dist/core/Leads.js
CHANGED
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.LeadTenantSchema = exports.LeadTenant = exports.LeadAuthConfigSchema = exports.LeadAuthConfig = exports.LeadThemeConfigSchema = exports.LeadThemeConfig = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const uuid_1 = require("uuid");
|
|
15
15
|
const LeadsAuthMode_1 = require("./enums/LeadsAuthMode");
|
|
@@ -56,9 +56,9 @@ exports.LeadAuthConfig = LeadAuthConfig = __decorate([
|
|
|
56
56
|
(0, mongoose_1.Schema)({ _id: false })
|
|
57
57
|
], LeadAuthConfig);
|
|
58
58
|
exports.LeadAuthConfigSchema = mongoose_1.SchemaFactory.createForClass(LeadAuthConfig);
|
|
59
|
-
let
|
|
59
|
+
let LeadTenant = class LeadTenant {
|
|
60
60
|
};
|
|
61
|
-
exports.
|
|
61
|
+
exports.LeadTenant = LeadTenant;
|
|
62
62
|
__decorate([
|
|
63
63
|
(0, mongoose_1.Prop)({
|
|
64
64
|
type: String,
|
|
@@ -68,11 +68,11 @@ __decorate([
|
|
|
68
68
|
default: () => (0, uuid_1.v4)(),
|
|
69
69
|
}),
|
|
70
70
|
__metadata("design:type", String)
|
|
71
|
-
],
|
|
71
|
+
], LeadTenant.prototype, "_id", void 0);
|
|
72
72
|
__decorate([
|
|
73
73
|
(0, mongoose_1.Prop)({ type: String, required: true, index: true }),
|
|
74
74
|
__metadata("design:type", String)
|
|
75
|
-
],
|
|
75
|
+
], LeadTenant.prototype, "tenantId", void 0);
|
|
76
76
|
__decorate([
|
|
77
77
|
(0, mongoose_1.Prop)({
|
|
78
78
|
type: String,
|
|
@@ -82,7 +82,7 @@ __decorate([
|
|
|
82
82
|
match: SUBDOMAIN_REGEX,
|
|
83
83
|
}),
|
|
84
84
|
__metadata("design:type", String)
|
|
85
|
-
],
|
|
85
|
+
], LeadTenant.prototype, "subdomain", void 0);
|
|
86
86
|
__decorate([
|
|
87
87
|
(0, mongoose_1.Prop)({
|
|
88
88
|
type: String,
|
|
@@ -92,35 +92,35 @@ __decorate([
|
|
|
92
92
|
default: 'autoconsommation.eu',
|
|
93
93
|
}),
|
|
94
94
|
__metadata("design:type", String)
|
|
95
|
-
],
|
|
95
|
+
], LeadTenant.prototype, "domain", void 0);
|
|
96
96
|
__decorate([
|
|
97
97
|
(0, mongoose_1.Prop)({ type: exports.LeadAuthConfigSchema, required: true }),
|
|
98
98
|
__metadata("design:type", LeadAuthConfig)
|
|
99
|
-
],
|
|
99
|
+
], LeadTenant.prototype, "auth", void 0);
|
|
100
100
|
__decorate([
|
|
101
101
|
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
102
102
|
__metadata("design:type", Array)
|
|
103
|
-
],
|
|
103
|
+
], LeadTenant.prototype, "defaultScenarioIds", void 0);
|
|
104
104
|
__decorate([
|
|
105
105
|
(0, mongoose_1.Prop)({ type: exports.LeadThemeConfigSchema }),
|
|
106
106
|
__metadata("design:type", LeadThemeConfig)
|
|
107
|
-
],
|
|
107
|
+
], LeadTenant.prototype, "theme", void 0);
|
|
108
108
|
__decorate([
|
|
109
109
|
(0, mongoose_1.Prop)({ type: Boolean, default: true, index: true }),
|
|
110
110
|
__metadata("design:type", Boolean)
|
|
111
|
-
],
|
|
112
|
-
exports.
|
|
111
|
+
], LeadTenant.prototype, "isActive", void 0);
|
|
112
|
+
exports.LeadTenant = LeadTenant = __decorate([
|
|
113
113
|
(0, mongoose_1.Schema)({
|
|
114
114
|
id: false,
|
|
115
115
|
timestamps: true,
|
|
116
116
|
toJSON: { virtuals: true, versionKey: false },
|
|
117
117
|
toObject: { virtuals: true, versionKey: false },
|
|
118
118
|
})
|
|
119
|
-
],
|
|
120
|
-
exports.
|
|
119
|
+
], LeadTenant);
|
|
120
|
+
exports.LeadTenantSchema = mongoose_1.SchemaFactory.createForClass(LeadTenant);
|
|
121
121
|
// Index composé : un subdomain unique par domaine
|
|
122
|
-
exports.
|
|
122
|
+
exports.LeadTenantSchema.index({ domain: 1, subdomain: 1 }, { unique: true });
|
|
123
123
|
// Virtuel : URL publique dérivée
|
|
124
|
-
exports.
|
|
124
|
+
exports.LeadTenantSchema.virtual('publicBaseUrl').get(function () {
|
|
125
125
|
return `https://${this.subdomain}.${this.domain}`;
|
|
126
126
|
});
|
|
@@ -48,12 +48,7 @@ export declare enum FileType {
|
|
|
48
48
|
PROFILE_ENT1 = "PROFILE_ENT1",
|
|
49
49
|
PROFILE_ENT3 = "PROFILE_ENT3",
|
|
50
50
|
BASE_PATH = "BASE_PATH",
|
|
51
|
-
CONSENT = "consent
|
|
52
|
-
CONSENT2 = "consent2.csv",
|
|
53
|
-
CONSENT3 = "consent3.xlsx",
|
|
54
|
-
CONSENT4 = "consent4.docx",
|
|
55
|
-
CONSENT5 = "consent5.pdf",
|
|
56
|
-
CONSENT6 = "consent6.txt",
|
|
51
|
+
CONSENT = "consent",
|
|
57
52
|
METADATA = "metadata.json",
|
|
58
53
|
OVERLAY = "overlay.png",
|
|
59
54
|
METADATA_BUILDING = "metadataBuilding.json",
|
|
@@ -52,12 +52,7 @@ var FileType;
|
|
|
52
52
|
FileType["PROFILE_ENT1"] = "PROFILE_ENT1";
|
|
53
53
|
FileType["PROFILE_ENT3"] = "PROFILE_ENT3";
|
|
54
54
|
FileType["BASE_PATH"] = "BASE_PATH";
|
|
55
|
-
FileType["CONSENT"] = "consent
|
|
56
|
-
FileType["CONSENT2"] = "consent2.csv";
|
|
57
|
-
FileType["CONSENT3"] = "consent3.xlsx";
|
|
58
|
-
FileType["CONSENT4"] = "consent4.docx";
|
|
59
|
-
FileType["CONSENT5"] = "consent5.pdf";
|
|
60
|
-
FileType["CONSENT6"] = "consent6.txt";
|
|
55
|
+
FileType["CONSENT"] = "consent";
|
|
61
56
|
FileType["METADATA"] = "metadata.json";
|
|
62
57
|
FileType["OVERLAY"] = "overlay.png";
|
|
63
58
|
FileType["METADATA_BUILDING"] = "metadataBuilding.json";
|