@likewatt/models 1.14.5 → 1.15.1
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 +3 -0
- package/dist/core/Leads.js +25 -5
- package/package.json +1 -1
package/dist/core/Leads.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Document } from 'mongoose';
|
|
2
2
|
export type LeadTenantDocument = LeadTenant & Document;
|
|
3
|
+
export declare const SUBDOMAIN_REGEX: RegExp;
|
|
3
4
|
export declare class LeadThemeConfig {
|
|
4
5
|
logoUrl?: string;
|
|
5
6
|
backgroundImageUrl?: string;
|
|
6
7
|
primaryColor?: string;
|
|
8
|
+
secondaryColor?: string;
|
|
9
|
+
accentColor?: string;
|
|
7
10
|
}
|
|
8
11
|
export declare const LeadThemeConfigSchema: import("mongoose").Schema<LeadThemeConfig, import("mongoose").Model<LeadThemeConfig, any, any, any, Document<unknown, any, LeadThemeConfig, any, {}> & LeadThemeConfig & {
|
|
9
12
|
_id: import("mongoose").Types.ObjectId;
|
package/dist/core/Leads.js
CHANGED
|
@@ -9,10 +9,11 @@ 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.LeadTenantSchema = exports.LeadTenant = exports.LeadThemeConfigSchema = exports.LeadThemeConfig = void 0;
|
|
12
|
+
exports.LeadTenantSchema = exports.LeadTenant = exports.LeadThemeConfigSchema = exports.LeadThemeConfig = exports.SUBDOMAIN_REGEX = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const uuid_1 = require("uuid");
|
|
15
|
-
|
|
15
|
+
exports.SUBDOMAIN_REGEX = /^(?!-)[a-z0-9-]{1,63}(?<!-)$/;
|
|
16
|
+
const COLOR_REGEX = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
|
|
16
17
|
let LeadThemeConfig = class LeadThemeConfig {
|
|
17
18
|
};
|
|
18
19
|
exports.LeadThemeConfig = LeadThemeConfig;
|
|
@@ -25,9 +26,29 @@ __decorate([
|
|
|
25
26
|
__metadata("design:type", String)
|
|
26
27
|
], LeadThemeConfig.prototype, "backgroundImageUrl", void 0);
|
|
27
28
|
__decorate([
|
|
28
|
-
(0, mongoose_1.Prop)({
|
|
29
|
+
(0, mongoose_1.Prop)({
|
|
30
|
+
type: String,
|
|
31
|
+
match: COLOR_REGEX,
|
|
32
|
+
required: false,
|
|
33
|
+
}),
|
|
29
34
|
__metadata("design:type", String)
|
|
30
35
|
], LeadThemeConfig.prototype, "primaryColor", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, mongoose_1.Prop)({
|
|
38
|
+
type: String,
|
|
39
|
+
match: COLOR_REGEX,
|
|
40
|
+
required: false,
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], LeadThemeConfig.prototype, "secondaryColor", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({
|
|
46
|
+
type: String,
|
|
47
|
+
match: COLOR_REGEX,
|
|
48
|
+
required: false,
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], LeadThemeConfig.prototype, "accentColor", void 0);
|
|
31
52
|
exports.LeadThemeConfig = LeadThemeConfig = __decorate([
|
|
32
53
|
(0, mongoose_1.Schema)({ _id: false })
|
|
33
54
|
], LeadThemeConfig);
|
|
@@ -53,7 +74,7 @@ __decorate([
|
|
|
53
74
|
required: true,
|
|
54
75
|
lowercase: true,
|
|
55
76
|
trim: true,
|
|
56
|
-
match: SUBDOMAIN_REGEX,
|
|
77
|
+
match: exports.SUBDOMAIN_REGEX,
|
|
57
78
|
}),
|
|
58
79
|
__metadata("design:type", String)
|
|
59
80
|
], LeadTenant.prototype, "subdomain", void 0);
|
|
@@ -63,7 +84,6 @@ __decorate([
|
|
|
63
84
|
required: true,
|
|
64
85
|
lowercase: true,
|
|
65
86
|
trim: true,
|
|
66
|
-
default: 'autoconsommation.eu',
|
|
67
87
|
}),
|
|
68
88
|
__metadata("design:type", String)
|
|
69
89
|
], LeadTenant.prototype, "domain", void 0);
|