@intelact/bright 0.8.3 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/models/asset.js +24 -0
- package/lib/models/asset.js.map +1 -1
- package/lib/models/author.d.ts +1 -0
- package/lib/models/author.js +25 -0
- package/lib/models/author.js.map +1 -1
- package/lib/models/boost.js +15 -2
- package/lib/models/boost.js.map +1 -1
- package/lib/models/brand.d.ts +4 -0
- package/lib/models/brand.js +143 -1
- package/lib/models/brand.js.map +1 -1
- package/lib/models/category.js +15 -0
- package/lib/models/category.js.map +1 -1
- package/lib/models/collection.js +6 -0
- package/lib/models/collection.js.map +1 -1
- package/lib/models/feedback.js +31 -0
- package/lib/models/feedback.js.map +1 -1
- package/lib/models/gallery.js +9 -0
- package/lib/models/gallery.js.map +1 -1
- package/lib/models/item.js.map +1 -1
- package/lib/models/link.d.ts +2 -1
- package/lib/models/link.js +7 -4
- package/lib/models/link.js.map +1 -1
- package/lib/models/notification.js +28 -1
- package/lib/models/notification.js.map +1 -1
- package/lib/models/post.js +77 -0
- package/lib/models/post.js.map +1 -1
- package/lib/models/promotion.js +19 -0
- package/lib/models/promotion.js.map +1 -1
- package/lib/models/publisher.js +32 -0
- package/lib/models/publisher.js.map +1 -1
- package/lib/models/question.js +76 -0
- package/lib/models/question.js.map +1 -1
- package/lib/models/quote.js +6 -0
- package/lib/models/quote.js.map +1 -1
- package/lib/models/survey.js +39 -0
- package/lib/models/survey.js.map +1 -1
- package/lib/models/topic.js +15 -0
- package/lib/models/topic.js.map +1 -1
- package/lib/models/user.js +47 -1
- package/lib/models/user.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -11,19 +11,38 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.NotificationToken = exports.Notification = void 0;
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
14
|
+
const enums_1 = require("../enums");
|
14
15
|
class Notification {
|
15
16
|
type;
|
16
17
|
title;
|
17
18
|
message;
|
18
19
|
data;
|
19
|
-
autoClose
|
20
|
+
autoClose;
|
20
21
|
constructor(props) {
|
21
22
|
Object.assign(this, props);
|
22
23
|
}
|
23
24
|
}
|
24
25
|
exports.Notification = Notification;
|
25
26
|
__decorate([
|
27
|
+
(0, class_transformer_1.Expose)(),
|
28
|
+
__metadata("design:type", String)
|
29
|
+
], Notification.prototype, "type", void 0);
|
30
|
+
__decorate([
|
31
|
+
(0, class_transformer_1.Expose)(),
|
32
|
+
__metadata("design:type", String)
|
33
|
+
], Notification.prototype, "title", void 0);
|
34
|
+
__decorate([
|
35
|
+
(0, class_transformer_1.Expose)(),
|
36
|
+
__metadata("design:type", String)
|
37
|
+
], Notification.prototype, "message", void 0);
|
38
|
+
__decorate([
|
39
|
+
(0, class_transformer_1.Expose)(),
|
40
|
+
__metadata("design:type", String)
|
41
|
+
], Notification.prototype, "data", void 0);
|
42
|
+
__decorate([
|
43
|
+
(0, class_transformer_1.Expose)(),
|
26
44
|
(0, class_transformer_1.Type)(() => Number),
|
45
|
+
(0, class_transformer_1.Transform)(({ value }) => value || 5000),
|
27
46
|
__metadata("design:type", Number)
|
28
47
|
], Notification.prototype, "autoClose", void 0);
|
29
48
|
class NotificationToken {
|
@@ -34,4 +53,12 @@ class NotificationToken {
|
|
34
53
|
}
|
35
54
|
}
|
36
55
|
exports.NotificationToken = NotificationToken;
|
56
|
+
__decorate([
|
57
|
+
(0, class_transformer_1.Expose)(),
|
58
|
+
__metadata("design:type", String)
|
59
|
+
], NotificationToken.prototype, "deviceType", void 0);
|
60
|
+
__decorate([
|
61
|
+
(0, class_transformer_1.Expose)(),
|
62
|
+
__metadata("design:type", String)
|
63
|
+
], NotificationToken.prototype, "token", void 0);
|
37
64
|
//# sourceMappingURL=notification.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../src/models/notification.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../src/models/notification.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA4D;AAC5D,oCAA4C;AAK5C,MAAa,YAAY;IAMxB,IAAI,CAAmB;IAMvB,KAAK,CAAS;IAMd,OAAO,CAAS;IAMhB,IAAI,CAAS;IAQb,SAAS,CAAS;IAElB,YAAY,KAA6B;QACxC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AArCD,oCAqCC;AA/BA;IADC,IAAA,0BAAM,GAAE;;0CACc;AAMvB;IADC,IAAA,0BAAM,GAAE;;2CACK;AAMd;IADC,IAAA,0BAAM,GAAE;;6CACO;AAMhB;IADC,IAAA,0BAAM,GAAE;;0CACI;AAQb;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC;;+CACtB;AAUnB,MAAa,iBAAiB;IAM7B,UAAU,CAAS;IAMnB,KAAK,CAAS;IAEd,YAAY,KAAkC;QAC7C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAjBD,8CAiBC;AAXA;IADC,IAAA,0BAAM,GAAE;;qDACU;AAMnB;IADC,IAAA,0BAAM,GAAE;;gDACK"}
|
package/lib/models/post.js
CHANGED
@@ -67,14 +67,17 @@ class Post {
|
|
67
67
|
}
|
68
68
|
exports.Post = Post;
|
69
69
|
__decorate([
|
70
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
70
71
|
(0, class_transformer_1.Type)(() => Number),
|
71
72
|
__metadata("design:type", Number)
|
72
73
|
], Post.prototype, "id", void 0);
|
73
74
|
__decorate([
|
75
|
+
(0, class_transformer_1.Expose)(),
|
74
76
|
(0, class_transformer_1.Type)(() => publisher_1.Publisher),
|
75
77
|
__metadata("design:type", publisher_1.Publisher)
|
76
78
|
], Post.prototype, "publisher", void 0);
|
77
79
|
__decorate([
|
80
|
+
(0, class_transformer_1.Expose)(),
|
78
81
|
(0, class_transformer_1.Type)(() => author_1.Author),
|
79
82
|
__metadata("design:type", author_1.Author)
|
80
83
|
], Post.prototype, "author", void 0);
|
@@ -83,62 +86,129 @@ __decorate([
|
|
83
86
|
__metadata("design:type", Array)
|
84
87
|
], Post.prototype, "topics", void 0);
|
85
88
|
__decorate([
|
89
|
+
(0, class_transformer_1.Expose)(),
|
86
90
|
(0, class_transformer_1.Type)(() => feedback_1.Feedback),
|
87
91
|
__metadata("design:type", feedback_1.Feedback)
|
88
92
|
], Post.prototype, "feedback", void 0);
|
89
93
|
__decorate([
|
94
|
+
(0, class_transformer_1.Expose)(),
|
90
95
|
(0, class_transformer_1.Type)(() => Post),
|
91
96
|
__metadata("design:type", Array)
|
92
97
|
], Post.prototype, "collection", void 0);
|
93
98
|
__decorate([
|
99
|
+
(0, class_transformer_1.Expose)(),
|
94
100
|
(0, class_transformer_1.Type)(() => gallery_1.GalleryItem),
|
95
101
|
__metadata("design:type", Array)
|
96
102
|
], Post.prototype, "gallery", void 0);
|
97
103
|
__decorate([
|
104
|
+
(0, class_transformer_1.Expose)(),
|
105
|
+
__metadata("design:type", String)
|
106
|
+
], Post.prototype, "postType", void 0);
|
107
|
+
__decorate([
|
108
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
109
|
+
__metadata("design:type", String)
|
110
|
+
], Post.prototype, "status", void 0);
|
111
|
+
__decorate([
|
112
|
+
(0, class_transformer_1.Expose)(),
|
113
|
+
__metadata("design:type", Object)
|
114
|
+
], Post.prototype, "info", void 0);
|
115
|
+
__decorate([
|
116
|
+
(0, class_transformer_1.Expose)(),
|
98
117
|
(0, class_transformer_1.Type)(() => Date),
|
99
118
|
__metadata("design:type", Date)
|
100
119
|
], Post.prototype, "publishedDate", void 0);
|
101
120
|
__decorate([
|
121
|
+
(0, class_transformer_1.Expose)(),
|
122
|
+
__metadata("design:type", String)
|
123
|
+
], Post.prototype, "slug", void 0);
|
124
|
+
__decorate([
|
125
|
+
(0, class_transformer_1.Expose)(),
|
126
|
+
__metadata("design:type", String)
|
127
|
+
], Post.prototype, "title", void 0);
|
128
|
+
__decorate([
|
129
|
+
(0, class_transformer_1.Expose)(),
|
130
|
+
__metadata("design:type", String)
|
131
|
+
], Post.prototype, "description", void 0);
|
132
|
+
__decorate([
|
133
|
+
(0, class_transformer_1.Expose)(),
|
134
|
+
__metadata("design:type", String)
|
135
|
+
], Post.prototype, "content", void 0);
|
136
|
+
__decorate([
|
137
|
+
(0, class_transformer_1.Expose)(),
|
102
138
|
(0, class_transformer_1.Type)(() => Number),
|
103
139
|
__metadata("design:type", Number)
|
104
140
|
], Post.prototype, "duration", void 0);
|
105
141
|
__decorate([
|
142
|
+
(0, class_transformer_1.Expose)(),
|
106
143
|
(0, class_transformer_1.Type)(() => Number),
|
107
144
|
__metadata("design:type", Number)
|
108
145
|
], Post.prototype, "totalHits", void 0);
|
109
146
|
__decorate([
|
147
|
+
(0, class_transformer_1.Expose)(),
|
110
148
|
(0, class_transformer_1.Type)(() => Number),
|
111
149
|
__metadata("design:type", Number)
|
112
150
|
], Post.prototype, "totalLikes", void 0);
|
113
151
|
__decorate([
|
152
|
+
(0, class_transformer_1.Expose)(),
|
114
153
|
(0, class_transformer_1.Type)(() => Number),
|
115
154
|
__metadata("design:type", Number)
|
116
155
|
], Post.prototype, "totalShares", void 0);
|
117
156
|
__decorate([
|
157
|
+
(0, class_transformer_1.Expose)(),
|
118
158
|
(0, class_transformer_1.Type)(() => Number),
|
119
159
|
__metadata("design:type", Number)
|
120
160
|
], Post.prototype, "totalBookmarks", void 0);
|
121
161
|
__decorate([
|
162
|
+
(0, class_transformer_1.Expose)(),
|
122
163
|
(0, class_transformer_1.Type)(() => Number),
|
123
164
|
__metadata("design:type", Number)
|
124
165
|
], Post.prototype, "totalDownloads", void 0);
|
125
166
|
__decorate([
|
167
|
+
(0, class_transformer_1.Expose)(),
|
126
168
|
(0, class_transformer_1.Type)(() => Boolean),
|
127
169
|
__metadata("design:type", Boolean)
|
128
170
|
], Post.prototype, "isBookmarked", void 0);
|
129
171
|
__decorate([
|
172
|
+
(0, class_transformer_1.Expose)(),
|
130
173
|
(0, class_transformer_1.Type)(() => Boolean),
|
131
174
|
__metadata("design:type", Boolean)
|
132
175
|
], Post.prototype, "isLiked", void 0);
|
133
176
|
__decorate([
|
177
|
+
(0, class_transformer_1.Expose)(),
|
134
178
|
(0, class_transformer_1.Type)(() => Boolean),
|
135
179
|
__metadata("design:type", Boolean)
|
136
180
|
], Post.prototype, "isShared", void 0);
|
137
181
|
__decorate([
|
182
|
+
(0, class_transformer_1.Expose)(),
|
138
183
|
(0, class_transformer_1.Type)(() => Boolean),
|
139
184
|
__metadata("design:type", Boolean)
|
140
185
|
], Post.prototype, "isDownloaded", void 0);
|
141
186
|
__decorate([
|
187
|
+
(0, class_transformer_1.Expose)(),
|
188
|
+
__metadata("design:type", String)
|
189
|
+
], Post.prototype, "pdfUrl", void 0);
|
190
|
+
__decorate([
|
191
|
+
(0, class_transformer_1.Expose)(),
|
192
|
+
__metadata("design:type", String)
|
193
|
+
], Post.prototype, "imageUrl", void 0);
|
194
|
+
__decorate([
|
195
|
+
(0, class_transformer_1.Expose)(),
|
196
|
+
__metadata("design:type", String)
|
197
|
+
], Post.prototype, "bannerUrl", void 0);
|
198
|
+
__decorate([
|
199
|
+
(0, class_transformer_1.Expose)(),
|
200
|
+
__metadata("design:type", String)
|
201
|
+
], Post.prototype, "mediaUrl", void 0);
|
202
|
+
__decorate([
|
203
|
+
(0, class_transformer_1.Expose)(),
|
204
|
+
__metadata("design:type", String)
|
205
|
+
], Post.prototype, "mediaEmbeddedUrl", void 0);
|
206
|
+
__decorate([
|
207
|
+
(0, class_transformer_1.Expose)(),
|
208
|
+
__metadata("design:type", String)
|
209
|
+
], Post.prototype, "externUrl", void 0);
|
210
|
+
__decorate([
|
211
|
+
(0, class_transformer_1.Expose)(),
|
142
212
|
(0, class_transformer_1.Transform)(({ obj }) => {
|
143
213
|
switch (obj.postType) {
|
144
214
|
case enums_1.PostType.Article:
|
@@ -158,6 +228,7 @@ __decorate([
|
|
158
228
|
__metadata("design:type", Object)
|
159
229
|
], Post.prototype, "icon", void 0);
|
160
230
|
__decorate([
|
231
|
+
(0, class_transformer_1.Expose)(),
|
161
232
|
(0, class_transformer_1.Transform)(({ obj }) => {
|
162
233
|
switch (obj.postType) {
|
163
234
|
case enums_1.PostType.Article:
|
@@ -177,10 +248,12 @@ __decorate([
|
|
177
248
|
__metadata("design:type", String)
|
178
249
|
], Post.prototype, "svgIcon", void 0);
|
179
250
|
__decorate([
|
251
|
+
(0, class_transformer_1.Expose)(),
|
180
252
|
(0, class_transformer_1.Transform)(({ obj }) => (obj?.topics?.map((i) => i.hash) || [])),
|
181
253
|
__metadata("design:type", Array)
|
182
254
|
], Post.prototype, "tags", void 0);
|
183
255
|
__decorate([
|
256
|
+
(0, class_transformer_1.Expose)(),
|
184
257
|
(0, class_transformer_1.Type)(() => item_1.Item),
|
185
258
|
(0, class_transformer_1.Transform)(({ obj }) => new item_1.Item({
|
186
259
|
value: obj.totalBookmarks || 0,
|
@@ -191,6 +264,7 @@ __decorate([
|
|
191
264
|
__metadata("design:type", item_1.Item)
|
192
265
|
], Post.prototype, "bookmark", void 0);
|
193
266
|
__decorate([
|
267
|
+
(0, class_transformer_1.Expose)(),
|
194
268
|
(0, class_transformer_1.Type)(() => item_1.Item),
|
195
269
|
(0, class_transformer_1.Transform)(({ obj }) => new item_1.Item({
|
196
270
|
value: obj.totalLikes || 0,
|
@@ -201,6 +275,7 @@ __decorate([
|
|
201
275
|
__metadata("design:type", item_1.Item)
|
202
276
|
], Post.prototype, "like", void 0);
|
203
277
|
__decorate([
|
278
|
+
(0, class_transformer_1.Expose)(),
|
204
279
|
(0, class_transformer_1.Type)(() => item_1.Item),
|
205
280
|
(0, class_transformer_1.Transform)(({ obj }) => new item_1.Item({
|
206
281
|
value: obj.totalShares || 0,
|
@@ -211,6 +286,7 @@ __decorate([
|
|
211
286
|
__metadata("design:type", item_1.Item)
|
212
287
|
], Post.prototype, "share", void 0);
|
213
288
|
__decorate([
|
289
|
+
(0, class_transformer_1.Expose)(),
|
214
290
|
(0, class_transformer_1.Type)(() => item_1.Item),
|
215
291
|
(0, class_transformer_1.Transform)(({ obj }) => new item_1.Item({
|
216
292
|
value: obj.totalHits || 0,
|
@@ -220,6 +296,7 @@ __decorate([
|
|
220
296
|
__metadata("design:type", item_1.Item)
|
221
297
|
], Post.prototype, "hit", void 0);
|
222
298
|
__decorate([
|
299
|
+
(0, class_transformer_1.Expose)(),
|
223
300
|
(0, class_transformer_1.Type)(() => item_1.Item),
|
224
301
|
(0, class_transformer_1.Transform)(({ obj }) => new item_1.Item({
|
225
302
|
value: obj.totalDownloads || 0,
|
package/lib/models/post.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"post.js","sourceRoot":"","sources":["../../src/models/post.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"post.js","sourceRoot":"","sources":["../../src/models/post.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA4D;AAE5D,qCAAkC;AAClC,2CAAwC;AACxC,mCAAgC;AAChC,oCAA0D;AAC1D,uCAAwC;AACxC,yCAAsC;AACtC,iCAA8B;AAM9B,MAAa,IAAI;IAIhB,EAAE,CAAS;IAIX,SAAS,CAAY;IAIrB,MAAM,CAAS;IAGf,MAAM,CAAU;IAIhB,QAAQ,CAAW;IAInB,UAAU,CAAQ;IAIlB,OAAO,CAAgB;IAGvB,QAAQ,CAAsB;IAG9B,MAAM,CAAa;IAGnB,IAAI,CAAmB;IAIvB,aAAa,CAAO;IAGpB,IAAI,CAAS;IAGb,KAAK,CAAS;IAGd,WAAW,CAAS;IAGpB,OAAO,CA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O,WAAI;sCAAS"}
|
package/lib/models/promotion.js
CHANGED
@@ -25,14 +25,33 @@ class Promotion {
|
|
25
25
|
}
|
26
26
|
exports.Promotion = Promotion;
|
27
27
|
__decorate([
|
28
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
28
29
|
(0, class_transformer_1.Type)(() => Number),
|
29
30
|
__metadata("design:type", Number)
|
30
31
|
], Promotion.prototype, "id", void 0);
|
31
32
|
__decorate([
|
33
|
+
(0, class_transformer_1.Expose)(),
|
34
|
+
__metadata("design:type", String)
|
35
|
+
], Promotion.prototype, "title", void 0);
|
36
|
+
__decorate([
|
37
|
+
(0, class_transformer_1.Expose)(),
|
38
|
+
__metadata("design:type", String)
|
39
|
+
], Promotion.prototype, "imageUrl", void 0);
|
40
|
+
__decorate([
|
41
|
+
(0, class_transformer_1.Expose)(),
|
42
|
+
__metadata("design:type", String)
|
43
|
+
], Promotion.prototype, "bannerUrl", void 0);
|
44
|
+
__decorate([
|
45
|
+
(0, class_transformer_1.Expose)(),
|
46
|
+
__metadata("design:type", String)
|
47
|
+
], Promotion.prototype, "url", void 0);
|
48
|
+
__decorate([
|
49
|
+
(0, class_transformer_1.Expose)(),
|
32
50
|
(0, class_transformer_1.Type)(() => Date),
|
33
51
|
__metadata("design:type", Date)
|
34
52
|
], Promotion.prototype, "startDate", void 0);
|
35
53
|
__decorate([
|
54
|
+
(0, class_transformer_1.Expose)(),
|
36
55
|
(0, class_transformer_1.Type)(() => Date),
|
37
56
|
__metadata("design:type", Date)
|
38
57
|
], Promotion.prototype, "endDate", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"promotion.js","sourceRoot":"","sources":["../../src/models/promotion.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"promotion.js","sourceRoot":"","sources":["../../src/models/promotion.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AAMjD,MAAa,SAAS;IAIrB,EAAE,CAAS;IAGX,KAAK,CAAS;IAGd,QAAQ,CAAS;IAMjB,SAAS,CAAS;IAGlB,GAAG,CAAS;IAIZ,SAAS,CAAO;IAIhB,OAAO,CAAO;IAEd,YAAY,KAA0B;QACrC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAhCD,8BAgCC;AA5BA;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;qCACR;AAGX;IADC,IAAA,0BAAM,GAAE;;wCACK;AAGd;IADC,IAAA,0BAAM,GAAE;;2CACQ;AAMjB;IADC,IAAA,0BAAM,GAAE;;4CACS;AAGlB;IADC,IAAA,0BAAM,GAAE;;sCACG;AAIZ;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;4CAAC;AAIhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACR,IAAI;0CAAC"}
|
package/lib/models/publisher.js
CHANGED
@@ -42,18 +42,50 @@ class Publisher {
|
|
42
42
|
}
|
43
43
|
exports.Publisher = Publisher;
|
44
44
|
__decorate([
|
45
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
45
46
|
(0, class_transformer_1.Type)(() => Number),
|
46
47
|
__metadata("design:type", Number)
|
47
48
|
], Publisher.prototype, "id", void 0);
|
48
49
|
__decorate([
|
50
|
+
(0, class_transformer_1.Expose)(),
|
51
|
+
__metadata("design:type", String)
|
52
|
+
], Publisher.prototype, "name", void 0);
|
53
|
+
__decorate([
|
54
|
+
(0, class_transformer_1.Expose)(),
|
55
|
+
__metadata("design:type", String)
|
56
|
+
], Publisher.prototype, "slogan", void 0);
|
57
|
+
__decorate([
|
58
|
+
(0, class_transformer_1.Expose)(),
|
59
|
+
__metadata("design:type", String)
|
60
|
+
], Publisher.prototype, "description", void 0);
|
61
|
+
__decorate([
|
62
|
+
(0, class_transformer_1.Expose)(),
|
63
|
+
__metadata("design:type", String)
|
64
|
+
], Publisher.prototype, "url", void 0);
|
65
|
+
__decorate([
|
66
|
+
(0, class_transformer_1.Expose)(),
|
67
|
+
__metadata("design:type", String)
|
68
|
+
], Publisher.prototype, "logo", void 0);
|
69
|
+
__decorate([
|
70
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
71
|
+
__metadata("design:type", String)
|
72
|
+
], Publisher.prototype, "status", void 0);
|
73
|
+
__decorate([
|
74
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
75
|
+
__metadata("design:type", Array)
|
76
|
+
], Publisher.prototype, "allowedPostTypes", void 0);
|
77
|
+
__decorate([
|
78
|
+
(0, class_transformer_1.Expose)(),
|
49
79
|
(0, class_transformer_1.Type)(() => Boolean),
|
50
80
|
__metadata("design:type", Boolean)
|
51
81
|
], Publisher.prototype, "publicVisibility", void 0);
|
52
82
|
__decorate([
|
83
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
53
84
|
(0, class_transformer_1.Type)(() => Number),
|
54
85
|
__metadata("design:type", Number)
|
55
86
|
], Publisher.prototype, "totalUsers", void 0);
|
56
87
|
__decorate([
|
88
|
+
(0, class_transformer_1.Expose)(),
|
57
89
|
(0, class_transformer_1.Type)(() => Number),
|
58
90
|
__metadata("design:type", Number)
|
59
91
|
], Publisher.prototype, "totalPosts", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"publisher.js","sourceRoot":"","sources":["../../src/models/publisher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"publisher.js","sourceRoot":"","sources":["../../src/models/publisher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,oCAAuD;AAKvD,MAAa,SAAS;IAIrB,EAAE,CA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,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;mDACM;AAI1B;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;6CACA;AAInB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;6CACA"}
|
package/lib/models/question.js
CHANGED
@@ -14,6 +14,7 @@ const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const author_1 = require("./author");
|
15
15
|
const user_1 = require("./user");
|
16
16
|
const category_1 = require("./category");
|
17
|
+
const enums_1 = require("../enums");
|
17
18
|
const item_1 = require("./item");
|
18
19
|
class Question {
|
19
20
|
id;
|
@@ -55,86 +56,135 @@ class Question {
|
|
55
56
|
}
|
56
57
|
exports.Question = Question;
|
57
58
|
__decorate([
|
59
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
58
60
|
(0, class_transformer_1.Type)(() => Number),
|
59
61
|
__metadata("design:type", Number)
|
60
62
|
], Question.prototype, "id", void 0);
|
61
63
|
__decorate([
|
64
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
65
|
+
__metadata("design:type", String)
|
66
|
+
], Question.prototype, "status", void 0);
|
67
|
+
__decorate([
|
68
|
+
(0, class_transformer_1.Expose)(),
|
69
|
+
__metadata("design:type", String)
|
70
|
+
], Question.prototype, "slug", void 0);
|
71
|
+
__decorate([
|
72
|
+
(0, class_transformer_1.Expose)(),
|
73
|
+
__metadata("design:type", String)
|
74
|
+
], Question.prototype, "title", void 0);
|
75
|
+
__decorate([
|
76
|
+
(0, class_transformer_1.Expose)(),
|
77
|
+
__metadata("design:type", String)
|
78
|
+
], Question.prototype, "name", void 0);
|
79
|
+
__decorate([
|
80
|
+
(0, class_transformer_1.Expose)(),
|
81
|
+
__metadata("design:type", String)
|
82
|
+
], Question.prototype, "email", void 0);
|
83
|
+
__decorate([
|
84
|
+
(0, class_transformer_1.Expose)(),
|
85
|
+
__metadata("design:type", String)
|
86
|
+
], Question.prototype, "phone", void 0);
|
87
|
+
__decorate([
|
88
|
+
(0, class_transformer_1.Expose)(),
|
89
|
+
__metadata("design:type", String)
|
90
|
+
], Question.prototype, "question", void 0);
|
91
|
+
__decorate([
|
92
|
+
(0, class_transformer_1.Expose)(),
|
62
93
|
(0, class_transformer_1.Type)(() => Boolean),
|
63
94
|
__metadata("design:type", Boolean)
|
64
95
|
], Question.prototype, "private", void 0);
|
65
96
|
__decorate([
|
97
|
+
(0, class_transformer_1.Expose)(),
|
66
98
|
(0, class_transformer_1.Type)(() => Boolean),
|
67
99
|
__metadata("design:type", Boolean)
|
68
100
|
], Question.prototype, "closed", void 0);
|
69
101
|
__decorate([
|
102
|
+
(0, class_transformer_1.Expose)(),
|
70
103
|
(0, class_transformer_1.Type)(() => Number),
|
71
104
|
__metadata("design:type", Number)
|
72
105
|
], Question.prototype, "totalHits", void 0);
|
73
106
|
__decorate([
|
107
|
+
(0, class_transformer_1.Expose)(),
|
74
108
|
(0, class_transformer_1.Type)(() => Number),
|
75
109
|
__metadata("design:type", Number)
|
76
110
|
], Question.prototype, "totalComments", void 0);
|
77
111
|
__decorate([
|
112
|
+
(0, class_transformer_1.Expose)(),
|
78
113
|
(0, class_transformer_1.Type)(() => Number),
|
79
114
|
__metadata("design:type", Number)
|
80
115
|
], Question.prototype, "totalItems", void 0);
|
81
116
|
__decorate([
|
117
|
+
(0, class_transformer_1.Expose)(),
|
82
118
|
(0, class_transformer_1.Type)(() => Number),
|
83
119
|
__metadata("design:type", Number)
|
84
120
|
], Question.prototype, "totalLikes", void 0);
|
85
121
|
__decorate([
|
122
|
+
(0, class_transformer_1.Expose)(),
|
86
123
|
(0, class_transformer_1.Type)(() => Number),
|
87
124
|
__metadata("design:type", Number)
|
88
125
|
], Question.prototype, "totalShares", void 0);
|
89
126
|
__decorate([
|
127
|
+
(0, class_transformer_1.Expose)(),
|
90
128
|
(0, class_transformer_1.Type)(() => Number),
|
91
129
|
__metadata("design:type", Number)
|
92
130
|
], Question.prototype, "totalBookmarks", void 0);
|
93
131
|
__decorate([
|
132
|
+
(0, class_transformer_1.Expose)(),
|
94
133
|
(0, class_transformer_1.Type)(() => Boolean),
|
95
134
|
__metadata("design:type", Boolean)
|
96
135
|
], Question.prototype, "isBookmarked", void 0);
|
97
136
|
__decorate([
|
137
|
+
(0, class_transformer_1.Expose)(),
|
98
138
|
(0, class_transformer_1.Type)(() => Boolean),
|
99
139
|
__metadata("design:type", Boolean)
|
100
140
|
], Question.prototype, "isLiked", void 0);
|
101
141
|
__decorate([
|
142
|
+
(0, class_transformer_1.Expose)(),
|
102
143
|
(0, class_transformer_1.Type)(() => Boolean),
|
103
144
|
__metadata("design:type", Boolean)
|
104
145
|
], Question.prototype, "isShared", void 0);
|
105
146
|
__decorate([
|
147
|
+
(0, class_transformer_1.Expose)(),
|
106
148
|
(0, class_transformer_1.Type)(() => Boolean),
|
107
149
|
__metadata("design:type", Boolean)
|
108
150
|
], Question.prototype, "myQuestion", void 0);
|
109
151
|
__decorate([
|
152
|
+
(0, class_transformer_1.Expose)(),
|
110
153
|
(0, class_transformer_1.Type)(() => Date),
|
111
154
|
__metadata("design:type", Date)
|
112
155
|
], Question.prototype, "createdOn", void 0);
|
113
156
|
__decorate([
|
157
|
+
(0, class_transformer_1.Expose)(),
|
114
158
|
(0, class_transformer_1.Type)(() => user_1.User),
|
115
159
|
__metadata("design:type", user_1.User)
|
116
160
|
], Question.prototype, "user", void 0);
|
117
161
|
__decorate([
|
162
|
+
(0, class_transformer_1.Expose)(),
|
118
163
|
(0, class_transformer_1.Type)(() => QuestionComment),
|
119
164
|
__metadata("design:type", Array)
|
120
165
|
], Question.prototype, "comments", void 0);
|
121
166
|
__decorate([
|
167
|
+
(0, class_transformer_1.Expose)(),
|
122
168
|
(0, class_transformer_1.Type)(() => QuestionComment),
|
123
169
|
__metadata("design:type", Array)
|
124
170
|
], Question.prototype, "items", void 0);
|
125
171
|
__decorate([
|
172
|
+
(0, class_transformer_1.Expose)(),
|
126
173
|
(0, class_transformer_1.Type)(() => category_1.Category),
|
127
174
|
__metadata("design:type", Array)
|
128
175
|
], Question.prototype, "categories", void 0);
|
129
176
|
__decorate([
|
177
|
+
(0, class_transformer_1.Expose)(),
|
130
178
|
(0, class_transformer_1.Type)(() => QuestionComment),
|
131
179
|
__metadata("design:type", Array)
|
132
180
|
], Question.prototype, "topics", void 0);
|
133
181
|
__decorate([
|
182
|
+
(0, class_transformer_1.Expose)(),
|
134
183
|
(0, class_transformer_1.Transform)(({ obj }) => (obj?.categories?.map((i) => i.hash) || [])),
|
135
184
|
__metadata("design:type", Array)
|
136
185
|
], Question.prototype, "tags", void 0);
|
137
186
|
__decorate([
|
187
|
+
(0, class_transformer_1.Expose)(),
|
138
188
|
(0, class_transformer_1.Type)(() => item_1.Item),
|
139
189
|
(0, class_transformer_1.Transform)(({ obj }) => new item_1.Item({
|
140
190
|
value: obj.totalBookmarks || 0,
|
@@ -145,6 +195,7 @@ __decorate([
|
|
145
195
|
__metadata("design:type", item_1.Item)
|
146
196
|
], Question.prototype, "bookmark", void 0);
|
147
197
|
__decorate([
|
198
|
+
(0, class_transformer_1.Expose)(),
|
148
199
|
(0, class_transformer_1.Type)(() => item_1.Item),
|
149
200
|
(0, class_transformer_1.Transform)(({ obj }) => new item_1.Item({
|
150
201
|
value: obj.totalLikes || 0,
|
@@ -155,6 +206,7 @@ __decorate([
|
|
155
206
|
__metadata("design:type", item_1.Item)
|
156
207
|
], Question.prototype, "like", void 0);
|
157
208
|
__decorate([
|
209
|
+
(0, class_transformer_1.Expose)(),
|
158
210
|
(0, class_transformer_1.Type)(() => item_1.Item),
|
159
211
|
(0, class_transformer_1.Transform)(({ obj }) => new item_1.Item({
|
160
212
|
value: obj.totalShares || 0,
|
@@ -165,6 +217,7 @@ __decorate([
|
|
165
217
|
__metadata("design:type", item_1.Item)
|
166
218
|
], Question.prototype, "share", void 0);
|
167
219
|
__decorate([
|
220
|
+
(0, class_transformer_1.Expose)(),
|
168
221
|
(0, class_transformer_1.Type)(() => item_1.Item),
|
169
222
|
(0, class_transformer_1.Transform)(({ obj }) => new item_1.Item({
|
170
223
|
value: obj.totalHits || 0,
|
@@ -174,15 +227,18 @@ __decorate([
|
|
174
227
|
__metadata("design:type", item_1.Item)
|
175
228
|
], Question.prototype, "hit", void 0);
|
176
229
|
__decorate([
|
230
|
+
(0, class_transformer_1.Expose)(),
|
177
231
|
(0, class_transformer_1.Type)(() => item_1.Item),
|
178
232
|
(0, class_transformer_1.Transform)(({ obj }) => new item_1.Item({
|
179
233
|
value: obj.totalComments || 0,
|
234
|
+
active: obj.totalComments > 0,
|
180
235
|
icon: ['far', 'comment'],
|
181
236
|
iconSelected: ['fas', 'comment'],
|
182
237
|
})),
|
183
238
|
__metadata("design:type", item_1.Item)
|
184
239
|
], Question.prototype, "reactions", void 0);
|
185
240
|
__decorate([
|
241
|
+
(0, class_transformer_1.Expose)(),
|
186
242
|
(0, class_transformer_1.Transform)(() => new item_1.Item({
|
187
243
|
title: 'myQuestion',
|
188
244
|
value: 'text-bg-secondary',
|
@@ -204,18 +260,38 @@ class QuestionComment {
|
|
204
260
|
}
|
205
261
|
exports.QuestionComment = QuestionComment;
|
206
262
|
__decorate([
|
263
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
207
264
|
(0, class_transformer_1.Type)(() => Number),
|
208
265
|
__metadata("design:type", Number)
|
209
266
|
], QuestionComment.prototype, "id", void 0);
|
210
267
|
__decorate([
|
268
|
+
(0, class_transformer_1.Expose)(),
|
269
|
+
__metadata("design:type", Question)
|
270
|
+
], QuestionComment.prototype, "question", void 0);
|
271
|
+
__decorate([
|
272
|
+
(0, class_transformer_1.Expose)(),
|
211
273
|
(0, class_transformer_1.Type)(() => author_1.Author),
|
212
274
|
__metadata("design:type", author_1.Author)
|
213
275
|
], QuestionComment.prototype, "author", void 0);
|
214
276
|
__decorate([
|
277
|
+
(0, class_transformer_1.Expose)(),
|
278
|
+
__metadata("design:type", String)
|
279
|
+
], QuestionComment.prototype, "comment", void 0);
|
280
|
+
__decorate([
|
281
|
+
(0, class_transformer_1.Expose)(),
|
282
|
+
__metadata("design:type", String)
|
283
|
+
], QuestionComment.prototype, "content", void 0);
|
284
|
+
__decorate([
|
285
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
286
|
+
__metadata("design:type", String)
|
287
|
+
], QuestionComment.prototype, "status", void 0);
|
288
|
+
__decorate([
|
289
|
+
(0, class_transformer_1.Expose)(),
|
215
290
|
(0, class_transformer_1.Type)(() => Date),
|
216
291
|
__metadata("design:type", Date)
|
217
292
|
], QuestionComment.prototype, "publishedDate", void 0);
|
218
293
|
__decorate([
|
294
|
+
(0, class_transformer_1.Expose)(),
|
219
295
|
(0, class_transformer_1.Type)(() => Date),
|
220
296
|
__metadata("design:type", Date)
|
221
297
|
], QuestionComment.prototype, "createdOn", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"question.js","sourceRoot":"","sources":["../../src/models/question.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"question.js","sourceRoot":"","sources":["../../src/models/question.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA4D;AAC5D,qCAAkC;AAClC,iCAA8B;AAC9B,yCAAsC;AACtC,oCAAsC;AACtC,iCAA8B;AAK9B,MAAa,QAAQ;IAIpB,EAAE,CAAS;IAGX,MAAM,CAAa;IAGnB,IAAI,CAAS;IAGb,KAAK,CAAS;IAMd,IAAI,CAAS;IAMb,KAAK,CAAS;IAMd,KAAK,CAAS;IAGd,QAAQ,CAAS;IAIjB,OAAO,CAAU;IAIjB,MAAM,CAAU;IAIhB,SAAS,CAAS;IAIlB,aAAa,CAAS;IAOtB,UAAU,CAAS;IAInB,UAAU,CAAS;IAInB,WAAW,CAAS;IAIpB,cAAc,CAAS;IAIvB,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;8BACI,WAAI;uCAAS;AAWrB,MAAa,eAAe;IAI3B,EAAE,CAAS;IAGX,QAAQ,CAAW;IAQnB,MAAM,CAAS;IAGf,OAAO,CAAS;IAMhB,OAAO,CAAS;IAGhB,MAAM,CAAa;IAInB,aAAa,CAAO;IAIpB,SAAS,CAAO;IAEhB,YAAY,KAAgC;QAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAxCD,0CAwCC;AApCA;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;2CACR;AAGX;IADC,IAAA,0BAAM,GAAE;8BACC,QAAQ;iDAAC;AAQnB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;8BACX,eAAM;+CAAC;AAGf;IADC,IAAA,0BAAM,GAAE;;gDACO;AAMhB;IADC,IAAA,0BAAM,GAAE;;gDACO;AAGhB;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;+CACX;AAInB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACF,IAAI;sDAAC;AAIpB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;kDAAC"}
|
package/lib/models/quote.js
CHANGED
@@ -21,10 +21,16 @@ class Quote {
|
|
21
21
|
}
|
22
22
|
exports.Quote = Quote;
|
23
23
|
__decorate([
|
24
|
+
(0, class_transformer_1.Expose)({ groups: ['admin'] }),
|
24
25
|
(0, class_transformer_1.Type)(() => Number),
|
25
26
|
__metadata("design:type", Number)
|
26
27
|
], Quote.prototype, "id", void 0);
|
27
28
|
__decorate([
|
29
|
+
(0, class_transformer_1.Expose)(),
|
30
|
+
__metadata("design:type", String)
|
31
|
+
], Quote.prototype, "imageUrl", void 0);
|
32
|
+
__decorate([
|
33
|
+
(0, class_transformer_1.Expose)(),
|
28
34
|
(0, class_transformer_1.Type)(() => Date),
|
29
35
|
__metadata("design:type", Date)
|
30
36
|
], Quote.prototype, "publishedDate", void 0);
|