@intelact/bright 0.9.79 → 0.9.81

Sign up to get free protection for your applications and to get access to all the features.
Files changed (323) hide show
  1. package/lib/auth/auth.event.d.ts +9 -0
  2. package/lib/auth/auth.event.js +14 -0
  3. package/lib/auth/auth.event.js.map +1 -0
  4. package/lib/auth/index.d.ts +4 -0
  5. package/lib/auth/index.js +21 -0
  6. package/lib/auth/index.js.map +1 -0
  7. package/lib/auth/password.dto.d.ts +8 -0
  8. package/lib/auth/password.dto.js +44 -0
  9. package/lib/auth/password.dto.js.map +1 -0
  10. package/lib/auth/sign.dto.d.ts +11 -0
  11. package/lib/auth/sign.dto.js +54 -0
  12. package/lib/auth/sign.dto.js.map +1 -0
  13. package/lib/auth/verify.dto.d.ts +10 -0
  14. package/lib/auth/verify.dto.js +47 -0
  15. package/lib/auth/verify.dto.js.map +1 -0
  16. package/lib/author/author.model.d.ts +19 -0
  17. package/lib/author/author.model.js +98 -0
  18. package/lib/author/author.model.js.map +1 -0
  19. package/lib/author/author.sort.d.ts +6 -0
  20. package/lib/author/author.sort.js +11 -0
  21. package/lib/author/author.sort.js.map +1 -0
  22. package/lib/author/index.d.ts +2 -0
  23. package/lib/author/index.js +19 -0
  24. package/lib/author/index.js.map +1 -0
  25. package/lib/boost/boost.dto.d.ts +5 -0
  26. package/lib/boost/boost.dto.js +38 -0
  27. package/lib/boost/boost.dto.js.map +1 -0
  28. package/lib/boost/boost.model.d.ts +16 -0
  29. package/lib/boost/boost.model.js +82 -0
  30. package/lib/boost/boost.model.js.map +1 -0
  31. package/lib/boost/index.d.ts +2 -0
  32. package/lib/boost/index.js +19 -0
  33. package/lib/boost/index.js.map +1 -0
  34. package/lib/brand/brand-setting.model.d.ts +12 -0
  35. package/lib/brand/brand-setting.model.js +58 -0
  36. package/lib/brand/brand-setting.model.js.map +1 -0
  37. package/lib/brand/brand-setting.type.d.ts +10 -0
  38. package/lib/brand/brand-setting.type.js +15 -0
  39. package/lib/brand/brand-setting.type.js.map +1 -0
  40. package/lib/brand/brand.dto.d.ts +6 -0
  41. package/lib/brand/brand.dto.js +41 -0
  42. package/lib/brand/brand.dto.js.map +1 -0
  43. package/lib/brand/brand.model.d.ts +31 -0
  44. package/lib/brand/brand.model.js +201 -0
  45. package/lib/brand/brand.model.js.map +1 -0
  46. package/lib/brand/index.d.ts +4 -0
  47. package/lib/brand/index.js +21 -0
  48. package/lib/brand/index.js.map +1 -0
  49. package/lib/category/category.model.d.ts +18 -0
  50. package/lib/category/category.model.js +94 -0
  51. package/lib/category/category.model.js.map +1 -0
  52. package/lib/category/index.d.ts +1 -0
  53. package/lib/category/index.js +18 -0
  54. package/lib/category/index.js.map +1 -0
  55. package/lib/collection/collection.model.d.ts +16 -0
  56. package/lib/collection/collection.model.js +77 -0
  57. package/lib/collection/collection.model.js.map +1 -0
  58. package/lib/collection/index.d.ts +1 -0
  59. package/lib/collection/index.js +18 -0
  60. package/lib/collection/index.js.map +1 -0
  61. package/lib/common/asset.type.d.ts +7 -0
  62. package/lib/common/asset.type.js +12 -0
  63. package/lib/common/asset.type.js.map +1 -0
  64. package/lib/common/bookmark.dto.d.ts +4 -0
  65. package/lib/common/bookmark.dto.js +24 -0
  66. package/lib/common/bookmark.dto.js.map +1 -0
  67. package/lib/common/browse.dto.d.ts +9 -0
  68. package/lib/common/browse.dto.js +47 -0
  69. package/lib/common/browse.dto.js.map +1 -0
  70. package/lib/common/general.dto.d.ts +25 -0
  71. package/lib/common/general.dto.js +94 -0
  72. package/lib/common/general.dto.js.map +1 -0
  73. package/lib/common/index.d.ts +11 -0
  74. package/lib/common/index.js +28 -0
  75. package/lib/common/index.js.map +1 -0
  76. package/lib/common/module.scope.d.ts +22 -0
  77. package/lib/common/module.scope.js +27 -0
  78. package/lib/common/module.scope.js.map +1 -0
  79. package/lib/common/module.type.d.ts +6 -0
  80. package/lib/common/module.type.js +11 -0
  81. package/lib/common/module.type.js.map +1 -0
  82. package/lib/common/search.dto.d.ts +14 -0
  83. package/lib/common/search.dto.js +74 -0
  84. package/lib/common/search.dto.js.map +1 -0
  85. package/lib/common/sort.type.d.ts +8 -0
  86. package/lib/common/sort.type.js +13 -0
  87. package/lib/common/sort.type.js.map +1 -0
  88. package/lib/common/status.label.d.ts +6 -0
  89. package/lib/common/status.label.js +11 -0
  90. package/lib/common/status.label.js.map +1 -0
  91. package/lib/common/status.type.d.ts +7 -0
  92. package/lib/common/status.type.js +12 -0
  93. package/lib/common/status.type.js.map +1 -0
  94. package/lib/common/user.agent.d.ts +11 -0
  95. package/lib/common/user.agent.js +3 -0
  96. package/lib/common/user.agent.js.map +1 -0
  97. package/lib/contact/contact.dto.d.ts +5 -0
  98. package/lib/contact/contact.dto.js +35 -0
  99. package/lib/contact/contact.dto.js.map +1 -0
  100. package/lib/contact/index.d.ts +1 -0
  101. package/lib/contact/index.js +18 -0
  102. package/lib/contact/index.js.map +1 -0
  103. package/lib/feedback/feedback-item.model.d.ts +15 -0
  104. package/lib/feedback/feedback-item.model.js +81 -0
  105. package/lib/feedback/feedback-item.model.js.map +1 -0
  106. package/lib/feedback/feedback-option.model.d.ts +7 -0
  107. package/lib/feedback/feedback-option.model.js +43 -0
  108. package/lib/feedback/feedback-option.model.js.map +1 -0
  109. package/lib/feedback/feedback.data.d.ts +6 -0
  110. package/lib/feedback/feedback.data.js +3 -0
  111. package/lib/feedback/feedback.data.js.map +1 -0
  112. package/lib/feedback/feedback.dto.d.ts +9 -0
  113. package/lib/feedback/feedback.dto.js +47 -0
  114. package/lib/feedback/feedback.dto.js.map +1 -0
  115. package/lib/feedback/feedback.model.d.ts +18 -0
  116. package/lib/feedback/feedback.model.js +87 -0
  117. package/lib/feedback/feedback.model.js.map +1 -0
  118. package/lib/feedback/index.d.ts +5 -0
  119. package/lib/feedback/index.js +22 -0
  120. package/lib/feedback/index.js.map +1 -0
  121. package/lib/gallery/gallery.model.d.ts +6 -0
  122. package/lib/gallery/gallery.model.js +36 -0
  123. package/lib/gallery/gallery.model.js.map +1 -0
  124. package/lib/gallery/index.d.ts +1 -0
  125. package/lib/gallery/index.js +18 -0
  126. package/lib/gallery/index.js.map +1 -0
  127. package/lib/index.d.ts +27 -4
  128. package/lib/index.js +27 -4
  129. package/lib/index.js.map +1 -1
  130. package/lib/item/index.d.ts +1 -0
  131. package/lib/item/index.js +18 -0
  132. package/lib/item/index.js.map +1 -0
  133. package/lib/item/item.model.d.ts +14 -0
  134. package/lib/item/item.model.js +37 -0
  135. package/lib/item/item.model.js.map +1 -0
  136. package/lib/link/index.d.ts +1 -0
  137. package/lib/link/index.js +18 -0
  138. package/lib/link/index.js.map +1 -0
  139. package/lib/link/link.model.d.ts +16 -0
  140. package/lib/link/link.model.js +35 -0
  141. package/lib/link/link.model.js.map +1 -0
  142. package/lib/log/index.d.ts +2 -0
  143. package/lib/log/index.js +19 -0
  144. package/lib/log/index.js.map +1 -0
  145. package/lib/log/log.event.d.ts +14 -0
  146. package/lib/log/log.event.js +19 -0
  147. package/lib/log/log.event.js.map +1 -0
  148. package/lib/log/log.model.d.ts +12 -0
  149. package/lib/log/log.model.js +16 -0
  150. package/lib/log/log.model.js.map +1 -0
  151. package/lib/metric/index.d.ts +3 -0
  152. package/lib/metric/index.js +20 -0
  153. package/lib/metric/index.js.map +1 -0
  154. package/lib/metric/metric.interface.d.ts +11 -0
  155. package/lib/metric/metric.interface.js +3 -0
  156. package/lib/metric/metric.interface.js.map +1 -0
  157. package/lib/metric/metric.model.d.ts +27 -0
  158. package/lib/metric/metric.model.js +189 -0
  159. package/lib/metric/metric.model.js.map +1 -0
  160. package/lib/metric/metric.type.d.ts +10 -0
  161. package/lib/metric/metric.type.js +15 -0
  162. package/lib/metric/metric.type.js.map +1 -0
  163. package/lib/notification/index.d.ts +5 -0
  164. package/lib/notification/index.js +22 -0
  165. package/lib/notification/index.js.map +1 -0
  166. package/lib/notification/notification.dto.d.ts +4 -0
  167. package/lib/notification/notification.dto.js +29 -0
  168. package/lib/notification/notification.dto.js.map +1 -0
  169. package/lib/notification/notification.event.d.ts +6 -0
  170. package/lib/notification/notification.event.js +11 -0
  171. package/lib/notification/notification.event.js.map +1 -0
  172. package/lib/notification/notification.model.d.ts +9 -0
  173. package/lib/notification/notification.model.js +48 -0
  174. package/lib/notification/notification.model.js.map +1 -0
  175. package/lib/notification/notification.token.d.ts +4 -0
  176. package/lib/notification/notification.token.js +3 -0
  177. package/lib/notification/notification.token.js.map +1 -0
  178. package/lib/notification/notification.type.d.ts +6 -0
  179. package/lib/notification/notification.type.js +11 -0
  180. package/lib/notification/notification.type.js.map +1 -0
  181. package/lib/popularity/index.d.ts +2 -0
  182. package/lib/popularity/index.js +19 -0
  183. package/lib/popularity/index.js.map +1 -0
  184. package/lib/popularity/popularity.model.d.ts +9 -0
  185. package/lib/popularity/popularity.model.js +95 -0
  186. package/lib/popularity/popularity.model.js.map +1 -0
  187. package/lib/popularity/popularity.rate.d.ts +8 -0
  188. package/lib/popularity/popularity.rate.js +13 -0
  189. package/lib/popularity/popularity.rate.js.map +1 -0
  190. package/lib/post/index.d.ts +4 -0
  191. package/lib/post/index.js +21 -0
  192. package/lib/post/index.js.map +1 -0
  193. package/lib/post/post.additionals.d.ts +24 -0
  194. package/lib/post/post.additionals.js +3 -0
  195. package/lib/post/post.additionals.js.map +1 -0
  196. package/lib/post/post.dto.d.ts +26 -0
  197. package/lib/post/post.dto.js +119 -0
  198. package/lib/post/post.dto.js.map +1 -0
  199. package/lib/post/post.model.d.ts +74 -0
  200. package/lib/post/post.model.js +514 -0
  201. package/lib/post/post.model.js.map +1 -0
  202. package/lib/post/post.type.d.ts +8 -0
  203. package/lib/post/post.type.js +13 -0
  204. package/lib/post/post.type.js.map +1 -0
  205. package/lib/promotion/index.d.ts +2 -0
  206. package/lib/promotion/index.js +19 -0
  207. package/lib/promotion/index.js.map +1 -0
  208. package/lib/promotion/promotion.dto.d.ts +5 -0
  209. package/lib/promotion/promotion.dto.js +38 -0
  210. package/lib/promotion/promotion.dto.js.map +1 -0
  211. package/lib/promotion/promotion.model.d.ts +24 -0
  212. package/lib/promotion/promotion.model.js +125 -0
  213. package/lib/promotion/promotion.model.js.map +1 -0
  214. package/lib/publisher/index.d.ts +3 -0
  215. package/lib/publisher/index.js +20 -0
  216. package/lib/publisher/index.js.map +1 -0
  217. package/lib/publisher/publisher.dto.d.ts +8 -0
  218. package/lib/publisher/publisher.dto.js +39 -0
  219. package/lib/publisher/publisher.dto.js.map +1 -0
  220. package/lib/publisher/publisher.enum.d.ts +7 -0
  221. package/lib/publisher/publisher.enum.js +12 -0
  222. package/lib/publisher/publisher.enum.js.map +1 -0
  223. package/lib/publisher/publisher.model.d.ts +29 -0
  224. package/lib/publisher/publisher.model.js +136 -0
  225. package/lib/publisher/publisher.model.js.map +1 -0
  226. package/lib/question/comment.model.d.ts +20 -0
  227. package/lib/question/comment.model.js +99 -0
  228. package/lib/question/comment.model.js.map +1 -0
  229. package/lib/question/index.d.ts +3 -0
  230. package/lib/question/index.js +20 -0
  231. package/lib/question/index.js.map +1 -0
  232. package/lib/question/question.dto.d.ts +15 -0
  233. package/lib/question/question.dto.js +86 -0
  234. package/lib/question/question.dto.js.map +1 -0
  235. package/lib/question/question.model.d.ts +39 -0
  236. package/lib/question/question.model.js +205 -0
  237. package/lib/question/question.model.js.map +1 -0
  238. package/lib/quote/index.d.ts +1 -0
  239. package/lib/quote/index.js +18 -0
  240. package/lib/quote/index.js.map +1 -0
  241. package/lib/quote/quote.model.d.ts +5 -0
  242. package/lib/quote/quote.model.js +31 -0
  243. package/lib/quote/quote.model.js.map +1 -0
  244. package/lib/security/account.status.d.ts +6 -0
  245. package/lib/security/account.status.js +11 -0
  246. package/lib/security/account.status.js.map +1 -0
  247. package/lib/security/account.type.d.ts +5 -0
  248. package/lib/security/account.type.js +10 -0
  249. package/lib/security/account.type.js.map +1 -0
  250. package/lib/security/index.d.ts +3 -0
  251. package/lib/security/index.js +3 -0
  252. package/lib/security/index.js.map +1 -1
  253. package/lib/security/token.interface.d.ts +7 -0
  254. package/lib/security/token.interface.js +3 -0
  255. package/lib/security/token.interface.js.map +1 -0
  256. package/lib/social/index.d.ts +4 -0
  257. package/lib/social/index.js +21 -0
  258. package/lib/social/index.js.map +1 -0
  259. package/lib/social/share.interface.d.ts +6 -0
  260. package/lib/social/share.interface.js +3 -0
  261. package/lib/social/share.interface.js.map +1 -0
  262. package/lib/social/share.provider.d.ts +7 -0
  263. package/lib/social/share.provider.js +12 -0
  264. package/lib/social/share.provider.js.map +1 -0
  265. package/lib/social/social-user.dto.d.ts +11 -0
  266. package/lib/social/social-user.dto.js +59 -0
  267. package/lib/social/social-user.dto.js.map +1 -0
  268. package/lib/social/social.provider.d.ts +7 -0
  269. package/lib/social/social.provider.js +12 -0
  270. package/lib/social/social.provider.js.map +1 -0
  271. package/lib/survey/index.d.ts +5 -0
  272. package/lib/survey/index.js +22 -0
  273. package/lib/survey/index.js.map +1 -0
  274. package/lib/survey/survey-item.model.d.ts +17 -0
  275. package/lib/survey/survey-item.model.js +88 -0
  276. package/lib/survey/survey-item.model.js.map +1 -0
  277. package/lib/survey/survey-option.model.d.ts +9 -0
  278. package/lib/survey/survey-option.model.js +50 -0
  279. package/lib/survey/survey-option.model.js.map +1 -0
  280. package/lib/survey/survey.dto.d.ts +9 -0
  281. package/lib/survey/survey.dto.js +54 -0
  282. package/lib/survey/survey.dto.js.map +1 -0
  283. package/lib/survey/survey.event.d.ts +5 -0
  284. package/lib/survey/survey.event.js +10 -0
  285. package/lib/survey/survey.event.js.map +1 -0
  286. package/lib/survey/survey.model.d.ts +27 -0
  287. package/lib/survey/survey.model.js +138 -0
  288. package/lib/survey/survey.model.js.map +1 -0
  289. package/lib/topic/index.d.ts +1 -0
  290. package/lib/topic/index.js +18 -0
  291. package/lib/topic/index.js.map +1 -0
  292. package/lib/topic/topic.model.d.ts +20 -0
  293. package/lib/topic/topic.model.js +104 -0
  294. package/lib/topic/topic.model.js.map +1 -0
  295. package/lib/tsconfig.tsbuildinfo +1 -1
  296. package/lib/ui/background.enum.d.ts +10 -0
  297. package/lib/ui/background.enum.js +15 -0
  298. package/lib/ui/background.enum.js.map +1 -0
  299. package/lib/ui/color.enum.d.ts +10 -0
  300. package/lib/ui/color.enum.js +15 -0
  301. package/lib/ui/color.enum.js.map +1 -0
  302. package/lib/ui/context.enum.d.ts +10 -0
  303. package/lib/ui/context.enum.js +15 -0
  304. package/lib/ui/context.enum.js.map +1 -0
  305. package/lib/ui/index.d.ts +3 -0
  306. package/lib/ui/index.js +20 -0
  307. package/lib/ui/index.js.map +1 -0
  308. package/lib/user/index.d.ts +2 -0
  309. package/lib/user/index.js +19 -0
  310. package/lib/user/index.js.map +1 -0
  311. package/lib/user/user.dto.d.ts +24 -0
  312. package/lib/user/user.dto.js +99 -0
  313. package/lib/user/user.dto.js.map +1 -0
  314. package/lib/user/user.model.d.ts +38 -0
  315. package/lib/user/user.model.js +258 -0
  316. package/lib/user/user.model.js.map +1 -0
  317. package/lib/verification/index.d.ts +1 -0
  318. package/lib/verification/index.js +18 -0
  319. package/lib/verification/index.js.map +1 -0
  320. package/lib/verification/verification.type.d.ts +5 -0
  321. package/lib/verification/verification.type.js +10 -0
  322. package/lib/verification/verification.type.js.map +1 -0
  323. package/package.json +2 -7
@@ -0,0 +1,7 @@
1
+ export declare enum SocialLoginProvider {
2
+ Google = "GOOGLE",
3
+ Twitter = "TWITTER",
4
+ Facebook = "FACEBOOK",
5
+ Linkedin = "LINKEDIN",
6
+ Apple = "APPLE"
7
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SocialLoginProvider = void 0;
4
+ var SocialLoginProvider;
5
+ (function (SocialLoginProvider) {
6
+ SocialLoginProvider["Google"] = "GOOGLE";
7
+ SocialLoginProvider["Twitter"] = "TWITTER";
8
+ SocialLoginProvider["Facebook"] = "FACEBOOK";
9
+ SocialLoginProvider["Linkedin"] = "LINKEDIN";
10
+ SocialLoginProvider["Apple"] = "APPLE";
11
+ })(SocialLoginProvider || (exports.SocialLoginProvider = SocialLoginProvider = {}));
12
+ //# sourceMappingURL=social.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"social.provider.js","sourceRoot":"","sources":["../../src/social/social.provider.ts"],"names":[],"mappings":";;;AAIA,IAAY,mBA0BX;AA1BD,WAAY,mBAAmB;IAK9B,wCAAiB,CAAA;IAKjB,0CAAmB,CAAA;IAKnB,4CAAqB,CAAA;IAKrB,4CAAqB,CAAA;IAKrB,sCAAe,CAAA;AAChB,CAAC,EA1BW,mBAAmB,mCAAnB,mBAAmB,QA0B9B"}
@@ -0,0 +1,5 @@
1
+ export * from './survey-item.model';
2
+ export * from './survey-option.model';
3
+ export * from './survey.dto';
4
+ export * from './survey.event';
5
+ export * from './survey.model';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./survey-item.model"), exports);
18
+ __exportStar(require("./survey-option.model"), exports);
19
+ __exportStar(require("./survey.dto"), exports);
20
+ __exportStar(require("./survey.event"), exports);
21
+ __exportStar(require("./survey.model"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/survey/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,wDAAsC;AACtC,+CAA6B;AAC7B,iDAA+B;AAC/B,iDAA+B"}
@@ -0,0 +1,17 @@
1
+ import { User } from '../user';
2
+ import { Survey } from './survey.model';
3
+ import { SurveyOption } from './survey-option.model';
4
+ export declare class SurveyItem {
5
+ id: number;
6
+ question: string;
7
+ multiple: boolean;
8
+ readonly: boolean;
9
+ sort: number;
10
+ survey: Survey;
11
+ options: SurveyOption[];
12
+ createdBy: User;
13
+ createdOn: Date;
14
+ updatedBy: User;
15
+ updatedOn: Date;
16
+ constructor(props?: Partial<SurveyItem>);
17
+ }
@@ -0,0 +1,88 @@
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.SurveyItem = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const user_1 = require("../user");
15
+ const survey_model_1 = require("./survey.model");
16
+ const survey_option_model_1 = require("./survey-option.model");
17
+ class SurveyItem {
18
+ id;
19
+ question;
20
+ multiple;
21
+ readonly;
22
+ sort;
23
+ survey;
24
+ options;
25
+ createdBy;
26
+ createdOn;
27
+ updatedBy;
28
+ updatedOn;
29
+ constructor(props) {
30
+ Object.assign(this, props);
31
+ }
32
+ }
33
+ exports.SurveyItem = SurveyItem;
34
+ __decorate([
35
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
36
+ (0, class_transformer_1.Type)(() => Number),
37
+ __metadata("design:type", Number)
38
+ ], SurveyItem.prototype, "id", void 0);
39
+ __decorate([
40
+ (0, class_transformer_1.Expose)(),
41
+ __metadata("design:type", String)
42
+ ], SurveyItem.prototype, "question", void 0);
43
+ __decorate([
44
+ (0, class_transformer_1.Expose)(),
45
+ (0, class_transformer_1.Type)(() => Boolean),
46
+ __metadata("design:type", Boolean)
47
+ ], SurveyItem.prototype, "multiple", void 0);
48
+ __decorate([
49
+ (0, class_transformer_1.Expose)(),
50
+ (0, class_transformer_1.Type)(() => Boolean),
51
+ __metadata("design:type", Boolean)
52
+ ], SurveyItem.prototype, "readonly", void 0);
53
+ __decorate([
54
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
55
+ (0, class_transformer_1.Type)(() => Number),
56
+ __metadata("design:type", Number)
57
+ ], SurveyItem.prototype, "sort", void 0);
58
+ __decorate([
59
+ (0, class_transformer_1.Expose)(),
60
+ (0, class_transformer_1.Type)(() => survey_model_1.Survey),
61
+ __metadata("design:type", survey_model_1.Survey)
62
+ ], SurveyItem.prototype, "survey", void 0);
63
+ __decorate([
64
+ (0, class_transformer_1.Expose)(),
65
+ (0, class_transformer_1.Type)(() => survey_option_model_1.SurveyOption),
66
+ __metadata("design:type", Array)
67
+ ], SurveyItem.prototype, "options", void 0);
68
+ __decorate([
69
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
70
+ (0, class_transformer_1.Type)(() => user_1.User),
71
+ __metadata("design:type", user_1.User)
72
+ ], SurveyItem.prototype, "createdBy", void 0);
73
+ __decorate([
74
+ (0, class_transformer_1.Expose)(),
75
+ (0, class_transformer_1.Type)(() => Date),
76
+ __metadata("design:type", Date)
77
+ ], SurveyItem.prototype, "createdOn", void 0);
78
+ __decorate([
79
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
80
+ (0, class_transformer_1.Type)(() => user_1.User),
81
+ __metadata("design:type", user_1.User)
82
+ ], SurveyItem.prototype, "updatedBy", void 0);
83
+ __decorate([
84
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
85
+ (0, class_transformer_1.Type)(() => Date),
86
+ __metadata("design:type", Date)
87
+ ], SurveyItem.prototype, "updatedOn", void 0);
88
+ //# sourceMappingURL=survey-item.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"survey-item.model.js","sourceRoot":"","sources":["../../src/survey/survey-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,kCAA+B;AAC/B,iDAAwC;AACxC,+DAAqD;AAGrD,MAAa,UAAU;IAItB,EAAE,CAAS;IAKX,QAAQ,CAAS;IAMjB,QAAQ,CAAU;IAIlB,QAAQ,CAAU;IAIlB,IAAI,CAAS;IAMb,MAAM,CAAS;IAIf,OAAO,CAAiB;IAMxB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAEhB,YAAY,KAA2B;QACtC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAxDD,gCAwDC;AApDA;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;sCACR;AAKX;IADC,IAAA,0BAAM,GAAE;;4CACQ;AAMjB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;4CACF;AAIlB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;4CACF;AAIlB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;wCACN;AAMb;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,qBAAM,CAAC;8BACX,qBAAM;0CAAC;AAIf;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,kCAAY,CAAC;;2CACD;AAMxB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,WAAI,CAAC;8BACN,WAAI;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,WAAI,CAAC;8BACN,WAAI;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"}
@@ -0,0 +1,9 @@
1
+ import { SurveyItem } from './survey-item.model';
2
+ export declare class SurveyOption {
3
+ id: number;
4
+ content: string;
5
+ sort: number;
6
+ isSelected: boolean;
7
+ item: SurveyItem;
8
+ constructor(props?: Partial<SurveyOption>);
9
+ }
@@ -0,0 +1,50 @@
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.SurveyOption = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const survey_item_model_1 = require("./survey-item.model");
15
+ class SurveyOption {
16
+ id;
17
+ content;
18
+ sort;
19
+ isSelected;
20
+ item;
21
+ constructor(props) {
22
+ Object.assign(this, props);
23
+ }
24
+ }
25
+ exports.SurveyOption = SurveyOption;
26
+ __decorate([
27
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
28
+ (0, class_transformer_1.Type)(() => Number),
29
+ __metadata("design:type", Number)
30
+ ], SurveyOption.prototype, "id", void 0);
31
+ __decorate([
32
+ (0, class_transformer_1.Expose)(),
33
+ __metadata("design:type", String)
34
+ ], SurveyOption.prototype, "content", void 0);
35
+ __decorate([
36
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
37
+ (0, class_transformer_1.Type)(() => Number),
38
+ __metadata("design:type", Number)
39
+ ], SurveyOption.prototype, "sort", void 0);
40
+ __decorate([
41
+ (0, class_transformer_1.Expose)(),
42
+ (0, class_transformer_1.Type)(() => Boolean),
43
+ __metadata("design:type", Boolean)
44
+ ], SurveyOption.prototype, "isSelected", void 0);
45
+ __decorate([
46
+ (0, class_transformer_1.Expose)(),
47
+ (0, class_transformer_1.Type)(() => survey_item_model_1.SurveyItem),
48
+ __metadata("design:type", survey_item_model_1.SurveyItem)
49
+ ], SurveyOption.prototype, "item", void 0);
50
+ //# sourceMappingURL=survey-option.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"survey-option.model.js","sourceRoot":"","sources":["../../src/survey/survey-option.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,2DAAiD;AAEjD,MAAa,YAAY;IAIxB,EAAE,CAAS;IAKX,OAAO,CAAS;IAMhB,IAAI,CAAS;IAIb,UAAU,CAAU;IAMpB,IAAI,CAAa;IAEjB,YAAY,KAA6B;QACxC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AA9BD,oCA8BC;AA1BA;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;wCACR;AAKX;IADC,IAAA,0BAAM,GAAE;;6CACO;AAMhB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;0CACN;AAIb;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;gDACA;AAMpB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,8BAAU,CAAC;8BACjB,8BAAU;0CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare class CreateSurveyDto {
2
+ name: string;
3
+ startDate: Date;
4
+ endDate: Date;
5
+ }
6
+ export declare class SurveyQuestionDto {
7
+ question: string;
8
+ multiple: boolean;
9
+ }
@@ -0,0 +1,54 @@
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.SurveyQuestionDto = exports.CreateSurveyDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const class_transformer_1 = require("class-transformer");
15
+ class CreateSurveyDto {
16
+ name;
17
+ startDate;
18
+ endDate;
19
+ }
20
+ exports.CreateSurveyDto = CreateSurveyDto;
21
+ __decorate([
22
+ (0, class_validator_1.IsNotEmpty)(),
23
+ (0, class_validator_1.IsString)(),
24
+ __metadata("design:type", String)
25
+ ], CreateSurveyDto.prototype, "name", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsNotEmpty)(),
28
+ (0, class_validator_1.IsDate)(),
29
+ (0, class_transformer_1.Type)(() => Date),
30
+ __metadata("design:type", Date)
31
+ ], CreateSurveyDto.prototype, "startDate", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsNotEmpty)(),
34
+ (0, class_validator_1.IsDate)(),
35
+ (0, class_transformer_1.Type)(() => Date),
36
+ __metadata("design:type", Date)
37
+ ], CreateSurveyDto.prototype, "endDate", void 0);
38
+ class SurveyQuestionDto {
39
+ question;
40
+ multiple;
41
+ }
42
+ exports.SurveyQuestionDto = SurveyQuestionDto;
43
+ __decorate([
44
+ (0, class_validator_1.IsNotEmpty)(),
45
+ (0, class_validator_1.IsString)(),
46
+ __metadata("design:type", String)
47
+ ], SurveyQuestionDto.prototype, "question", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsOptional)(),
50
+ (0, class_validator_1.IsBoolean)(),
51
+ (0, class_transformer_1.Type)(() => Boolean),
52
+ __metadata("design:type", Boolean)
53
+ ], SurveyQuestionDto.prototype, "multiple", void 0);
54
+ //# sourceMappingURL=survey.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"survey.dto.js","sourceRoot":"","sources":["../../src/survey/survey.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsF;AACtF,yDAAyC;AAEzC,MAAa,eAAe;IAI3B,IAAI,CAAS;IAKb,SAAS,CAAO;IAKhB,OAAO,CAAO;CACd;AAfD,0CAeC;AAXA;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;6CACE;AAKb;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;kDAAC;AAKhB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACR,IAAI;gDAAC;AAGf,MAAa,iBAAiB;IAI7B,QAAQ,CAAS;IAKjB,QAAQ,CAAU;CAClB;AAVD,8CAUC;AANA;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACM;AAKjB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;IACX,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;mDACF"}
@@ -0,0 +1,5 @@
1
+ export declare enum SurveyEvent {
2
+ Start = "START",
3
+ Completed = "COMPLETED",
4
+ Reject = "REJECT"
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SurveyEvent = void 0;
4
+ var SurveyEvent;
5
+ (function (SurveyEvent) {
6
+ SurveyEvent["Start"] = "START";
7
+ SurveyEvent["Completed"] = "COMPLETED";
8
+ SurveyEvent["Reject"] = "REJECT";
9
+ })(SurveyEvent || (exports.SurveyEvent = SurveyEvent = {}));
10
+ //# sourceMappingURL=survey.event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"survey.event.js","sourceRoot":"","sources":["../../src/survey/survey.event.ts"],"names":[],"mappings":";;;AAGA,IAAY,WAeX;AAfD,WAAY,WAAW;IAItB,8BAAe,CAAA;IAKf,sCAAuB,CAAA;IAKvB,gCAAiB,CAAA;AAClB,CAAC,EAfW,WAAW,2BAAX,WAAW,QAetB"}
@@ -0,0 +1,27 @@
1
+ import { StatusType, StatusLabel } from '../common';
2
+ import { Metric } from '../metric';
3
+ import { User } from '../user';
4
+ import { SurveyItem } from './survey-item.model';
5
+ export declare class Survey {
6
+ id: number;
7
+ slug: string;
8
+ name: string;
9
+ description: string;
10
+ imageUrl: string;
11
+ items: SurveyItem[];
12
+ status: StatusType;
13
+ label: StatusLabel;
14
+ startDate: Date;
15
+ endDate: Date;
16
+ isStarted: boolean;
17
+ metrics: Metric[];
18
+ createdBy: User;
19
+ createdOn: Date;
20
+ updatedBy: User;
21
+ updatedOn: Date;
22
+ statusChangedBy: User;
23
+ statusChangedOn: Date;
24
+ publishedBy: User;
25
+ publishedOn: Date;
26
+ constructor(props?: Partial<Survey>);
27
+ }
@@ -0,0 +1,138 @@
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.Survey = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const common_1 = require("../common");
15
+ const metric_1 = require("../metric");
16
+ const user_1 = require("../user");
17
+ const survey_item_model_1 = require("./survey-item.model");
18
+ class Survey {
19
+ id;
20
+ slug;
21
+ name;
22
+ description;
23
+ imageUrl;
24
+ items;
25
+ status;
26
+ label;
27
+ startDate;
28
+ endDate;
29
+ isStarted;
30
+ metrics;
31
+ createdBy;
32
+ createdOn;
33
+ updatedBy;
34
+ updatedOn;
35
+ statusChangedBy;
36
+ statusChangedOn;
37
+ publishedBy;
38
+ publishedOn;
39
+ constructor(props) {
40
+ Object.assign(this, props);
41
+ }
42
+ }
43
+ exports.Survey = Survey;
44
+ __decorate([
45
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
46
+ (0, class_transformer_1.Type)(() => Number),
47
+ __metadata("design:type", Number)
48
+ ], Survey.prototype, "id", void 0);
49
+ __decorate([
50
+ (0, class_transformer_1.Expose)(),
51
+ __metadata("design:type", String)
52
+ ], Survey.prototype, "slug", void 0);
53
+ __decorate([
54
+ (0, class_transformer_1.Expose)(),
55
+ __metadata("design:type", String)
56
+ ], Survey.prototype, "name", void 0);
57
+ __decorate([
58
+ (0, class_transformer_1.Expose)(),
59
+ __metadata("design:type", String)
60
+ ], Survey.prototype, "description", void 0);
61
+ __decorate([
62
+ (0, class_transformer_1.Expose)(),
63
+ __metadata("design:type", String)
64
+ ], Survey.prototype, "imageUrl", void 0);
65
+ __decorate([
66
+ (0, class_transformer_1.Expose)(),
67
+ (0, class_transformer_1.Type)(() => survey_item_model_1.SurveyItem),
68
+ __metadata("design:type", Array)
69
+ ], Survey.prototype, "items", void 0);
70
+ __decorate([
71
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
72
+ __metadata("design:type", String)
73
+ ], Survey.prototype, "status", void 0);
74
+ __decorate([
75
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
76
+ __metadata("design:type", String)
77
+ ], Survey.prototype, "label", void 0);
78
+ __decorate([
79
+ (0, class_transformer_1.Expose)(),
80
+ (0, class_transformer_1.Type)(() => Date),
81
+ __metadata("design:type", Date)
82
+ ], Survey.prototype, "startDate", void 0);
83
+ __decorate([
84
+ (0, class_transformer_1.Expose)(),
85
+ (0, class_transformer_1.Type)(() => Date),
86
+ __metadata("design:type", Date)
87
+ ], Survey.prototype, "endDate", void 0);
88
+ __decorate([
89
+ (0, class_transformer_1.Expose)(),
90
+ (0, class_transformer_1.Type)(() => Boolean),
91
+ __metadata("design:type", Boolean)
92
+ ], Survey.prototype, "isStarted", void 0);
93
+ __decorate([
94
+ (0, class_transformer_1.Expose)(),
95
+ (0, class_transformer_1.Type)(() => metric_1.Metric),
96
+ __metadata("design:type", Array)
97
+ ], Survey.prototype, "metrics", void 0);
98
+ __decorate([
99
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
100
+ (0, class_transformer_1.Type)(() => user_1.User),
101
+ __metadata("design:type", user_1.User)
102
+ ], Survey.prototype, "createdBy", void 0);
103
+ __decorate([
104
+ (0, class_transformer_1.Expose)(),
105
+ (0, class_transformer_1.Type)(() => Date),
106
+ __metadata("design:type", Date)
107
+ ], Survey.prototype, "createdOn", void 0);
108
+ __decorate([
109
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
110
+ (0, class_transformer_1.Type)(() => user_1.User),
111
+ __metadata("design:type", user_1.User)
112
+ ], Survey.prototype, "updatedBy", void 0);
113
+ __decorate([
114
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
115
+ (0, class_transformer_1.Type)(() => Date),
116
+ __metadata("design:type", Date)
117
+ ], Survey.prototype, "updatedOn", void 0);
118
+ __decorate([
119
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
120
+ (0, class_transformer_1.Type)(() => user_1.User),
121
+ __metadata("design:type", user_1.User)
122
+ ], Survey.prototype, "statusChangedBy", void 0);
123
+ __decorate([
124
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
125
+ (0, class_transformer_1.Type)(() => Date),
126
+ __metadata("design:type", Date)
127
+ ], Survey.prototype, "statusChangedOn", void 0);
128
+ __decorate([
129
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
130
+ (0, class_transformer_1.Type)(() => user_1.User),
131
+ __metadata("design:type", user_1.User)
132
+ ], Survey.prototype, "publishedBy", void 0);
133
+ __decorate([
134
+ (0, class_transformer_1.Expose)(),
135
+ (0, class_transformer_1.Type)(() => Date),
136
+ __metadata("design:type", Date)
137
+ ], Survey.prototype, "publishedOn", void 0);
138
+ //# sourceMappingURL=survey.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"survey.model.js","sourceRoot":"","sources":["../../src/survey/survey.model.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
1
+ export * from './topic.model';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./topic.model"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/topic/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
@@ -0,0 +1,20 @@
1
+ import { Item } from "../item";
2
+ import { Metric } from "../metric";
3
+ import { User } from "../user/";
4
+ import { Popularity } from "../popularity";
5
+ export declare class Topic {
6
+ id: number;
7
+ title: string;
8
+ hash: string;
9
+ description: string;
10
+ sort: number;
11
+ weight: number;
12
+ popularity: Popularity;
13
+ metrics: Metric[];
14
+ createdBy: User;
15
+ createdOn: Date;
16
+ updatedBy: User;
17
+ updatedOn: Date;
18
+ constructor(props?: Partial<Topic>);
19
+ static toItemList(data: Topic[], key?: 'id' | 'slug'): Item<any>[];
20
+ }
@@ -0,0 +1,104 @@
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.Topic = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const item_1 = require("../item");
15
+ const metric_1 = require("../metric");
16
+ const user_1 = require("../user/");
17
+ const popularity_1 = require("../popularity");
18
+ class Topic {
19
+ id;
20
+ title;
21
+ hash;
22
+ description;
23
+ sort;
24
+ weight;
25
+ popularity;
26
+ metrics;
27
+ createdBy;
28
+ createdOn;
29
+ updatedBy;
30
+ updatedOn;
31
+ constructor(props) {
32
+ Object.assign(this, props);
33
+ }
34
+ static toItemList(data, key = 'id') {
35
+ if (!data || data.length === 0)
36
+ return [];
37
+ return data.map(i => new item_1.Item({
38
+ title: i.title,
39
+ value: i[key]
40
+ }));
41
+ }
42
+ }
43
+ exports.Topic = Topic;
44
+ __decorate([
45
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
46
+ (0, class_transformer_1.Type)(() => Number),
47
+ __metadata("design:type", Number)
48
+ ], Topic.prototype, "id", void 0);
49
+ __decorate([
50
+ (0, class_transformer_1.Expose)(),
51
+ __metadata("design:type", String)
52
+ ], Topic.prototype, "title", void 0);
53
+ __decorate([
54
+ (0, class_transformer_1.Expose)(),
55
+ __metadata("design:type", String)
56
+ ], Topic.prototype, "hash", void 0);
57
+ __decorate([
58
+ (0, class_transformer_1.Expose)(),
59
+ __metadata("design:type", String)
60
+ ], Topic.prototype, "description", void 0);
61
+ __decorate([
62
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
63
+ (0, class_transformer_1.Type)(() => Number),
64
+ __metadata("design:type", Number)
65
+ ], Topic.prototype, "sort", void 0);
66
+ __decorate([
67
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
68
+ (0, class_transformer_1.Type)(() => Number),
69
+ __metadata("design:type", Number)
70
+ ], Topic.prototype, "weight", void 0);
71
+ __decorate([
72
+ (0, class_transformer_1.Expose)(),
73
+ (0, class_transformer_1.Type)(() => popularity_1.Popularity),
74
+ (0, class_transformer_1.Transform)(({ obj }) => popularity_1.Popularity.get(obj.weight)),
75
+ __metadata("design:type", popularity_1.Popularity)
76
+ ], Topic.prototype, "popularity", void 0);
77
+ __decorate([
78
+ (0, class_transformer_1.Type)(() => metric_1.Metric),
79
+ (0, class_transformer_1.Transform)(({ obj }) => [
80
+ metric_1.Metric.total('totalPosts', obj.totalPosts, ['fas', 'book-open'])
81
+ ]),
82
+ __metadata("design:type", Array)
83
+ ], Topic.prototype, "metrics", void 0);
84
+ __decorate([
85
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
86
+ (0, class_transformer_1.Type)(() => user_1.User),
87
+ __metadata("design:type", user_1.User)
88
+ ], Topic.prototype, "createdBy", void 0);
89
+ __decorate([
90
+ (0, class_transformer_1.Expose)(),
91
+ (0, class_transformer_1.Type)(() => Date),
92
+ __metadata("design:type", Date)
93
+ ], Topic.prototype, "createdOn", void 0);
94
+ __decorate([
95
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
96
+ (0, class_transformer_1.Type)(() => user_1.User),
97
+ __metadata("design:type", user_1.User)
98
+ ], Topic.prototype, "updatedBy", void 0);
99
+ __decorate([
100
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
101
+ (0, class_transformer_1.Type)(() => Date),
102
+ __metadata("design:type", Date)
103
+ ], Topic.prototype, "updatedOn", void 0);
104
+ //# sourceMappingURL=topic.model.js.map