@intelact/bright 0.9.76 → 0.9.77
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/dtos/boost.dto.d.ts +0 -12
- package/lib/dtos/boost.dto.js +1 -50
- package/lib/dtos/boost.dto.js.map +1 -1
- package/lib/dtos/brand.dto.d.ts +0 -15
- package/lib/dtos/brand.dto.js +1 -46
- package/lib/dtos/brand.dto.js.map +1 -1
- package/lib/dtos/feedback.dto.d.ts +0 -9
- package/lib/dtos/feedback.dto.js +1 -28
- package/lib/dtos/feedback.dto.js.map +1 -1
- package/lib/dtos/general.dto.d.ts +3 -0
- package/lib/dtos/general.dto.js +10 -1
- package/lib/dtos/general.dto.js.map +1 -1
- package/lib/dtos/index.d.ts +0 -4
- package/lib/dtos/index.js +0 -4
- package/lib/dtos/index.js.map +1 -1
- package/lib/dtos/post.dto.d.ts +0 -22
- package/lib/dtos/post.dto.js +1 -65
- package/lib/dtos/post.dto.js.map +1 -1
- package/lib/dtos/promotion.dto.d.ts +0 -8
- package/lib/dtos/promotion.dto.js +1 -37
- package/lib/dtos/promotion.dto.js.map +1 -1
- package/lib/dtos/question.dto.d.ts +0 -19
- package/lib/dtos/question.dto.js +1 -62
- package/lib/dtos/question.dto.js.map +1 -1
- package/lib/dtos/search.dto.d.ts +12 -0
- package/lib/dtos/search.dto.js +72 -0
- package/lib/dtos/search.dto.js.map +1 -0
- package/lib/dtos/survey.dto.d.ts +0 -24
- package/lib/dtos/survey.dto.js +1 -90
- package/lib/dtos/survey.dto.js.map +1 -1
- package/lib/dtos/user.dto.d.ts +0 -3
- package/lib/dtos/user.dto.js +1 -10
- package/lib/dtos/user.dto.js.map +1 -1
- package/lib/enums/asset.enum.js.map +1 -1
- package/lib/enums/index.d.ts +0 -1
- package/lib/enums/index.js +0 -1
- package/lib/enums/index.js.map +1 -1
- package/lib/enums/module.enum.d.ts +0 -19
- package/lib/enums/module.enum.js +1 -21
- package/lib/enums/module.enum.js.map +1 -1
- package/lib/enums/setting.enum.d.ts +2 -2
- package/lib/enums/setting.enum.js +2 -2
- package/lib/enums/tracks.enum.d.ts +13 -2
- package/lib/enums/tracks.enum.js +23 -11
- package/lib/enums/tracks.enum.js.map +1 -1
- package/lib/models/author.d.ts +6 -4
- package/lib/models/author.js +22 -18
- package/lib/models/author.js.map +1 -1
- package/lib/models/boost.d.ts +5 -6
- package/lib/models/boost.js +17 -23
- package/lib/models/boost.js.map +1 -1
- package/lib/models/brand.d.ts +3 -1
- package/lib/models/brand.js +23 -3
- package/lib/models/brand.js.map +1 -1
- package/lib/models/category.d.ts +2 -1
- package/lib/models/category.js +7 -5
- package/lib/models/category.js.map +1 -1
- package/lib/models/collection.d.ts +5 -5
- package/lib/models/collection.js +19 -18
- package/lib/models/collection.js.map +1 -1
- package/lib/models/feedback.d.ts +7 -2
- package/lib/models/feedback.js +35 -28
- package/lib/models/feedback.js.map +1 -1
- package/lib/models/index.d.ts +2 -1
- package/lib/models/index.js +2 -1
- package/lib/models/index.js.map +1 -1
- package/lib/models/log.d.ts +11 -0
- package/lib/models/log.js +16 -0
- package/lib/models/log.js.map +1 -0
- package/lib/models/metric.d.ts +20 -0
- package/lib/models/metric.js +186 -0
- package/lib/models/metric.js.map +1 -0
- package/lib/models/post.d.ts +21 -29
- package/lib/models/post.js +213 -242
- package/lib/models/post.js.map +1 -1
- package/lib/models/promotion.d.ts +7 -2
- package/lib/models/promotion.js +31 -3
- package/lib/models/promotion.js.map +1 -1
- package/lib/models/publisher.d.ts +7 -3
- package/lib/models/publisher.js +30 -14
- package/lib/models/publisher.js.map +1 -1
- package/lib/models/question.d.ts +20 -29
- package/lib/models/question.js +88 -174
- package/lib/models/question.js.map +1 -1
- package/lib/models/quote.d.ts +0 -1
- package/lib/models/quote.js +0 -6
- package/lib/models/quote.js.map +1 -1
- package/lib/models/survey.d.ts +10 -2
- package/lib/models/survey.js +51 -25
- package/lib/models/survey.js.map +1 -1
- package/lib/models/topic.d.ts +5 -1
- package/lib/models/topic.js +26 -10
- package/lib/models/topic.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -0,0 +1,186 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.Metric = void 0;
|
13
|
+
const enums_1 = require("../enums");
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
15
|
+
class Metric {
|
16
|
+
name;
|
17
|
+
title;
|
18
|
+
type;
|
19
|
+
value;
|
20
|
+
active;
|
21
|
+
icon;
|
22
|
+
iconActive;
|
23
|
+
constructor(props) {
|
24
|
+
Object.assign(this, props);
|
25
|
+
}
|
26
|
+
static seen(val, active) {
|
27
|
+
return new Metric({
|
28
|
+
title: 'seen',
|
29
|
+
type: enums_1.MetricType.Seen,
|
30
|
+
icon: ['fas', 'eye'],
|
31
|
+
iconActive: ['fas', 'eye'],
|
32
|
+
value: val || 0,
|
33
|
+
active: active
|
34
|
+
});
|
35
|
+
}
|
36
|
+
static open(val, active) {
|
37
|
+
return new Metric({
|
38
|
+
title: 'opens',
|
39
|
+
type: enums_1.MetricType.Open,
|
40
|
+
icon: ['fas', 'book-open'],
|
41
|
+
iconActive: ['fas', 'book-open-reader'],
|
42
|
+
value: val || 0,
|
43
|
+
active: active
|
44
|
+
});
|
45
|
+
}
|
46
|
+
static like(val, active) {
|
47
|
+
return new Metric({
|
48
|
+
title: 'likes',
|
49
|
+
type: enums_1.MetricType.Like,
|
50
|
+
icon: ['far', 'heart'],
|
51
|
+
iconActive: ['fas', 'heart'],
|
52
|
+
value: val || 0,
|
53
|
+
active: active
|
54
|
+
});
|
55
|
+
}
|
56
|
+
static bookmark(val, active) {
|
57
|
+
return new Metric({
|
58
|
+
title: 'bookmarks',
|
59
|
+
type: enums_1.MetricType.Bookmark,
|
60
|
+
icon: ['far', 'bookmark'],
|
61
|
+
iconActive: ['fas', 'bookmark'],
|
62
|
+
value: val || 0,
|
63
|
+
active: active
|
64
|
+
});
|
65
|
+
}
|
66
|
+
static share(val, active) {
|
67
|
+
return new Metric({
|
68
|
+
title: 'shares',
|
69
|
+
type: enums_1.MetricType.Share,
|
70
|
+
icon: ['far', 'share-from-square'],
|
71
|
+
iconActive: ['fas', 'share-from-square'],
|
72
|
+
value: val || 0,
|
73
|
+
active: active
|
74
|
+
});
|
75
|
+
}
|
76
|
+
static download(val, active) {
|
77
|
+
return new Metric({
|
78
|
+
title: 'downloads',
|
79
|
+
type: enums_1.MetricType.Download,
|
80
|
+
icon: ['fas', 'download'],
|
81
|
+
iconActive: ['fas', 'download'],
|
82
|
+
value: val || 0,
|
83
|
+
active: active
|
84
|
+
});
|
85
|
+
}
|
86
|
+
static feedback(val, active) {
|
87
|
+
return new Metric({
|
88
|
+
title: 'feedbacks',
|
89
|
+
type: enums_1.MetricType.Feedback,
|
90
|
+
icon: ['far', 'comments'],
|
91
|
+
iconActive: ['fas', 'comments'],
|
92
|
+
value: val || 0,
|
93
|
+
active: active
|
94
|
+
});
|
95
|
+
}
|
96
|
+
static total(title, val, icon, active) {
|
97
|
+
return new Metric({
|
98
|
+
title: title,
|
99
|
+
type: enums_1.MetricType.Total,
|
100
|
+
icon: icon || ['fas', 'gauge-high'],
|
101
|
+
iconActive: icon || ['fas', 'gauge-high'],
|
102
|
+
value: val || 0,
|
103
|
+
active: active
|
104
|
+
});
|
105
|
+
}
|
106
|
+
}
|
107
|
+
exports.Metric = Metric;
|
108
|
+
__decorate([
|
109
|
+
(0, class_transformer_1.Expose)(),
|
110
|
+
__metadata("design:type", String)
|
111
|
+
], Metric.prototype, "name", void 0);
|
112
|
+
__decorate([
|
113
|
+
(0, class_transformer_1.Expose)(),
|
114
|
+
__metadata("design:type", String)
|
115
|
+
], Metric.prototype, "title", void 0);
|
116
|
+
__decorate([
|
117
|
+
(0, class_transformer_1.Expose)(),
|
118
|
+
__metadata("design:type", String)
|
119
|
+
], Metric.prototype, "type", void 0);
|
120
|
+
__decorate([
|
121
|
+
(0, class_transformer_1.Expose)(),
|
122
|
+
(0, class_transformer_1.Transform)(({ obj }) => obj?.value || 0),
|
123
|
+
__metadata("design:type", Number)
|
124
|
+
], Metric.prototype, "value", void 0);
|
125
|
+
__decorate([
|
126
|
+
(0, class_transformer_1.Expose)(),
|
127
|
+
(0, class_transformer_1.Type)(() => Boolean),
|
128
|
+
__metadata("design:type", Boolean)
|
129
|
+
], Metric.prototype, "active", void 0);
|
130
|
+
__decorate([
|
131
|
+
(0, class_transformer_1.Expose)(),
|
132
|
+
(0, class_transformer_1.Transform)(({ obj }) => {
|
133
|
+
if (obj?.icon)
|
134
|
+
return obj.icon;
|
135
|
+
switch (obj?.type) {
|
136
|
+
case enums_1.MetricType.Seen:
|
137
|
+
return ['fas', 'eye'];
|
138
|
+
case enums_1.MetricType.Open:
|
139
|
+
return ['fas', 'book-open'];
|
140
|
+
case enums_1.MetricType.Like:
|
141
|
+
return ['far', 'heart'];
|
142
|
+
case enums_1.MetricType.Bookmark:
|
143
|
+
return ['far', 'bookmark'];
|
144
|
+
case enums_1.MetricType.Share:
|
145
|
+
return ['far', 'share-from-square'];
|
146
|
+
case enums_1.MetricType.Download:
|
147
|
+
return ['fas', 'download'];
|
148
|
+
case enums_1.MetricType.Feedback:
|
149
|
+
return ['far', 'comments'];
|
150
|
+
case enums_1.MetricType.Total:
|
151
|
+
return ['fas', 'gauge-high'];
|
152
|
+
default:
|
153
|
+
return ['fas', 'gauge'];
|
154
|
+
}
|
155
|
+
}),
|
156
|
+
__metadata("design:type", Object)
|
157
|
+
], Metric.prototype, "icon", void 0);
|
158
|
+
__decorate([
|
159
|
+
(0, class_transformer_1.Expose)(),
|
160
|
+
(0, class_transformer_1.Transform)(({ obj }) => {
|
161
|
+
if (obj?.icon)
|
162
|
+
return obj.icon;
|
163
|
+
switch (obj?.type) {
|
164
|
+
case enums_1.MetricType.Seen:
|
165
|
+
return ['fas', 'eye'];
|
166
|
+
case enums_1.MetricType.Open:
|
167
|
+
return ['fas', 'book-open-reader'];
|
168
|
+
case enums_1.MetricType.Like:
|
169
|
+
return ['fas', 'heart'];
|
170
|
+
case enums_1.MetricType.Bookmark:
|
171
|
+
return ['fas', 'bookmark'];
|
172
|
+
case enums_1.MetricType.Share:
|
173
|
+
return ['fas', 'share-from-square'];
|
174
|
+
case enums_1.MetricType.Download:
|
175
|
+
return ['fas', 'download'];
|
176
|
+
case enums_1.MetricType.Feedback:
|
177
|
+
return ['fas', 'comments'];
|
178
|
+
case enums_1.MetricType.Total:
|
179
|
+
return ['fas', 'gauge-high'];
|
180
|
+
default:
|
181
|
+
return ['fas', 'gauge-simple-high'];
|
182
|
+
}
|
183
|
+
}),
|
184
|
+
__metadata("design:type", Object)
|
185
|
+
], Metric.prototype, "iconActive", void 0);
|
186
|
+
//# sourceMappingURL=metric.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"metric.js","sourceRoot":"","sources":["../../src/models/metric.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oCAAsC;AACtC,yDAA4D;AAG5D,MAAa,MAAM;IAGlB,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,IAAI,CAAa;IAIjB,KAAK,CAAS;IAId,MAAM,CAAU;IA0BhB,IAAI,CAAW;IA0Bf,UAAU,CAAW;IAErB,YAAY,KAAuB;QAClC,MAAM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,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;QACtC,CAAC;IACF,CAAC,CAAC;;0CACmB"}
|
package/lib/models/post.d.ts
CHANGED
@@ -2,11 +2,12 @@ import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
2
2
|
import { Author } from './author';
|
3
3
|
import { Publisher } from './publisher';
|
4
4
|
import { Topic } from './topic';
|
5
|
-
import { Context,
|
5
|
+
import { Context, PostType, StatusType } from '../enums';
|
6
6
|
import { GalleryItem } from './gallery';
|
7
7
|
import { Feedback } from './feedback';
|
8
8
|
import { Item } from './item';
|
9
|
-
import {
|
9
|
+
import { Metric } from './metric';
|
10
|
+
import { Log } from './log';
|
10
11
|
export declare class Post {
|
11
12
|
id: number;
|
12
13
|
publisher: Publisher;
|
@@ -15,7 +16,7 @@ export declare class Post {
|
|
15
16
|
feedback: Feedback;
|
16
17
|
collection: Post[];
|
17
18
|
gallery: GalleryItem[];
|
18
|
-
postType: PostType
|
19
|
+
postType: PostType;
|
19
20
|
slug: string;
|
20
21
|
title: string;
|
21
22
|
description: string;
|
@@ -33,7 +34,23 @@ export declare class Post {
|
|
33
34
|
status: StatusType;
|
34
35
|
weight: number;
|
35
36
|
popularity: Item<number>;
|
36
|
-
|
37
|
+
metricVisits: Metric;
|
38
|
+
metricOpens: Metric;
|
39
|
+
metricBookmarks: Metric;
|
40
|
+
metricLikes: Metric;
|
41
|
+
metricShares: Metric;
|
42
|
+
metricDownloads: Metric;
|
43
|
+
metricFeedbacks: Metric;
|
44
|
+
logCreated: Log;
|
45
|
+
logUpdated: Log;
|
46
|
+
logDeleted: Log;
|
47
|
+
logPublished: Log;
|
48
|
+
logArchived: Log;
|
49
|
+
logBlocked: Log;
|
50
|
+
logStatusChange: Log;
|
51
|
+
constructor(props?: Partial<Post>);
|
52
|
+
get type(): PostType;
|
53
|
+
getStatusAuthorizations(): {
|
37
54
|
draft: boolean;
|
38
55
|
approve: boolean;
|
39
56
|
publish: boolean;
|
@@ -43,31 +60,6 @@ export declare class Post {
|
|
43
60
|
block: boolean;
|
44
61
|
unblock: boolean;
|
45
62
|
};
|
46
|
-
totalHits: number;
|
47
|
-
totalLikes: number;
|
48
|
-
totalShares: number;
|
49
|
-
totalBookmarks: number;
|
50
|
-
totalDownloads: number;
|
51
|
-
isBookmarked: boolean;
|
52
|
-
isLiked: boolean;
|
53
|
-
isShared: boolean;
|
54
|
-
isDownloaded: boolean;
|
55
|
-
bookmark: Item<number>;
|
56
|
-
like: Item<number>;
|
57
|
-
share: Item<number>;
|
58
|
-
hit: Item<number>;
|
59
|
-
download: Item<number>;
|
60
|
-
metrics: Item[];
|
61
|
-
createdOn: Date;
|
62
|
-
createdBy: User;
|
63
|
-
updatedOn: Date;
|
64
|
-
updatedBy: User;
|
65
|
-
statusChangeDate: Date;
|
66
|
-
statusChangeBy: User;
|
67
|
-
publishedDate: Date;
|
68
|
-
publishedBy: User;
|
69
|
-
constructor(props?: Partial<Post>);
|
70
|
-
get type(): PostType;
|
71
63
|
getPublishValidators(): Item[];
|
72
64
|
validateForPublish(): boolean;
|
73
65
|
getStatusContext(): Context;
|