@intelact/bright 0.9.127 → 0.9.128

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. package/lib/feedback/feedback.model.d.ts +2 -0
  2. package/lib/feedback/feedback.model.js +9 -0
  3. package/lib/feedback/feedback.model.js.map +1 -1
  4. package/lib/publisher/publisher.model.d.ts +2 -0
  5. package/lib/publisher/publisher.model.js +9 -0
  6. package/lib/publisher/publisher.model.js.map +1 -1
  7. package/lib/tsconfig.tsbuildinfo +1 -1
  8. package/package.json +1 -1
  9. package/lib/author/author.sort.d.ts +0 -7
  10. package/lib/author/author.sort.js +0 -12
  11. package/lib/author/author.sort.js.map +0 -1
  12. package/lib/common/browse.dto.d.ts +0 -9
  13. package/lib/common/browse.dto.js +0 -47
  14. package/lib/common/browse.dto.js.map +0 -1
  15. package/lib/dtos/asset.dto.d.ts +0 -14
  16. package/lib/dtos/asset.dto.js +0 -70
  17. package/lib/dtos/asset.dto.js.map +0 -1
  18. package/lib/dtos/auth.dto.d.ts +0 -39
  19. package/lib/dtos/auth.dto.js +0 -162
  20. package/lib/dtos/auth.dto.js.map +0 -1
  21. package/lib/dtos/author.dto.d.ts +0 -14
  22. package/lib/dtos/author.dto.js +0 -57
  23. package/lib/dtos/author.dto.js.map +0 -1
  24. package/lib/dtos/boost.dto.d.ts +0 -5
  25. package/lib/dtos/boost.dto.js +0 -38
  26. package/lib/dtos/boost.dto.js.map +0 -1
  27. package/lib/dtos/brand.dto.d.ts +0 -6
  28. package/lib/dtos/brand.dto.js +0 -41
  29. package/lib/dtos/brand.dto.js.map +0 -1
  30. package/lib/dtos/browse.dto.d.ts +0 -11
  31. package/lib/dtos/browse.dto.js +0 -55
  32. package/lib/dtos/browse.dto.js.map +0 -1
  33. package/lib/dtos/bulk.dto.d.ts +0 -3
  34. package/lib/dtos/bulk.dto.js +0 -22
  35. package/lib/dtos/bulk.dto.js.map +0 -1
  36. package/lib/dtos/category.dto.d.ts +0 -7
  37. package/lib/dtos/category.dto.js +0 -38
  38. package/lib/dtos/category.dto.js.map +0 -1
  39. package/lib/dtos/contact.dto.d.ts +0 -5
  40. package/lib/dtos/contact.dto.js +0 -35
  41. package/lib/dtos/contact.dto.js.map +0 -1
  42. package/lib/dtos/feedback.dto.d.ts +0 -9
  43. package/lib/dtos/feedback.dto.js +0 -47
  44. package/lib/dtos/feedback.dto.js.map +0 -1
  45. package/lib/dtos/general.dto.d.ts +0 -25
  46. package/lib/dtos/general.dto.js +0 -94
  47. package/lib/dtos/general.dto.js.map +0 -1
  48. package/lib/dtos/index.d.ts +0 -15
  49. package/lib/dtos/index.js +0 -32
  50. package/lib/dtos/index.js.map +0 -1
  51. package/lib/dtos/notification.d.ts +0 -4
  52. package/lib/dtos/notification.dto.d.ts +0 -4
  53. package/lib/dtos/notification.dto.js +0 -29
  54. package/lib/dtos/notification.dto.js.map +0 -1
  55. package/lib/dtos/notification.js +0 -29
  56. package/lib/dtos/notification.js.map +0 -1
  57. package/lib/dtos/post.dto.d.ts +0 -25
  58. package/lib/dtos/post.dto.js +0 -118
  59. package/lib/dtos/post.dto.js.map +0 -1
  60. package/lib/dtos/promotion.dto.d.ts +0 -5
  61. package/lib/dtos/promotion.dto.js +0 -38
  62. package/lib/dtos/promotion.dto.js.map +0 -1
  63. package/lib/dtos/publisher.dto.d.ts +0 -8
  64. package/lib/dtos/publisher.dto.js +0 -39
  65. package/lib/dtos/publisher.dto.js.map +0 -1
  66. package/lib/dtos/question.dto.d.ts +0 -15
  67. package/lib/dtos/question.dto.js +0 -86
  68. package/lib/dtos/question.dto.js.map +0 -1
  69. package/lib/dtos/search.dto.d.ts +0 -12
  70. package/lib/dtos/search.dto.js +0 -72
  71. package/lib/dtos/search.dto.js.map +0 -1
  72. package/lib/dtos/survey.dto.d.ts +0 -9
  73. package/lib/dtos/survey.dto.js +0 -54
  74. package/lib/dtos/survey.dto.js.map +0 -1
  75. package/lib/dtos/topic.dto.d.ts +0 -12
  76. package/lib/dtos/topic.dto.js +0 -50
  77. package/lib/dtos/topic.dto.js.map +0 -1
  78. package/lib/dtos/user.dto.d.ts +0 -24
  79. package/lib/dtos/user.dto.js +0 -99
  80. package/lib/dtos/user.dto.js.map +0 -1
  81. package/lib/enums/account.enum.d.ts +0 -11
  82. package/lib/enums/account.enum.js +0 -17
  83. package/lib/enums/account.enum.js.map +0 -1
  84. package/lib/enums/asset.enum.d.ts +0 -7
  85. package/lib/enums/asset.enum.js +0 -12
  86. package/lib/enums/asset.enum.js.map +0 -1
  87. package/lib/enums/color.enum.d.ts +0 -30
  88. package/lib/enums/color.enum.js +0 -37
  89. package/lib/enums/color.enum.js.map +0 -1
  90. package/lib/enums/feed.enum.d.ts +0 -5
  91. package/lib/enums/feed.enum.js +0 -10
  92. package/lib/enums/feed.enum.js.map +0 -1
  93. package/lib/enums/index.d.ts +0 -13
  94. package/lib/enums/index.js +0 -30
  95. package/lib/enums/index.js.map +0 -1
  96. package/lib/enums/module.enum.d.ts +0 -28
  97. package/lib/enums/module.enum.js +0 -34
  98. package/lib/enums/module.enum.js.map +0 -1
  99. package/lib/enums/notification.enum.d.ts +0 -12
  100. package/lib/enums/notification.enum.js +0 -18
  101. package/lib/enums/notification.enum.js.map +0 -1
  102. package/lib/enums/popularity.enum.d.ts +0 -8
  103. package/lib/enums/popularity.enum.js +0 -13
  104. package/lib/enums/popularity.enum.js.map +0 -1
  105. package/lib/enums/post.enum.d.ts +0 -8
  106. package/lib/enums/post.enum.js +0 -13
  107. package/lib/enums/post.enum.js.map +0 -1
  108. package/lib/enums/setting.enum.d.ts +0 -10
  109. package/lib/enums/setting.enum.js +0 -15
  110. package/lib/enums/setting.enum.js.map +0 -1
  111. package/lib/enums/social.enum.d.ts +0 -14
  112. package/lib/enums/social.enum.js +0 -20
  113. package/lib/enums/social.enum.js.map +0 -1
  114. package/lib/enums/sort.enum.d.ts +0 -21
  115. package/lib/enums/sort.enum.js +0 -28
  116. package/lib/enums/sort.enum.js.map +0 -1
  117. package/lib/enums/status.enum.d.ts +0 -13
  118. package/lib/enums/status.enum.js +0 -19
  119. package/lib/enums/status.enum.js.map +0 -1
  120. package/lib/enums/survey.enum.d.ts +0 -6
  121. package/lib/enums/survey.enum.js +0 -11
  122. package/lib/enums/survey.enum.js.map +0 -1
  123. package/lib/enums/tracks.enum.d.ts +0 -38
  124. package/lib/enums/tracks.enum.js +0 -46
  125. package/lib/enums/tracks.enum.js.map +0 -1
  126. package/lib/enums/verification.enum.d.ts +0 -5
  127. package/lib/enums/verification.enum.js +0 -10
  128. package/lib/enums/verification.enum.js.map +0 -1
  129. package/lib/helpers/index.d.ts +0 -2
  130. package/lib/helpers/index.js +0 -19
  131. package/lib/helpers/index.js.map +0 -1
  132. package/lib/helpers/popularity.helper.d.ts +0 -2
  133. package/lib/helpers/popularity.helper.js +0 -58
  134. package/lib/helpers/popularity.helper.js.map +0 -1
  135. package/lib/helpers/post.helper.d.ts +0 -2
  136. package/lib/helpers/post.helper.js +0 -22
  137. package/lib/helpers/post.helper.js.map +0 -1
  138. package/lib/metric/metric.interface.d.ts +0 -11
  139. package/lib/metric/metric.interface.js +0 -3
  140. package/lib/metric/metric.interface.js.map +0 -1
  141. package/lib/models/asset.d.ts +0 -10
  142. package/lib/models/asset.js +0 -54
  143. package/lib/models/asset.js.map +0 -1
  144. package/lib/models/author.d.ts +0 -16
  145. package/lib/models/author.js +0 -83
  146. package/lib/models/author.js.map +0 -1
  147. package/lib/models/boost.d.ts +0 -14
  148. package/lib/models/boost.js +0 -73
  149. package/lib/models/boost.js.map +0 -1
  150. package/lib/models/brand.d.ts +0 -38
  151. package/lib/models/brand.js +0 -241
  152. package/lib/models/brand.js.map +0 -1
  153. package/lib/models/category.d.ts +0 -13
  154. package/lib/models/category.js +0 -69
  155. package/lib/models/category.js.map +0 -1
  156. package/lib/models/collection.d.ts +0 -14
  157. package/lib/models/collection.js +0 -65
  158. package/lib/models/collection.js.map +0 -1
  159. package/lib/models/feedback.d.ts +0 -38
  160. package/lib/models/feedback.js +0 -157
  161. package/lib/models/feedback.js.map +0 -1
  162. package/lib/models/gallery.d.ts +0 -6
  163. package/lib/models/gallery.js +0 -36
  164. package/lib/models/gallery.js.map +0 -1
  165. package/lib/models/index.d.ts +0 -23
  166. package/lib/models/index.js +0 -40
  167. package/lib/models/index.js.map +0 -1
  168. package/lib/models/item.d.ts +0 -14
  169. package/lib/models/item.js +0 -37
  170. package/lib/models/item.js.map +0 -1
  171. package/lib/models/link.d.ts +0 -16
  172. package/lib/models/link.js +0 -35
  173. package/lib/models/link.js.map +0 -1
  174. package/lib/models/log.d.ts +0 -11
  175. package/lib/models/log.js +0 -16
  176. package/lib/models/log.js.map +0 -1
  177. package/lib/models/metric.d.ts +0 -20
  178. package/lib/models/metric.js +0 -186
  179. package/lib/models/metric.js.map +0 -1
  180. package/lib/models/notification.d.ts +0 -14
  181. package/lib/models/notification.js +0 -64
  182. package/lib/models/notification.js.map +0 -1
  183. package/lib/models/pagination.d.ts +0 -17
  184. package/lib/models/pagination.js +0 -3
  185. package/lib/models/pagination.js.map +0 -1
  186. package/lib/models/post.d.ts +0 -88
  187. package/lib/models/post.js +0 -466
  188. package/lib/models/post.js.map +0 -1
  189. package/lib/models/promotion.d.ts +0 -21
  190. package/lib/models/promotion.js +0 -108
  191. package/lib/models/promotion.js.map +0 -1
  192. package/lib/models/publisher.d.ts +0 -25
  193. package/lib/models/publisher.js +0 -118
  194. package/lib/models/publisher.js.map +0 -1
  195. package/lib/models/question.d.ts +0 -47
  196. package/lib/models/question.js +0 -238
  197. package/lib/models/question.js.map +0 -1
  198. package/lib/models/quote.d.ts +0 -5
  199. package/lib/models/quote.js +0 -31
  200. package/lib/models/quote.js.map +0 -1
  201. package/lib/models/response.d.ts +0 -6
  202. package/lib/models/response.js +0 -3
  203. package/lib/models/response.js.map +0 -1
  204. package/lib/models/share.d.ts +0 -6
  205. package/lib/models/share.js +0 -3
  206. package/lib/models/share.js.map +0 -1
  207. package/lib/models/survey.d.ts +0 -43
  208. package/lib/models/survey.js +0 -214
  209. package/lib/models/survey.js.map +0 -1
  210. package/lib/models/token.d.ts +0 -7
  211. package/lib/models/token.js +0 -3
  212. package/lib/models/token.js.map +0 -1
  213. package/lib/models/topic.d.ts +0 -17
  214. package/lib/models/topic.js +0 -90
  215. package/lib/models/topic.js.map +0 -1
  216. package/lib/models/user.d.ts +0 -49
  217. package/lib/models/user.js +0 -258
  218. package/lib/models/user.js.map +0 -1
  219. package/lib/survey/survey.event.d.ts +0 -5
  220. package/lib/survey/survey.event.js +0 -10
  221. package/lib/survey/survey.event.js.map +0 -1
@@ -1,466 +0,0 @@
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.Post = void 0;
13
- const class_transformer_1 = require("class-transformer");
14
- const author_1 = require("./author");
15
- const publisher_1 = require("./publisher");
16
- const topic_1 = require("./topic");
17
- const enums_1 = require("../enums");
18
- const gallery_1 = require("./gallery");
19
- const feedback_1 = require("./feedback");
20
- const item_1 = require("./item");
21
- const metric_1 = require("./metric");
22
- const log_1 = require("./log");
23
- const helpers_1 = require("../helpers");
24
- class Post {
25
- id;
26
- slug;
27
- title;
28
- description;
29
- content;
30
- info;
31
- duration;
32
- icon;
33
- svgIcon;
34
- pdfUrl;
35
- imageUrl;
36
- feedUrl;
37
- mediaUrl;
38
- externUrl;
39
- status;
40
- postType;
41
- weight;
42
- popularity;
43
- totalSeen;
44
- metricOpens;
45
- metricLikes;
46
- metricShares;
47
- metricBookmarks;
48
- metricDownloads;
49
- metricFeedbacks;
50
- statusChanged;
51
- published;
52
- blocked;
53
- created;
54
- updated;
55
- deleted;
56
- publisher;
57
- author;
58
- topics;
59
- feedback;
60
- collection;
61
- gallery;
62
- constructor(props) {
63
- Object.assign(this, props);
64
- }
65
- get type() {
66
- return this.postType;
67
- }
68
- getStatusAuthorizations() {
69
- switch (this.status) {
70
- case enums_1.StatusType.Draft:
71
- return {
72
- draft: false,
73
- approve: true,
74
- publish: true,
75
- unpublish: false,
76
- archive: true,
77
- unarchive: false,
78
- block: true,
79
- unblock: false
80
- };
81
- case enums_1.StatusType.ReadyForPublish:
82
- return {
83
- draft: true,
84
- approve: false,
85
- publish: true,
86
- unpublish: false,
87
- archive: false,
88
- unarchive: false,
89
- block: true,
90
- unblock: false
91
- };
92
- case enums_1.StatusType.Published:
93
- return {
94
- draft: false,
95
- approve: false,
96
- publish: false,
97
- unpublish: true,
98
- archive: true,
99
- unarchive: false,
100
- block: true,
101
- unblock: false
102
- };
103
- case enums_1.StatusType.Archived:
104
- return {
105
- draft: false,
106
- approve: false,
107
- publish: false,
108
- unpublish: false,
109
- archive: false,
110
- unarchive: true,
111
- block: false,
112
- unblock: false
113
- };
114
- case enums_1.StatusType.Blocked:
115
- return {
116
- draft: false,
117
- approve: false,
118
- publish: false,
119
- unpublish: false,
120
- archive: false,
121
- unarchive: false,
122
- block: false,
123
- unblock: true
124
- };
125
- default:
126
- return {
127
- draft: false,
128
- approve: false,
129
- publish: false,
130
- unpublish: false,
131
- archive: false,
132
- unarchive: false,
133
- block: false,
134
- unblock: false
135
- };
136
- }
137
- }
138
- getPublishValidators() {
139
- const postType = this.postType;
140
- const validators = [];
141
- validators.push(new item_1.Item({
142
- name: 'author',
143
- title: 'author',
144
- icon: 'user'
145
- }));
146
- validators.push(new item_1.Item({
147
- name: 'title',
148
- title: 'title',
149
- icon: 't'
150
- }));
151
- validators.push(new item_1.Item({
152
- name: 'description',
153
- title: 'daysescription',
154
- icon: 'align-left'
155
- }));
156
- validators.push(new item_1.Item({
157
- name: 'image',
158
- title: 'image',
159
- icon: 'image'
160
- }));
161
- validators.push(new item_1.Item({
162
- name: 'feed',
163
- title: 'postFeed',
164
- icon: 'mobile-screen'
165
- }));
166
- if ([enums_1.PostType.Article, enums_1.PostType.Event, enums_1.PostType.News].includes(postType)) {
167
- validators.push(new item_1.Item({
168
- name: 'content',
169
- title: 'content',
170
- icon: 'align-justify'
171
- }));
172
- }
173
- if (postType === enums_1.PostType.Book) {
174
- validators.push(new item_1.Item({
175
- name: 'pdf',
176
- title: 'pdf',
177
- icon: 'file-pdf'
178
- }));
179
- }
180
- if (postType === enums_1.PostType.Audio) {
181
- validators.push(new item_1.Item({
182
- name: 'audio',
183
- title: 'audio',
184
- icon: 'microphone'
185
- }));
186
- }
187
- if (postType === enums_1.PostType.Video) {
188
- validators.push(new item_1.Item({
189
- name: 'video',
190
- title: 'video',
191
- icon: 'file-video'
192
- }));
193
- }
194
- if (postType === enums_1.PostType.Event) {
195
- validators.push(new item_1.Item({
196
- name: 'schedule',
197
- title: 'eventSchedule',
198
- icon: 'calendar-days'
199
- }));
200
- }
201
- return validators;
202
- }
203
- validateForPublish() {
204
- if (!this.status)
205
- return false;
206
- if (!this.author) {
207
- return false;
208
- }
209
- if (this.description?.trim()?.length === 0) {
210
- return false;
211
- }
212
- if (this.imageUrl?.trim()?.length === 0) {
213
- return false;
214
- }
215
- if (this.feedUrl?.trim()?.length) {
216
- return false;
217
- }
218
- const contentMandatory = [enums_1.PostType.Article, enums_1.PostType.Event, enums_1.PostType.News];
219
- if (contentMandatory.includes(this.type) && !this.content?.trim()) {
220
- return false;
221
- }
222
- if (this.type === enums_1.PostType.Book && !this.pdfUrl?.trim()) {
223
- return false;
224
- }
225
- if (this.type === enums_1.PostType.Audio && !this.mediaUrl?.trim()) {
226
- return false;
227
- }
228
- if (this.type === enums_1.PostType.Video && !this.mediaUrl?.trim()) {
229
- return false;
230
- }
231
- if (this.type === enums_1.PostType.Event && !this.info?.events || this.info.events?.length === 0) {
232
- return false;
233
- }
234
- return true;
235
- }
236
- getStatusContext() {
237
- if (!this.status)
238
- return;
239
- return this.status === enums_1.StatusType.Draft
240
- ? enums_1.Context.Secondary
241
- : this.status === enums_1.StatusType.ReadyForPublish
242
- ? enums_1.Context.Info
243
- : this.status === enums_1.StatusType.Published
244
- ? enums_1.Context.Success
245
- : this.status === enums_1.StatusType.Archived
246
- ? enums_1.Context.Warning
247
- : this.status === enums_1.StatusType.Blocked
248
- ? enums_1.Context.Danger
249
- : enums_1.Context.Dark;
250
- }
251
- }
252
- exports.Post = Post;
253
- __decorate([
254
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
255
- (0, class_transformer_1.Type)(() => Number),
256
- __metadata("design:type", Number)
257
- ], Post.prototype, "id", void 0);
258
- __decorate([
259
- (0, class_transformer_1.Expose)(),
260
- __metadata("design:type", String)
261
- ], Post.prototype, "slug", void 0);
262
- __decorate([
263
- (0, class_transformer_1.Expose)(),
264
- __metadata("design:type", String)
265
- ], Post.prototype, "title", void 0);
266
- __decorate([
267
- (0, class_transformer_1.Expose)(),
268
- __metadata("design:type", String)
269
- ], Post.prototype, "description", void 0);
270
- __decorate([
271
- (0, class_transformer_1.Expose)(),
272
- __metadata("design:type", String)
273
- ], Post.prototype, "content", void 0);
274
- __decorate([
275
- (0, class_transformer_1.Expose)(),
276
- (0, class_transformer_1.Transform)(({ obj }) => {
277
- if (obj?.info?.events?.length > 0) {
278
- obj.info.events = obj.info.events.map((i) => {
279
- i.date = new Date(i.date);
280
- return i;
281
- });
282
- }
283
- return obj.info;
284
- }),
285
- __metadata("design:type", Object)
286
- ], Post.prototype, "info", void 0);
287
- __decorate([
288
- (0, class_transformer_1.Expose)(),
289
- (0, class_transformer_1.Type)(() => Number),
290
- __metadata("design:type", Number)
291
- ], Post.prototype, "duration", void 0);
292
- __decorate([
293
- (0, class_transformer_1.Expose)(),
294
- (0, class_transformer_1.Transform)(({ obj }) => (0, helpers_1.getPostIcon)(obj?.postType)),
295
- __metadata("design:type", Object)
296
- ], Post.prototype, "icon", void 0);
297
- __decorate([
298
- (0, class_transformer_1.Expose)(),
299
- (0, class_transformer_1.Transform)(({ obj }) => (0, helpers_1.getPostIcon)(obj?.postType, true)),
300
- __metadata("design:type", String)
301
- ], Post.prototype, "svgIcon", void 0);
302
- __decorate([
303
- (0, class_transformer_1.Expose)(),
304
- __metadata("design:type", String)
305
- ], Post.prototype, "pdfUrl", void 0);
306
- __decorate([
307
- (0, class_transformer_1.Expose)(),
308
- __metadata("design:type", String)
309
- ], Post.prototype, "imageUrl", void 0);
310
- __decorate([
311
- (0, class_transformer_1.Expose)(),
312
- __metadata("design:type", String)
313
- ], Post.prototype, "feedUrl", void 0);
314
- __decorate([
315
- (0, class_transformer_1.Expose)(),
316
- __metadata("design:type", String)
317
- ], Post.prototype, "mediaUrl", void 0);
318
- __decorate([
319
- (0, class_transformer_1.Expose)(),
320
- __metadata("design:type", String)
321
- ], Post.prototype, "externUrl", void 0);
322
- __decorate([
323
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
324
- __metadata("design:type", String)
325
- ], Post.prototype, "status", void 0);
326
- __decorate([
327
- (0, class_transformer_1.Expose)(),
328
- __metadata("design:type", String)
329
- ], Post.prototype, "postType", void 0);
330
- __decorate([
331
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
332
- (0, class_transformer_1.Type)(() => Number),
333
- __metadata("design:type", Number)
334
- ], Post.prototype, "weight", void 0);
335
- __decorate([
336
- (0, class_transformer_1.Expose)(),
337
- (0, class_transformer_1.Type)(() => item_1.Item),
338
- (0, class_transformer_1.Transform)(({ obj }) => (0, helpers_1.getPopularityByWeight)(obj.weight)),
339
- __metadata("design:type", item_1.Item)
340
- ], Post.prototype, "popularity", void 0);
341
- __decorate([
342
- (0, class_transformer_1.Expose)(),
343
- (0, class_transformer_1.Type)(() => metric_1.Metric),
344
- (0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.seen(obj?.totalSeen, obj?.hasSeen)),
345
- __metadata("design:type", metric_1.Metric)
346
- ], Post.prototype, "totalSeen", void 0);
347
- __decorate([
348
- (0, class_transformer_1.Expose)(),
349
- (0, class_transformer_1.Type)(() => item_1.Item),
350
- (0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.open(obj?.totalOpens, obj?.hasOpen)),
351
- __metadata("design:type", metric_1.Metric)
352
- ], Post.prototype, "metricOpens", void 0);
353
- __decorate([
354
- (0, class_transformer_1.Expose)(),
355
- (0, class_transformer_1.Type)(() => metric_1.Metric),
356
- (0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.like(obj?.totalLikes, obj?.hasLike)),
357
- __metadata("design:type", metric_1.Metric)
358
- ], Post.prototype, "metricLikes", void 0);
359
- __decorate([
360
- (0, class_transformer_1.Expose)(),
361
- (0, class_transformer_1.Type)(() => metric_1.Metric),
362
- (0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.share(obj?.totalShares, obj?.hasShare)),
363
- __metadata("design:type", metric_1.Metric)
364
- ], Post.prototype, "metricShares", void 0);
365
- __decorate([
366
- (0, class_transformer_1.Expose)(),
367
- (0, class_transformer_1.Type)(() => metric_1.Metric),
368
- (0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.bookmark(obj?.totalBookmarks, obj?.hasBookmark)),
369
- __metadata("design:type", metric_1.Metric)
370
- ], Post.prototype, "metricBookmarks", void 0);
371
- __decorate([
372
- (0, class_transformer_1.Expose)(),
373
- (0, class_transformer_1.Type)(() => metric_1.Metric),
374
- (0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.download(obj?.totalDownloads, obj?.hasDownload)),
375
- __metadata("design:type", metric_1.Metric)
376
- ], Post.prototype, "metricDownloads", void 0);
377
- __decorate([
378
- (0, class_transformer_1.Expose)(),
379
- (0, class_transformer_1.Type)(() => metric_1.Metric),
380
- (0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.feedback(obj?.totalFeedbacks, obj?.hasFeedback)),
381
- __metadata("design:type", metric_1.Metric)
382
- ], Post.prototype, "metricFeedbacks", void 0);
383
- __decorate([
384
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
385
- (0, class_transformer_1.Type)(() => log_1.Log),
386
- __metadata("design:type", log_1.Log)
387
- ], Post.prototype, "statusChanged", void 0);
388
- __decorate([
389
- (0, class_transformer_1.Expose)(),
390
- (0, class_transformer_1.Type)(() => log_1.Log),
391
- __metadata("design:type", log_1.Log)
392
- ], Post.prototype, "published", void 0);
393
- __decorate([
394
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
395
- (0, class_transformer_1.Type)(() => log_1.Log),
396
- __metadata("design:type", log_1.Log)
397
- ], Post.prototype, "blocked", void 0);
398
- __decorate([
399
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
400
- (0, class_transformer_1.Type)(() => log_1.Log),
401
- __metadata("design:type", log_1.Log)
402
- ], Post.prototype, "created", void 0);
403
- __decorate([
404
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
405
- (0, class_transformer_1.Type)(() => log_1.Log),
406
- __metadata("design:type", log_1.Log)
407
- ], Post.prototype, "updated", void 0);
408
- __decorate([
409
- (0, class_transformer_1.Expose)({ groups: ['console'] }),
410
- (0, class_transformer_1.Type)(() => log_1.Log),
411
- __metadata("design:type", log_1.Log)
412
- ], Post.prototype, "deleted", void 0);
413
- __decorate([
414
- (0, class_transformer_1.Expose)(),
415
- (0, class_transformer_1.Type)(() => publisher_1.Publisher),
416
- __metadata("design:type", publisher_1.Publisher)
417
- ], Post.prototype, "publisher", void 0);
418
- __decorate([
419
- (0, class_transformer_1.Expose)(),
420
- (0, class_transformer_1.Type)(() => author_1.Author),
421
- __metadata("design:type", author_1.Author)
422
- ], Post.prototype, "author", void 0);
423
- __decorate([
424
- (0, class_transformer_1.Type)(() => topic_1.Topic),
425
- __metadata("design:type", Array)
426
- ], Post.prototype, "topics", void 0);
427
- __decorate([
428
- (0, class_transformer_1.Expose)(),
429
- (0, class_transformer_1.Type)(() => feedback_1.Feedback),
430
- __metadata("design:type", feedback_1.Feedback)
431
- ], Post.prototype, "feedback", void 0);
432
- __decorate([
433
- (0, class_transformer_1.Expose)(),
434
- (0, class_transformer_1.Type)(() => Post),
435
- __metadata("design:type", Array)
436
- ], Post.prototype, "collection", void 0);
437
- __decorate([
438
- (0, class_transformer_1.Expose)(),
439
- (0, class_transformer_1.Type)(() => gallery_1.GalleryItem),
440
- __metadata("design:type", Array)
441
- ], Post.prototype, "gallery", void 0);
442
- __decorate([
443
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
444
- __metadata("design:type", Function),
445
- __metadata("design:paramtypes", []),
446
- __metadata("design:returntype", Object)
447
- ], Post.prototype, "getStatusAuthorizations", null);
448
- __decorate([
449
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
450
- __metadata("design:type", Function),
451
- __metadata("design:paramtypes", []),
452
- __metadata("design:returntype", Array)
453
- ], Post.prototype, "getPublishValidators", null);
454
- __decorate([
455
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
456
- __metadata("design:type", Function),
457
- __metadata("design:paramtypes", []),
458
- __metadata("design:returntype", Boolean)
459
- ], Post.prototype, "validateForPublish", null);
460
- __decorate([
461
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
462
- __metadata("design:type", Function),
463
- __metadata("design:paramtypes", []),
464
- __metadata("design:returntype", String)
465
- ], Post.prototype, "getStatusContext", null);
466
- //# sourceMappingURL=post.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"post.js","sourceRoot":"","sources":["../../src/models/post.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA4D;AAE5D,qCAAkC;AAClC,2CAAwC;AACxC,mCAAgC;AAChC,oCAAyD;AACzD,uCAAwC;AACxC,yCAAsC;AACtC,iCAA8B;AAC9B,qCAAkC;AAClC,+BAA4B;AAC5B,wCAAgE;AAGhE,MAAa,IAAI;IAIhB,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,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,qBAAS,CAAC;8BACX,qBAAS;uCAAC;AAIrB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;8BACX,eAAM;oCAAC;AAGf;IADC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,aAAK,CAAC;;oCACF;AAIhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,mBAAQ,CAAC;8BACX,mBAAQ;sCAAC;AAInB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;;wCACC;AAIlB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,qBAAW,CAAC;;qCACD;AAmBvB;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;;mDA+E7B;AAQD;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;;gDAuF7B;AAQD;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;;8CAqD7B;AAQD;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;;;4CAgB7B"}
@@ -1,21 +0,0 @@
1
- import { StatusLabel, StatusType } from "../enums";
2
- import { Metric } from "./metric";
3
- import { Log } from "./log";
4
- export declare class Promotion {
5
- id: number;
6
- title: string;
7
- imageUrl: string;
8
- feedUrl: string;
9
- url: string;
10
- status: StatusType;
11
- startDate: Date;
12
- endDate: Date;
13
- label: StatusLabel;
14
- metricSeen: Metric;
15
- metricOpens: Metric;
16
- statusChanged: Log;
17
- published: Log;
18
- created: Log;
19
- updated: Log;
20
- constructor(props?: Partial<Promotion>);
21
- }
@@ -1,108 +0,0 @@
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.Promotion = void 0;
13
- const class_transformer_1 = require("class-transformer");
14
- const enums_1 = require("../enums");
15
- const item_1 = require("./item");
16
- const metric_1 = require("./metric");
17
- const log_1 = require("./log");
18
- class Promotion {
19
- id;
20
- title;
21
- imageUrl;
22
- feedUrl;
23
- url;
24
- status;
25
- startDate;
26
- endDate;
27
- label;
28
- metricSeen;
29
- metricOpens;
30
- statusChanged;
31
- published;
32
- created;
33
- updated;
34
- constructor(props) {
35
- Object.assign(this, props);
36
- }
37
- }
38
- exports.Promotion = Promotion;
39
- __decorate([
40
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
41
- (0, class_transformer_1.Type)(() => Number),
42
- __metadata("design:type", Number)
43
- ], Promotion.prototype, "id", void 0);
44
- __decorate([
45
- (0, class_transformer_1.Expose)(),
46
- __metadata("design:type", String)
47
- ], Promotion.prototype, "title", void 0);
48
- __decorate([
49
- (0, class_transformer_1.Expose)(),
50
- __metadata("design:type", String)
51
- ], Promotion.prototype, "imageUrl", void 0);
52
- __decorate([
53
- (0, class_transformer_1.Expose)(),
54
- __metadata("design:type", String)
55
- ], Promotion.prototype, "feedUrl", void 0);
56
- __decorate([
57
- (0, class_transformer_1.Expose)(),
58
- __metadata("design:type", String)
59
- ], Promotion.prototype, "url", void 0);
60
- __decorate([
61
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
62
- __metadata("design:type", String)
63
- ], Promotion.prototype, "status", void 0);
64
- __decorate([
65
- (0, class_transformer_1.Expose)(),
66
- (0, class_transformer_1.Type)(() => Date),
67
- __metadata("design:type", Date)
68
- ], Promotion.prototype, "startDate", void 0);
69
- __decorate([
70
- (0, class_transformer_1.Expose)(),
71
- (0, class_transformer_1.Type)(() => Date),
72
- __metadata("design:type", Date)
73
- ], Promotion.prototype, "endDate", void 0);
74
- __decorate([
75
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
76
- __metadata("design:type", String)
77
- ], Promotion.prototype, "label", void 0);
78
- __decorate([
79
- (0, class_transformer_1.Expose)(),
80
- (0, class_transformer_1.Type)(() => metric_1.Metric),
81
- __metadata("design:type", metric_1.Metric)
82
- ], Promotion.prototype, "metricSeen", void 0);
83
- __decorate([
84
- (0, class_transformer_1.Expose)(),
85
- (0, class_transformer_1.Type)(() => item_1.Item),
86
- __metadata("design:type", metric_1.Metric)
87
- ], Promotion.prototype, "metricOpens", void 0);
88
- __decorate([
89
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
90
- (0, class_transformer_1.Type)(() => log_1.Log),
91
- __metadata("design:type", log_1.Log)
92
- ], Promotion.prototype, "statusChanged", void 0);
93
- __decorate([
94
- (0, class_transformer_1.Expose)(),
95
- (0, class_transformer_1.Type)(() => log_1.Log),
96
- __metadata("design:type", log_1.Log)
97
- ], Promotion.prototype, "published", void 0);
98
- __decorate([
99
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
100
- (0, class_transformer_1.Type)(() => log_1.Log),
101
- __metadata("design:type", log_1.Log)
102
- ], Promotion.prototype, "created", void 0);
103
- __decorate([
104
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
105
- (0, class_transformer_1.Type)(() => log_1.Log),
106
- __metadata("design:type", log_1.Log)
107
- ], Promotion.prototype, "updated", void 0);
108
- //# sourceMappingURL=promotion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"promotion.js","sourceRoot":"","sources":["../../src/models/promotion.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,oCAAmD;AACnD,iCAA8B;AAC9B,qCAAkC;AAClC,+BAA4B;AAM5B,MAAa,SAAS;IAIrB,EAAE,CAAS;IAKX,KAAK,CAAS;IAGd,QAAQ,CAAS;IAGjB,OAAO,CAAS;IAGhB,GAAG,CAAS;IAKZ,MAAM,CAAa;IAInB,SAAS,CAAO;IAIhB,OAAO,CAAO;IAGd,KAAK,CAAc;IAMnB,UAAU,CAAS;IAInB,WAAW,CAAS;IAMpB,aAAa,CAAM;IAInB,SAAS,CAAM;IAIf,OAAO,CAAM;IAIb,OAAO,CAAM;IAEb,YAAY,KAA0B;QACrC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAnED,8BAmEC;AA/DA;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;qCACR;AAKX;IADC,IAAA,0BAAM,GAAE;;wCACK;AAGd;IADC,IAAA,0BAAM,GAAE;;2CACQ;AAGjB;IADC,IAAA,0BAAM,GAAE;;0CACO;AAGhB;IADC,IAAA,0BAAM,GAAE;;sCACG;AAKZ;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;yCACX;AAInB;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;AAGd;IADC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;wCACX;AAMnB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;8BACP,eAAM;6CAAC;AAInB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,WAAI,CAAC;8BACJ,eAAM;8CAAC;AAMpB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACD,SAAG;gDAAC;AAInB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACL,SAAG;4CAAC;AAIf;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACP,SAAG;0CAAC;AAIb;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACP,SAAG;0CAAC"}
@@ -1,25 +0,0 @@
1
- import { AccountStatusType, PostType } from '../enums';
2
- import { Metric } from './metric';
3
- import { Log } from './log';
4
- export declare class Publisher {
5
- id: number;
6
- name: string;
7
- slogan: string;
8
- description: string;
9
- url: string;
10
- logo: string;
11
- status: AccountStatusType;
12
- allowedPostTypes: PostType[];
13
- publicVisibility: boolean;
14
- metricPosts: Metric;
15
- metricUsers: Metric;
16
- invited: Log;
17
- statusChanged: Log;
18
- created: Log;
19
- updated: Log;
20
- constructor(props?: Partial<Publisher>);
21
- isActive(): boolean;
22
- isDisabled(): boolean;
23
- isClosed(): boolean;
24
- hasAuthorizedType(type: PostType): boolean;
25
- }