@intelact/bright 0.9.160 → 0.9.162
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/auth/sign.dto.d.ts +2 -1
- package/lib/auth/sign.dto.js +12 -6
- package/lib/auth/sign.dto.js.map +1 -1
- package/lib/author/author.model.d.ts +2 -0
- package/lib/author/author.model.js +18 -0
- package/lib/author/author.model.js.map +1 -1
- package/lib/boost/boost.model.d.ts +2 -0
- package/lib/boost/boost.model.js +21 -2
- package/lib/boost/boost.model.js.map +1 -1
- package/lib/brand/brand-setting.model.d.ts +2 -0
- package/lib/brand/brand-setting.model.js +18 -0
- package/lib/brand/brand-setting.model.js.map +1 -1
- package/lib/brand/brand.model.d.ts +2 -0
- package/lib/brand/brand.model.js +18 -0
- package/lib/brand/brand.model.js.map +1 -1
- package/lib/category/category.model.d.ts +2 -0
- package/lib/category/category.model.js +18 -0
- package/lib/category/category.model.js.map +1 -1
- package/lib/collection/collection.model.d.ts +2 -0
- package/lib/collection/collection.model.js +18 -0
- package/lib/collection/collection.model.js.map +1 -1
- package/lib/feedback/feedback-item.model.d.ts +2 -0
- package/lib/feedback/feedback-item.model.js +18 -0
- package/lib/feedback/feedback-item.model.js.map +1 -1
- package/lib/feedback/feedback-option.model.d.ts +2 -0
- package/lib/feedback/feedback-option.model.js +18 -0
- package/lib/feedback/feedback-option.model.js.map +1 -1
- package/lib/feedback/feedback.model.d.ts +2 -0
- package/lib/feedback/feedback.model.js +18 -0
- package/lib/feedback/feedback.model.js.map +1 -1
- package/lib/gallery/gallery.model.d.ts +2 -0
- package/lib/gallery/gallery.model.js +18 -0
- package/lib/gallery/gallery.model.js.map +1 -1
- package/lib/log/log.model.d.ts +2 -0
- package/lib/log/log.model.js +28 -0
- package/lib/log/log.model.js.map +1 -1
- package/lib/metric/metric.model.d.ts +2 -0
- package/lib/metric/metric.model.js +18 -0
- package/lib/metric/metric.model.js.map +1 -1
- package/lib/notification/notification.model.d.ts +2 -0
- package/lib/notification/notification.model.js +18 -0
- package/lib/notification/notification.model.js.map +1 -1
- package/lib/popularity/popularity.model.d.ts +2 -0
- package/lib/popularity/popularity.model.js +18 -0
- package/lib/popularity/popularity.model.js.map +1 -1
- package/lib/post/post.model.d.ts +3 -1
- package/lib/post/post.model.js +18 -0
- package/lib/post/post.model.js.map +1 -1
- package/lib/promotion/promotion.model.d.ts +2 -0
- package/lib/promotion/promotion.model.js +18 -0
- package/lib/promotion/promotion.model.js.map +1 -1
- package/lib/publisher/publisher.model.d.ts +2 -0
- package/lib/publisher/publisher.model.js +18 -0
- package/lib/publisher/publisher.model.js.map +1 -1
- package/lib/question/comment.model.d.ts +2 -0
- package/lib/question/comment.model.js +18 -0
- package/lib/question/comment.model.js.map +1 -1
- package/lib/question/question.model.d.ts +2 -0
- package/lib/question/question.model.js +18 -0
- package/lib/question/question.model.js.map +1 -1
- package/lib/report/report.model.d.ts +2 -0
- package/lib/report/report.model.js +18 -0
- package/lib/report/report.model.js.map +1 -1
- package/lib/survey/survey-item.model.d.ts +2 -0
- package/lib/survey/survey-item.model.js +18 -0
- package/lib/survey/survey-item.model.js.map +1 -1
- package/lib/survey/survey-option.model.d.ts +2 -0
- package/lib/survey/survey-option.model.js +18 -0
- package/lib/survey/survey-option.model.js.map +1 -1
- package/lib/survey/survey.model.d.ts +2 -0
- package/lib/survey/survey.model.js +18 -0
- package/lib/survey/survey.model.js.map +1 -1
- package/lib/topic/topic.model.d.ts +2 -0
- package/lib/topic/topic.model.js +18 -0
- package/lib/topic/topic.model.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/user/user.model.d.ts +2 -0
- package/lib/user/user.model.js +18 -0
- package/lib/user/user.model.js.map +1 -1
- package/package.json +1 -1
package/lib/auth/sign.dto.d.ts
CHANGED
package/lib/auth/sign.dto.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.SignupUserDto = exports.SigninDto = void 0;
|
13
13
|
const class_validator_1 = require("class-validator");
|
14
14
|
class SigninDto {
|
15
15
|
email;
|
@@ -31,24 +31,30 @@ __decorate([
|
|
31
31
|
(0, class_validator_1.IsOptional)(),
|
32
32
|
__metadata("design:type", Object)
|
33
33
|
], SigninDto.prototype, "device", void 0);
|
34
|
-
class
|
34
|
+
class SignupUserDto {
|
35
35
|
email;
|
36
|
+
password;
|
36
37
|
token;
|
37
38
|
device;
|
38
39
|
}
|
39
|
-
exports.
|
40
|
+
exports.SignupUserDto = SignupUserDto;
|
40
41
|
__decorate([
|
41
42
|
(0, class_validator_1.IsNotEmpty)(),
|
42
43
|
(0, class_validator_1.IsEmail)(),
|
43
44
|
__metadata("design:type", String)
|
44
|
-
],
|
45
|
+
], SignupUserDto.prototype, "email", void 0);
|
46
|
+
__decorate([
|
47
|
+
(0, class_validator_1.IsNotEmpty)(),
|
48
|
+
(0, class_validator_1.IsString)(),
|
49
|
+
__metadata("design:type", String)
|
50
|
+
], SignupUserDto.prototype, "password", void 0);
|
45
51
|
__decorate([
|
46
52
|
(0, class_validator_1.IsNotEmpty)(),
|
47
53
|
(0, class_validator_1.IsString)(),
|
48
54
|
__metadata("design:type", String)
|
49
|
-
],
|
55
|
+
], SignupUserDto.prototype, "token", void 0);
|
50
56
|
__decorate([
|
51
57
|
(0, class_validator_1.IsOptional)(),
|
52
58
|
__metadata("design:type", Object)
|
53
|
-
],
|
59
|
+
], SignupUserDto.prototype, "device", void 0);
|
54
60
|
//# sourceMappingURL=sign.dto.js.map
|
package/lib/auth/sign.dto.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sign.dto.js","sourceRoot":"","sources":["../../src/auth/sign.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4E;AAQ5E,MAAa,SAAS;IAIrB,KAAK,CAAS;IAId,QAAQ,CAAS;IAGjB,MAAM,CAAsB;CAC5B;AAZD,8BAYC;AARA;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;wCACI;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2CACM;AAGjB;IADC,IAAA,4BAAU,GAAE;;yCACe;AAS7B,MAAa,
|
1
|
+
{"version":3,"file":"sign.dto.js","sourceRoot":"","sources":["../../src/auth/sign.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4E;AAQ5E,MAAa,SAAS;IAIrB,KAAK,CAAS;IAId,QAAQ,CAAS;IAGjB,MAAM,CAAsB;CAC5B;AAZD,8BAYC;AARA;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;wCACI;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2CACM;AAGjB;IADC,IAAA,4BAAU,GAAE;;yCACe;AAS7B,MAAa,aAAa;IAIzB,KAAK,CAAS;IAId,QAAQ,CAAS;IAIjB,KAAK,CAAS;IAGd,MAAM,CAAsB;CAC5B;AAhBD,sCAgBC;AAZA;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;;4CACI;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+CACM;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4CACG;AAGd;IADC,IAAA,4BAAU,GAAE;;6CACe"}
|
@@ -20,4 +20,6 @@ export declare class Author {
|
|
20
20
|
get totalQuestions(): Metric;
|
21
21
|
get totalPosts(): Metric;
|
22
22
|
static toItemList(data: Author[], key?: 'id' | 'slug'): Item<any>[];
|
23
|
+
static toInstance(data: object, groups?: string[]): Author;
|
24
|
+
static toInstances(data: any[], groups?: string[]): Author[];
|
23
25
|
}
|
@@ -47,6 +47,12 @@ class Author {
|
|
47
47
|
value: i[key]
|
48
48
|
}));
|
49
49
|
}
|
50
|
+
static toInstance(data, groups = ['admin']) {
|
51
|
+
return data ? (0, class_transformer_1.plainToInstance)(Author, data, { groups: groups || [] }) : null;
|
52
|
+
}
|
53
|
+
static toInstances(data, groups = ['admin']) {
|
54
|
+
return data ? (0, class_transformer_1.plainToInstance)(Author, data, { groups: groups || [] }) : [];
|
55
|
+
}
|
50
56
|
}
|
51
57
|
exports.Author = Author;
|
52
58
|
__decorate([
|
@@ -105,4 +111,16 @@ __decorate([
|
|
105
111
|
(0, class_transformer_1.Type)(() => Date),
|
106
112
|
__metadata("design:type", Date)
|
107
113
|
], Author.prototype, "updatedOn", void 0);
|
114
|
+
__decorate([
|
115
|
+
(0, class_transformer_1.Expose)(),
|
116
|
+
__metadata("design:type", Function),
|
117
|
+
__metadata("design:paramtypes", [Object, Array]),
|
118
|
+
__metadata("design:returntype", void 0)
|
119
|
+
], Author, "toInstance", null);
|
120
|
+
__decorate([
|
121
|
+
(0, class_transformer_1.Expose)(),
|
122
|
+
__metadata("design:type", Function),
|
123
|
+
__metadata("design:paramtypes", [Array, Array]),
|
124
|
+
__metadata("design:returntype", void 0)
|
125
|
+
], Author, "toInstances", null);
|
108
126
|
//# sourceMappingURL=author.model.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"author.model.js","sourceRoot":"","sources":["../../src/author/author.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"author.model.js","sourceRoot":"","sources":["../../src/author/author.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAkE;AAClE,mDAA0C;AAC1C,yDAAgD;AAChD,mDAA0C;AAC1C,sCAAuC;AACvC,0CAAuC;AACvC,kCAA+B;AAE/B,MAAa,MAAM;IAIlB,EAAE,CAAS;IAGX,IAAI,CAAS;IAKb,IAAI,CAAS;IAGb,SAAS,CAAS;IAGlB,QAAQ,CAAS;IAMjB,KAAK,CAAS;IAId,SAAS,CAAa;IAWtB,OAAO,CAAW;IAM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BACN,IAAI;yCAAC;AA+BT;IADN,IAAA,0BAAM,GAAE;;;;8BAGR;AAGM;IADN,IAAA,0BAAM,GAAE;;;;+BAGR"}
|
package/lib/boost/boost.model.js
CHANGED
@@ -8,6 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
8
8
|
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
|
+
var Boost_1;
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
13
|
exports.Boost = void 0;
|
13
14
|
const class_transformer_1 = require("class-transformer");
|
@@ -19,7 +20,7 @@ const metric_1 = require("../metric");
|
|
19
20
|
const user_1 = require("../user");
|
20
21
|
const item_1 = require("../item");
|
21
22
|
const ui_1 = require("../ui");
|
22
|
-
let Boost = class Boost {
|
23
|
+
let Boost = Boost_1 = class Boost {
|
23
24
|
id;
|
24
25
|
title;
|
25
26
|
items;
|
@@ -146,6 +147,12 @@ let Boost = class Boost {
|
|
146
147
|
? ui_1.Context.Dark
|
147
148
|
: ui_1.Context.Secondary;
|
148
149
|
}
|
150
|
+
static toInstance(data, groups = ['admin']) {
|
151
|
+
return data ? (0, class_transformer_1.plainToInstance)(Boost_1, data, { groups: groups || [] }) : null;
|
152
|
+
}
|
153
|
+
static toInstances(data, groups = ['admin']) {
|
154
|
+
return data ? (0, class_transformer_1.plainToInstance)(Boost_1, data, { groups: groups || [] }) : [];
|
155
|
+
}
|
149
156
|
};
|
150
157
|
exports.Boost = Boost;
|
151
158
|
__decorate([
|
@@ -232,7 +239,19 @@ __decorate([
|
|
232
239
|
__metadata("design:type", String),
|
233
240
|
__metadata("design:paramtypes", [])
|
234
241
|
], Boost.prototype, "labelContext", null);
|
235
|
-
|
242
|
+
__decorate([
|
243
|
+
(0, class_transformer_1.Expose)(),
|
244
|
+
__metadata("design:type", Function),
|
245
|
+
__metadata("design:paramtypes", [Object, Array]),
|
246
|
+
__metadata("design:returntype", void 0)
|
247
|
+
], Boost, "toInstance", null);
|
248
|
+
__decorate([
|
249
|
+
(0, class_transformer_1.Expose)(),
|
250
|
+
__metadata("design:type", Function),
|
251
|
+
__metadata("design:paramtypes", [Array, Array]),
|
252
|
+
__metadata("design:returntype", void 0)
|
253
|
+
], Boost, "toInstances", null);
|
254
|
+
exports.Boost = Boost = Boost_1 = __decorate([
|
236
255
|
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
237
256
|
__metadata("design:paramtypes", [Object])
|
238
257
|
], Boost);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"boost.model.js","sourceRoot":"","sources":["../../src/boost/boost.model.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"boost.model.js","sourceRoot":"","sources":["../../src/boost/boost.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yDAAkE;AAClE,mDAA0C;AAC1C,yDAAgD;AAChD,mDAA0C;AAC1C,sCAAoD;AACpD,sCAAuC;AACvC,kCAAoC;AACpC,kCAA+B;AAC/B,8BAAgC;AAYzB,IAAM,KAAK,aAAX,MAAM,KAAK;IAIjB,EAAE,CAAS;IAKX,KAAK,CAAS;IAId,KAAK,CAAS;IAKd,MAAM,CAAa;IAGnB,KAAK,CAAc;IAInB,SAAS,CAAO;IAIhB,OAAO,CAAO;IAed,OAAO,CAAW;IAKlB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAGhB,SAAS,CAAO;IAGhB,SAAS,CAAO;IAEhB,YAAY,KAAsB;QACjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAID,IAAI,UAAU;QACb,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAG,mBAAU,CAAC,KAAK,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,SAAS;QACZ,OAAO,IAAI,EAAE,OAA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AAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,WAAI,CAAC;;yCACW;AAS5B;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;;0CAuB7B;AAOD;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;;qCAiE7B;AAMD;IAAC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;0CAG7B;AAMD;IAAC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;yCAW7B;AAGM;IADN,IAAA,0BAAM,GAAE;;;;6BAGR;AAGM;IADN,IAAA,0BAAM,GAAE;;;;8BAGR;gBAnPW,KAAK;IADjB,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;GACjB,KAAK,CAoPjB"}
|
@@ -24,6 +24,12 @@ class BrandSetting {
|
|
24
24
|
constructor(props) {
|
25
25
|
Object.assign(this, props);
|
26
26
|
}
|
27
|
+
static toInstance(data, groups = ['admin']) {
|
28
|
+
return data ? (0, class_transformer_1.plainToInstance)(BrandSetting, data, { groups: groups || [] }) : null;
|
29
|
+
}
|
30
|
+
static toInstances(data, groups = ['admin']) {
|
31
|
+
return data ? (0, class_transformer_1.plainToInstance)(BrandSetting, data, { groups: groups || [] }) : [];
|
32
|
+
}
|
27
33
|
}
|
28
34
|
exports.BrandSetting = BrandSetting;
|
29
35
|
__decorate([
|
@@ -55,4 +61,16 @@ __decorate([
|
|
55
61
|
(0, class_transformer_1.Type)(() => brand_model_1.Brand),
|
56
62
|
__metadata("design:type", brand_model_1.Brand)
|
57
63
|
], BrandSetting.prototype, "brand", void 0);
|
64
|
+
__decorate([
|
65
|
+
(0, class_transformer_1.Expose)(),
|
66
|
+
__metadata("design:type", Function),
|
67
|
+
__metadata("design:paramtypes", [Object, Array]),
|
68
|
+
__metadata("design:returntype", void 0)
|
69
|
+
], BrandSetting, "toInstance", null);
|
70
|
+
__decorate([
|
71
|
+
(0, class_transformer_1.Expose)(),
|
72
|
+
__metadata("design:type", Function),
|
73
|
+
__metadata("design:paramtypes", [Array, Array]),
|
74
|
+
__metadata("design:returntype", void 0)
|
75
|
+
], BrandSetting, "toInstances", null);
|
58
76
|
//# sourceMappingURL=brand-setting.model.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"brand-setting.model.js","sourceRoot":"","sources":["../../src/brand/brand-setting.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"brand-setting.model.js","sourceRoot":"","sources":["../../src/brand/brand-setting.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAkE;AAClE,6DAAmD;AACnD,+CAAsC;AAGtC,MAAa,YAAY;IAGxB,EAAE,CAAS;IAGX,KAAK,CAAc;IAGnB,IAAI,CAAS;IAGb,KAAK,CAAS;IAGd,KAAK,CAAS;IAGd,WAAW,CAAS;IAIpB,KAAK,CAAQ;IAEb,YAAY,KAA6B;QACxC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAGM,AAAP,MAAM,CAAC,UAAU,CAAC,IAAY,EAAE,SAAmB,CAAC,OAAO,CAAC;QAC3D,OAAO,IAAI,CAAC,CAAC,CAAC,IAAA,mCAAe,EAAC,YAAY,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACpF,CAAC;IAGM,AAAP,MAAM,CAAC,WAAW,CAAC,IAAW,EAAE,SAAmB,CAAC,OAAO,CAAC;QAC3D,OAAO,IAAI,CAAC,CAAC,CAAC,IAAA,mCAAe,EAAC,YAAY,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAClF,CAAC;CACD;AArCD,oCAqCC;AAlCA;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;wCACnB;AAGX;IADC,IAAA,0BAAM,GAAE;;2CACU;AAGnB;IADC,IAAA,0BAAM,GAAE;;0CACI;AAGb;IADC,IAAA,0BAAM,GAAE;;2CACK;AAGd;IADC,IAAA,0BAAM,GAAE;;2CACK;AAGd;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;iDACV;AAIpB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,mBAAK,CAAC;8BACX,mBAAK;2CAAC;AAON;IADN,IAAA,0BAAM,GAAE;;;;oCAGR;AAGM;IADN,IAAA,0BAAM,GAAE;;;;qCAGR"}
|
@@ -31,4 +31,6 @@ export declare class Brand {
|
|
31
31
|
isValidImageProvider(url: string): boolean;
|
32
32
|
getVideoProviders(): string[];
|
33
33
|
isValidVideoProvider(url: string): boolean;
|
34
|
+
static toInstance(data: object, groups?: string[]): Brand;
|
35
|
+
static toInstances(data: any[], groups?: string[]): Brand[];
|
34
36
|
}
|
package/lib/brand/brand.model.js
CHANGED
@@ -124,6 +124,12 @@ class Brand {
|
|
124
124
|
}
|
125
125
|
return;
|
126
126
|
}
|
127
|
+
static toInstance(data, groups = ['admin']) {
|
128
|
+
return data ? (0, class_transformer_1.plainToInstance)(Brand, data, { groups: groups || [] }) : null;
|
129
|
+
}
|
130
|
+
static toInstances(data, groups = ['admin']) {
|
131
|
+
return data ? (0, class_transformer_1.plainToInstance)(Brand, data, { groups: groups || [] }) : [];
|
132
|
+
}
|
127
133
|
}
|
128
134
|
exports.Brand = Brand;
|
129
135
|
__decorate([
|
@@ -246,4 +252,16 @@ __decorate([
|
|
246
252
|
__metadata("design:paramtypes", [String]),
|
247
253
|
__metadata("design:returntype", Boolean)
|
248
254
|
], Brand.prototype, "isValidVideoProvider", null);
|
255
|
+
__decorate([
|
256
|
+
(0, class_transformer_1.Expose)(),
|
257
|
+
__metadata("design:type", Function),
|
258
|
+
__metadata("design:paramtypes", [Object, Array]),
|
259
|
+
__metadata("design:returntype", void 0)
|
260
|
+
], Brand, "toInstance", null);
|
261
|
+
__decorate([
|
262
|
+
(0, class_transformer_1.Expose)(),
|
263
|
+
__metadata("design:type", Function),
|
264
|
+
__metadata("design:paramtypes", [Array, Array]),
|
265
|
+
__metadata("design:returntype", void 0)
|
266
|
+
], Brand, "toInstances", null);
|
249
267
|
//# sourceMappingURL=brand.model.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"brand.model.js","sourceRoot":"","sources":["../../src/brand/brand.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"brand.model.js","sourceRoot":"","sources":["../../src/brand/brand.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAkE;AAIlE,+DAA2D;AAC3D,6DAAmD;AACnD,kEAAyD;AACzD,mDAA0C;AAC1C,+DAAqD;AAErD,MAAa,KAAK;IAIjB,EAAE,CAAS;IAWX,SAAS,CAAS;IAMlB,OAAO,CAAe;IAMtB,YAAY,CAAa;IAKzB,IAAI,CAAS;IAGb,MAAM,CAAS;IAGf,GAAG,CAAS;IAMZ,KAAK,CAAS;IAGd,WAAW,CAAS;IAGpB,IAAI,CAAS;IAKb,MAAM,CAAgB;IAGtB,QAAQ,CAAS;IAIjB,UAAU,CAAU;IAGpB,UAAU,CAAS;IAInB,UAAU,CAAU;IAIpB,SAAS,CAAO;IAMhB,QAAQ,CAAiB;IAIzB,UAAU,CAAc;IAExB,YAAY,KAAsB;QACjC,MAAM,CAAC,MAAM,CAAC,I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IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;wCAAC;AAMhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,kCAAY,CAAC;;uCACA;AAIzB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,2BAAS,CAAC;;yCACE;AAaxB;IADC,IAAA,0BAAM,GAAE;;;;gDA0BR;AASD;IADC,IAAA,0BAAM,GAAE;;;;2CA4BR;AASD;IADC,IAAA,0BAAM,GAAE;;;;0CAgBR;AAOD;IADC,IAAA,0BAAM,GAAE;;;;8CASR;AAGD;IADC,IAAA,0BAAM,GAAE;;;;iDAmBR;AAOD;IADC,IAAA,0BAAM,GAAE;;;;8CASR;AAGD;IADC,IAAA,0BAAM,GAAE;;;;iDAmBR;AAGM;IADN,IAAA,0BAAM,GAAE;;;;6BAGR;AAGM;IADN,IAAA,0BAAM,GAAE;;;;8BAGR"}
|
@@ -56,6 +56,12 @@ class Category {
|
|
56
56
|
get totalDownloads() {
|
57
57
|
return this?.metrics?.find(i => i.event === user_1.UserEvent.Download);
|
58
58
|
}
|
59
|
+
static toInstance(data, groups = ['admin']) {
|
60
|
+
return data ? (0, class_transformer_1.plainToInstance)(Category, data, { groups: groups || [] }) : null;
|
61
|
+
}
|
62
|
+
static toInstances(data, groups = ['admin']) {
|
63
|
+
return data ? (0, class_transformer_1.plainToInstance)(Category, data, { groups: groups || [] }) : [];
|
64
|
+
}
|
59
65
|
}
|
60
66
|
exports.Category = Category;
|
61
67
|
__decorate([
|
@@ -105,4 +111,16 @@ __decorate([
|
|
105
111
|
(0, class_transformer_1.Type)(() => Date),
|
106
112
|
__metadata("design:type", Date)
|
107
113
|
], Category.prototype, "updatedOn", void 0);
|
114
|
+
__decorate([
|
115
|
+
(0, class_transformer_1.Expose)(),
|
116
|
+
__metadata("design:type", Function),
|
117
|
+
__metadata("design:paramtypes", [Object, Array]),
|
118
|
+
__metadata("design:returntype", void 0)
|
119
|
+
], Category, "toInstance", null);
|
120
|
+
__decorate([
|
121
|
+
(0, class_transformer_1.Expose)(),
|
122
|
+
__metadata("design:type", Function),
|
123
|
+
__metadata("design:paramtypes", [Array, Array]),
|
124
|
+
__metadata("design:returntype", void 0)
|
125
|
+
], Category, "toInstances", null);
|
108
126
|
//# sourceMappingURL=category.model.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"category.model.js","sourceRoot":"","sources":["../../src/category/category.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"category.model.js","sourceRoot":"","sources":["../../src/category/category.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAkE;AAClE,mDAA0C;AAC1C,yDAAgD;AAChD,mDAA0C;AAC1C,sCAAuC;AACvC,kCAAoC;AAGpC,MAAa,QAAQ;IAIpB,EAAE,CAAS;IAKX,KAAK,CAAS;IAGd,IAAI,CAAS;IAGb,WAAW,CAAS;IAMpB,IAAI,CAAS;IAeb,OAAO,CAAW;IAMlB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,YAAY,KAAyB;QACpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAQD,MAAM,CAAC,UAAU,CAAC,IAAgB,EAAE,MAAgB,IAAI;QACvD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAG,CAAC;YAAE,OAAO,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,iBAAI,CAAC;YAC7B,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC;SACb,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,UAAU;QACb,OAAO,IAAI,EAAE,OAA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AC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;2CAAC;AA+CT;IADN,IAAA,0BAAM,GAAE;;;;gCAGR;AAGM;IADN,IAAA,0BAAM,GAAE;;;;iCAGR"}
|
@@ -19,4 +19,6 @@ export declare class Collection {
|
|
19
19
|
get totalLikes(): Metric;
|
20
20
|
get totalShares(): Metric;
|
21
21
|
get totalDownloads(): Metric;
|
22
|
+
static toInstance(data: object, groups?: string[]): Collection;
|
23
|
+
static toInstances(data: any[], groups?: string[]): Collection[];
|
22
24
|
}
|
@@ -48,6 +48,12 @@ class Collection {
|
|
48
48
|
get totalDownloads() {
|
49
49
|
return this?.metrics?.find(i => i.event === user_1.UserEvent.Download);
|
50
50
|
}
|
51
|
+
static toInstance(data, groups = ['admin']) {
|
52
|
+
return data ? (0, class_transformer_1.plainToInstance)(Collection, data, { groups: groups || [] }) : null;
|
53
|
+
}
|
54
|
+
static toInstances(data, groups = ['admin']) {
|
55
|
+
return data ? (0, class_transformer_1.plainToInstance)(Collection, data, { groups: groups || [] }) : [];
|
56
|
+
}
|
51
57
|
}
|
52
58
|
exports.Collection = Collection;
|
53
59
|
__decorate([
|
@@ -94,4 +100,16 @@ __decorate([
|
|
94
100
|
(0, class_transformer_1.Type)(() => publisher_model_1.Publisher),
|
95
101
|
__metadata("design:type", publisher_model_1.Publisher)
|
96
102
|
], Collection.prototype, "publisher", void 0);
|
103
|
+
__decorate([
|
104
|
+
(0, class_transformer_1.Expose)(),
|
105
|
+
__metadata("design:type", Function),
|
106
|
+
__metadata("design:paramtypes", [Object, Array]),
|
107
|
+
__metadata("design:returntype", void 0)
|
108
|
+
], Collection, "toInstance", null);
|
109
|
+
__decorate([
|
110
|
+
(0, class_transformer_1.Expose)(),
|
111
|
+
__metadata("design:type", Function),
|
112
|
+
__metadata("design:paramtypes", [Array, Array]),
|
113
|
+
__metadata("design:returntype", void 0)
|
114
|
+
], Collection, "toInstances", null);
|
97
115
|
//# sourceMappingURL=collection.model.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collection.model.js","sourceRoot":"","sources":["../../src/collection/collection.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"collection.model.js","sourceRoot":"","sources":["../../src/collection/collection.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAkE;AAClE,mDAA0C;AAC1C,kEAAyD;AACzD,yDAAgD;AAChD,mDAA0C;AAC1C,kCAAoC;AACpC,sCAAuC;AAEvC,MAAa,UAAU;IAItB,EAAE,CAAS;IAKX,KAAK,CAAS;IAId,KAAK,CAAS;IAgBd,OAAO,CAAW;IAMlB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAMhB,SAAS,CAAY;IAErB,YAAY,KAA2B;QACtC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU;QACb,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAG,mBAAU,CAAC,KAAK,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,SAAS;QACZ,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAG,gBAAS,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,cAAc;QACjB,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAG,gBAAS,CAAC,QAAQ,CAAC,CAAC;IAC/D,CAAC;IAED,IAAI,UAAU;QACb,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAG,gBAAS,CAAC,IAAI,CAAC,CAAC;IAC3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qBAAM,CAAC;;2CACD;AAMlB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAI,CAAC;8BACN,iBAAI;6CAAC;AAIhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;6CAAC;AAIhB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAI,CAAC;8BACN,iBAAI;6CAAC;AAIhB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;6CAAC;AAMhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,2BAAS,CAAC;8BACX,2BAAS;6CAAC;AA+Bd;IADN,IAAA,0BAAM,GAAE;;;;kCAGR;AAGM;IADN,IAAA,0BAAM,GAAE;;;;mCAGR"}
|
@@ -13,4 +13,6 @@ export declare class FeedbackItem {
|
|
13
13
|
updatedOn: Date;
|
14
14
|
options: FeedbackOption[];
|
15
15
|
constructor(props?: Partial<FeedbackItem>);
|
16
|
+
static toInstance(data: object, groups?: string[]): FeedbackItem;
|
17
|
+
static toInstances(data: any[], groups?: string[]): FeedbackItem[];
|
16
18
|
}
|
@@ -28,6 +28,12 @@ class FeedbackItem {
|
|
28
28
|
constructor(props) {
|
29
29
|
Object.assign(this, props);
|
30
30
|
}
|
31
|
+
static toInstance(data, groups = ['admin']) {
|
32
|
+
return data ? (0, class_transformer_1.plainToInstance)(FeedbackItem, data, { groups: groups || [] }) : null;
|
33
|
+
}
|
34
|
+
static toInstances(data, groups = ['admin']) {
|
35
|
+
return data ? (0, class_transformer_1.plainToInstance)(FeedbackItem, data, { groups: groups || [] }) : [];
|
36
|
+
}
|
31
37
|
}
|
32
38
|
exports.FeedbackItem = FeedbackItem;
|
33
39
|
__decorate([
|
@@ -84,4 +90,16 @@ __decorate([
|
|
84
90
|
(0, class_transformer_1.Type)(() => feedback_option_model_1.FeedbackOption),
|
85
91
|
__metadata("design:type", Array)
|
86
92
|
], FeedbackItem.prototype, "options", void 0);
|
93
|
+
__decorate([
|
94
|
+
(0, class_transformer_1.Expose)(),
|
95
|
+
__metadata("design:type", Function),
|
96
|
+
__metadata("design:paramtypes", [Object, Array]),
|
97
|
+
__metadata("design:returntype", void 0)
|
98
|
+
], FeedbackItem, "toInstance", null);
|
99
|
+
__decorate([
|
100
|
+
(0, class_transformer_1.Expose)(),
|
101
|
+
__metadata("design:type", Function),
|
102
|
+
__metadata("design:paramtypes", [Array, Array]),
|
103
|
+
__metadata("design:returntype", void 0)
|
104
|
+
], FeedbackItem, "toInstances", null);
|
87
105
|
//# sourceMappingURL=feedback-item.model.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"feedback-item.model.js","sourceRoot":"","sources":["../../src/feedback/feedback-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"feedback-item.model.js","sourceRoot":"","sources":["../../src/feedback/feedback-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAkE;AAClE,mDAA0C;AAC1C,mEAAyD;AAGzD,MAAa,YAAY;IAIxB,EAAE,CAAS;IAKX,QAAQ,CAAS;IAMjB,QAAQ,CAAU;IAIlB,IAAI,CAAS;IAIb,SAAS,CAAU;IAInB,QAAQ,CAAU;IAMlB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAMhB,OAAO,CAAmB;IAE1B,YAAY,KAA6B;QACxC,MAAM,CAAC,MAAM,CAAC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E,CAAC,OAAO,CAAC;;8CACF;AAMlB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAI,CAAC;8BACN,iBAAI;+CAAC;AAIhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;+CAAC;AAIhB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAI,CAAC;8BACN,iBAAI;+CAAC;AAIhB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;+CAAC;AAMhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,sCAAc,CAAC;;6CACD;AAOnB;IADN,IAAA,0BAAM,GAAE;;;;oCAGR;AAGM;IADN,IAAA,0BAAM,GAAE;;;;qCAGR"}
|
@@ -19,6 +19,12 @@ class FeedbackOption {
|
|
19
19
|
constructor(props) {
|
20
20
|
Object.assign(this, props);
|
21
21
|
}
|
22
|
+
static toInstance(data, groups = ['admin']) {
|
23
|
+
return data ? (0, class_transformer_1.plainToInstance)(FeedbackOption, data, { groups: groups || [] }) : null;
|
24
|
+
}
|
25
|
+
static toInstances(data, groups = ['admin']) {
|
26
|
+
return data ? (0, class_transformer_1.plainToInstance)(FeedbackOption, data, { groups: groups || [] }) : [];
|
27
|
+
}
|
22
28
|
}
|
23
29
|
exports.FeedbackOption = FeedbackOption;
|
24
30
|
__decorate([
|
@@ -40,4 +46,16 @@ __decorate([
|
|
40
46
|
(0, class_transformer_1.Type)(() => Boolean),
|
41
47
|
__metadata("design:type", Boolean)
|
42
48
|
], FeedbackOption.prototype, "isSelected", void 0);
|
49
|
+
__decorate([
|
50
|
+
(0, class_transformer_1.Expose)(),
|
51
|
+
__metadata("design:type", Function),
|
52
|
+
__metadata("design:paramtypes", [Object, Array]),
|
53
|
+
__metadata("design:returntype", void 0)
|
54
|
+
], FeedbackOption, "toInstance", null);
|
55
|
+
__decorate([
|
56
|
+
(0, class_transformer_1.Expose)(),
|
57
|
+
__metadata("design:type", Function),
|
58
|
+
__metadata("design:paramtypes", [Array, Array]),
|
59
|
+
__metadata("design:returntype", void 0)
|
60
|
+
], FeedbackOption, "toInstances", null);
|
43
61
|
//# sourceMappingURL=feedback-option.model.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"feedback-option.model.js","sourceRoot":"","sources":["../../src/feedback/feedback-option.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"feedback-option.model.js","sourceRoot":"","sources":["../../src/feedback/feedback-option.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAkE;AAGlE,MAAa,cAAc;IAI1B,EAAE,CAAS;IAKX,OAAO,CAAS;IAMhB,IAAI,CAAS;IAIb,UAAU,CAAU;IAEpB,YAAY,KAA+B;QAC1C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAGM,AAAP,MAAM,CAAC,UAAU,CAAC,IAAY,EAAE,SAAmB,CAAC,OAAO,CAAC;QAC3D,OAAO,IAAI,CAAC,CAAC,CAAC,IAAA,mCAAe,EAAC,cAAc,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACtF,CAAC;IAGM,AAAP,MAAM,CAAC,WAAW,CAAC,IAAW,EAAE,SAAmB,CAAC,OAAO,CAAC;QAC3D,OAAO,IAAI,CAAC,CAAC,CAAC,IAAA,mCAAe,EAAC,cAAc,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACpF,CAAC;CACD;AAlCD,wCAkCC;AA9BA;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;0CACR;AAKX;IADC,IAAA,0BAAM,GAAE;;+CACO;AAMhB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;4CACN;AAIb;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;kDACA;AAOb;IADN,IAAA,0BAAM,GAAE;;;;sCAGR;AAGM;IADN,IAAA,0BAAM,GAAE;;;;uCAGR"}
|
@@ -21,4 +21,6 @@ export declare class Feedback {
|
|
21
21
|
get totalPosts(): Metric;
|
22
22
|
get totalUsers(): Metric;
|
23
23
|
static toItemList(data: Feedback[], key?: 'id' | 'type'): Item<any>[];
|
24
|
+
static toInstance(data: object, groups?: string[]): Feedback;
|
25
|
+
static toInstances(data: any[], groups?: string[]): Feedback[];
|
24
26
|
}
|
@@ -54,6 +54,12 @@ class Feedback {
|
|
54
54
|
value: i[key]
|
55
55
|
}));
|
56
56
|
}
|
57
|
+
static toInstance(data, groups = ['admin']) {
|
58
|
+
return data ? (0, class_transformer_1.plainToInstance)(Feedback, data, { groups: groups || [] }) : null;
|
59
|
+
}
|
60
|
+
static toInstances(data, groups = ['admin']) {
|
61
|
+
return data ? (0, class_transformer_1.plainToInstance)(Feedback, data, { groups: groups || [] }) : [];
|
62
|
+
}
|
57
63
|
}
|
58
64
|
exports.Feedback = Feedback;
|
59
65
|
__decorate([
|
@@ -108,4 +114,16 @@ __decorate([
|
|
108
114
|
(0, class_transformer_1.Type)(() => feedback_item_model_1.FeedbackItem),
|
109
115
|
__metadata("design:type", Array)
|
110
116
|
], Feedback.prototype, "items", void 0);
|
117
|
+
__decorate([
|
118
|
+
(0, class_transformer_1.Expose)(),
|
119
|
+
__metadata("design:type", Function),
|
120
|
+
__metadata("design:paramtypes", [Object, Array]),
|
121
|
+
__metadata("design:returntype", void 0)
|
122
|
+
], Feedback, "toInstance", null);
|
123
|
+
__decorate([
|
124
|
+
(0, class_transformer_1.Expose)(),
|
125
|
+
__metadata("design:type", Function),
|
126
|
+
__metadata("design:paramtypes", [Array, Array]),
|
127
|
+
__metadata("design:returntype", void 0)
|
128
|
+
], Feedback, "toInstances", null);
|
111
129
|
//# sourceMappingURL=feedback.model.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"feedback.model.js","sourceRoot":"","sources":["../../src/feedback/feedback.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"feedback.model.js","sourceRoot":"","sources":["../../src/feedback/feedback.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA6E;AAC7E,mDAA0C;AAC1C,iDAA6C;AAC7C,yDAAgD;AAChD,mDAA0C;AAC1C,+DAAqD;AACrD,sCAAuC;AACvC,kCAAoC;AACpC,kCAA+B;AAE/B,MAAa,QAAQ;IAIpB,EAAE,CAAS;IAGX,IAAI,CAAW;IAKf,KAAK,CAAS;IAGd,WAAW,CAAQ;IAInB,IAAI,CAAS;IAab,OAAO,CAAW;IAMlB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAMhB,KAAK,CAAiB;IAEtB,YAAY,KAAyB;QACpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,IAAI,UAAU;QACb,OAAO,IAAI,EAAE,OAAO,EAAE,I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;AAIhB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;2CAAC;AAMhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,kCAAY,CAAC;;uCACH;AAqCf;IADN,IAAA,0BAAM,GAAE;;;;gCAGR;AAGM;IADN,IAAA,0BAAM,GAAE;;;;iCAGR"}
|
@@ -18,6 +18,12 @@ class GalleryItem {
|
|
18
18
|
constructor(props) {
|
19
19
|
Object.assign(this, props);
|
20
20
|
}
|
21
|
+
static toInstance(data, groups = ['admin']) {
|
22
|
+
return data ? (0, class_transformer_1.plainToInstance)(GalleryItem, data, { groups: groups || [] }) : null;
|
23
|
+
}
|
24
|
+
static toInstances(data, groups = ['admin']) {
|
25
|
+
return data ? (0, class_transformer_1.plainToInstance)(GalleryItem, data, { groups: groups || [] }) : [];
|
26
|
+
}
|
21
27
|
}
|
22
28
|
exports.GalleryItem = GalleryItem;
|
23
29
|
__decorate([
|
@@ -33,4 +39,16 @@ __decorate([
|
|
33
39
|
(0, class_transformer_1.Type)(() => Number),
|
34
40
|
__metadata("design:type", Number)
|
35
41
|
], GalleryItem.prototype, "sort", void 0);
|
42
|
+
__decorate([
|
43
|
+
(0, class_transformer_1.Expose)(),
|
44
|
+
__metadata("design:type", Function),
|
45
|
+
__metadata("design:paramtypes", [Object, Array]),
|
46
|
+
__metadata("design:returntype", void 0)
|
47
|
+
], GalleryItem, "toInstance", null);
|
48
|
+
__decorate([
|
49
|
+
(0, class_transformer_1.Expose)(),
|
50
|
+
__metadata("design:type", Function),
|
51
|
+
__metadata("design:paramtypes", [Array, Array]),
|
52
|
+
__metadata("design:returntype", void 0)
|
53
|
+
], GalleryItem, "toInstances", null);
|
36
54
|
//# sourceMappingURL=gallery.model.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gallery.model.js","sourceRoot":"","sources":["../../src/gallery/gallery.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"gallery.model.js","sourceRoot":"","sources":["../../src/gallery/gallery.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAkE;AAGlE,MAAa,WAAW;IAGvB,KAAK,CAAS;IAGd,QAAQ,CAAS;IAIjB,IAAI,CAAS;IAEb,YAAY,KAA4B;QACvC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAGM,AAAP,MAAM,CAAC,UAAU,CAAC,IAAY,EAAE,SAAmB,CAAC,OAAO,CAAC;QAC3D,OAAO,IAAI,CAAC,CAAC,CAAC,IAAA,mCAAe,EAAC,WAAW,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACnF,CAAC;IAGM,AAAP,MAAM,CAAC,WAAW,CAAC,IAAW,EAAE,SAAmB,CAAC,OAAO,CAAC;QAC3D,OAAO,IAAI,CAAC,CAAC,CAAC,IAAA,mCAAe,EAAC,WAAW,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjF,CAAC;CACD;AAzBD,kCAyBC;AAtBA;IADC,IAAA,0BAAM,GAAE;;0CACK;AAGd;IADC,IAAA,0BAAM,GAAE;;6CACQ;AAIjB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;yCACN;AAON;IADN,IAAA,0BAAM,GAAE;;;;mCAGR;AAGM;IADN,IAAA,0BAAM,GAAE;;;;oCAGR"}
|