@intelact/bright 0.9.76 → 0.9.78

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. package/lib/dtos/boost.dto.d.ts +0 -12
  2. package/lib/dtos/boost.dto.js +1 -50
  3. package/lib/dtos/boost.dto.js.map +1 -1
  4. package/lib/dtos/brand.dto.d.ts +0 -15
  5. package/lib/dtos/brand.dto.js +1 -46
  6. package/lib/dtos/brand.dto.js.map +1 -1
  7. package/lib/dtos/feedback.dto.d.ts +0 -9
  8. package/lib/dtos/feedback.dto.js +1 -28
  9. package/lib/dtos/feedback.dto.js.map +1 -1
  10. package/lib/dtos/general.dto.d.ts +3 -0
  11. package/lib/dtos/general.dto.js +10 -1
  12. package/lib/dtos/general.dto.js.map +1 -1
  13. package/lib/dtos/index.d.ts +0 -4
  14. package/lib/dtos/index.js +0 -4
  15. package/lib/dtos/index.js.map +1 -1
  16. package/lib/dtos/post.dto.d.ts +0 -22
  17. package/lib/dtos/post.dto.js +1 -65
  18. package/lib/dtos/post.dto.js.map +1 -1
  19. package/lib/dtos/promotion.dto.d.ts +0 -8
  20. package/lib/dtos/promotion.dto.js +1 -37
  21. package/lib/dtos/promotion.dto.js.map +1 -1
  22. package/lib/dtos/question.dto.d.ts +0 -19
  23. package/lib/dtos/question.dto.js +1 -62
  24. package/lib/dtos/question.dto.js.map +1 -1
  25. package/lib/dtos/search.dto.d.ts +12 -0
  26. package/lib/dtos/search.dto.js +72 -0
  27. package/lib/dtos/search.dto.js.map +1 -0
  28. package/lib/dtos/survey.dto.d.ts +0 -24
  29. package/lib/dtos/survey.dto.js +1 -90
  30. package/lib/dtos/survey.dto.js.map +1 -1
  31. package/lib/dtos/user.dto.d.ts +0 -3
  32. package/lib/dtos/user.dto.js +1 -10
  33. package/lib/dtos/user.dto.js.map +1 -1
  34. package/lib/enums/asset.enum.js.map +1 -1
  35. package/lib/enums/index.d.ts +0 -1
  36. package/lib/enums/index.js +0 -1
  37. package/lib/enums/index.js.map +1 -1
  38. package/lib/enums/module.enum.d.ts +0 -19
  39. package/lib/enums/module.enum.js +1 -21
  40. package/lib/enums/module.enum.js.map +1 -1
  41. package/lib/enums/setting.enum.d.ts +2 -2
  42. package/lib/enums/setting.enum.js +2 -2
  43. package/lib/enums/tracks.enum.d.ts +13 -2
  44. package/lib/enums/tracks.enum.js +23 -11
  45. package/lib/enums/tracks.enum.js.map +1 -1
  46. package/lib/helpers/index.d.ts +2 -0
  47. package/lib/helpers/index.js +19 -0
  48. package/lib/helpers/index.js.map +1 -0
  49. package/lib/helpers/popularity.helper.d.ts +2 -0
  50. package/lib/helpers/popularity.helper.js +58 -0
  51. package/lib/helpers/popularity.helper.js.map +1 -0
  52. package/lib/helpers/post.helper.d.ts +2 -0
  53. package/lib/helpers/post.helper.js +22 -0
  54. package/lib/helpers/post.helper.js.map +1 -0
  55. package/lib/index.d.ts +1 -0
  56. package/lib/index.js +1 -0
  57. package/lib/index.js.map +1 -1
  58. package/lib/models/author.d.ts +6 -4
  59. package/lib/models/author.js +22 -18
  60. package/lib/models/author.js.map +1 -1
  61. package/lib/models/boost.d.ts +6 -7
  62. package/lib/models/boost.js +22 -29
  63. package/lib/models/boost.js.map +1 -1
  64. package/lib/models/brand.d.ts +6 -4
  65. package/lib/models/brand.js +38 -18
  66. package/lib/models/brand.js.map +1 -1
  67. package/lib/models/category.d.ts +2 -1
  68. package/lib/models/category.js +6 -5
  69. package/lib/models/category.js.map +1 -1
  70. package/lib/models/collection.d.ts +5 -5
  71. package/lib/models/collection.js +20 -20
  72. package/lib/models/collection.js.map +1 -1
  73. package/lib/models/feedback.d.ts +8 -5
  74. package/lib/models/feedback.js +37 -54
  75. package/lib/models/feedback.js.map +1 -1
  76. package/lib/models/index.d.ts +2 -1
  77. package/lib/models/index.js +2 -1
  78. package/lib/models/index.js.map +1 -1
  79. package/lib/models/log.d.ts +11 -0
  80. package/lib/models/log.js +16 -0
  81. package/lib/models/log.js.map +1 -0
  82. package/lib/models/metric.d.ts +20 -0
  83. package/lib/models/metric.js +186 -0
  84. package/lib/models/metric.js.map +1 -0
  85. package/lib/models/post.d.ts +26 -36
  86. package/lib/models/post.js +238 -358
  87. package/lib/models/post.js.map +1 -1
  88. package/lib/models/promotion.d.ts +9 -3
  89. package/lib/models/promotion.js +40 -8
  90. package/lib/models/promotion.js.map +1 -1
  91. package/lib/models/publisher.d.ts +8 -3
  92. package/lib/models/publisher.js +34 -14
  93. package/lib/models/publisher.js.map +1 -1
  94. package/lib/models/question.d.ts +21 -27
  95. package/lib/models/question.js +95 -162
  96. package/lib/models/question.js.map +1 -1
  97. package/lib/models/quote.d.ts +0 -1
  98. package/lib/models/quote.js +0 -6
  99. package/lib/models/quote.js.map +1 -1
  100. package/lib/models/survey.d.ts +15 -9
  101. package/lib/models/survey.js +70 -54
  102. package/lib/models/survey.js.map +1 -1
  103. package/lib/models/topic.d.ts +5 -1
  104. package/lib/models/topic.js +21 -55
  105. package/lib/models/topic.js.map +1 -1
  106. package/lib/models/user.d.ts +4 -4
  107. package/lib/models/user.js +100 -22
  108. package/lib/models/user.js.map +1 -1
  109. package/lib/tsconfig.tsbuildinfo +1 -1
  110. package/package.json +3 -3
@@ -1,14 +1,16 @@
1
1
  import { Item } from "./item";
2
+ import { Metric } from "./metric";
3
+ import { Log } from "./log";
2
4
  export declare class Author {
3
5
  id: number;
4
6
  slug: string;
5
7
  name: string;
6
8
  biography: string;
7
9
  imageUrl: string;
8
- totalPosts: number;
9
- totalQuestionsComments: number;
10
- totalQuestions: number;
11
- metrics: Item[];
10
+ metricPosts: Metric;
11
+ metricQuestions: Metric;
12
+ created: Log;
13
+ updated: Log;
12
14
  constructor(props?: Partial<Author>);
13
15
  static toItemList(data: Author[], key?: 'id' | 'slug'): Item<any>[];
14
16
  }
@@ -12,16 +12,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Author = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const item_1 = require("./item");
15
+ const metric_1 = require("./metric");
16
+ const log_1 = require("./log");
15
17
  class Author {
16
18
  id;
17
19
  slug;
18
20
  name;
19
21
  biography;
20
22
  imageUrl;
21
- totalPosts;
22
- totalQuestionsComments;
23
- totalQuestions;
24
- metrics;
23
+ metricPosts;
24
+ metricQuestions;
25
+ created;
26
+ updated;
25
27
  constructor(props) {
26
28
  Object.assign(this, props);
27
29
  }
@@ -58,22 +60,24 @@ __decorate([
58
60
  ], Author.prototype, "imageUrl", void 0);
59
61
  __decorate([
60
62
  (0, class_transformer_1.Expose)(),
61
- (0, class_transformer_1.Type)(() => Number),
62
- __metadata("design:type", Number)
63
- ], Author.prototype, "totalPosts", void 0);
63
+ (0, class_transformer_1.Type)(() => metric_1.Metric),
64
+ (0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.total('totalPosts', obj?.totalPosts, ['fas', 'book-open'])),
65
+ __metadata("design:type", metric_1.Metric)
66
+ ], Author.prototype, "metricPosts", void 0);
64
67
  __decorate([
65
68
  (0, class_transformer_1.Expose)(),
66
- (0, class_transformer_1.Type)(() => Number),
67
- __metadata("design:type", Number)
68
- ], Author.prototype, "totalQuestionsComments", void 0);
69
+ (0, class_transformer_1.Type)(() => metric_1.Metric),
70
+ (0, class_transformer_1.Transform)(({ obj }) => metric_1.Metric.total('totalQuestions', obj?.totalQuestions)),
71
+ __metadata("design:type", metric_1.Metric)
72
+ ], Author.prototype, "metricQuestions", void 0);
69
73
  __decorate([
70
- (0, class_transformer_1.Expose)(),
71
- (0, class_transformer_1.Type)(() => Number),
72
- __metadata("design:type", Number)
73
- ], Author.prototype, "totalQuestions", void 0);
74
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
75
+ (0, class_transformer_1.Type)(() => log_1.Log),
76
+ __metadata("design:type", log_1.Log)
77
+ ], Author.prototype, "created", void 0);
74
78
  __decorate([
75
- (0, class_transformer_1.Expose)(),
76
- (0, class_transformer_1.Type)(() => item_1.Item),
77
- __metadata("design:type", Array)
78
- ], Author.prototype, "metrics", void 0);
79
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
80
+ (0, class_transformer_1.Type)(() => log_1.Log),
81
+ __metadata("design:type", log_1.Log)
82
+ ], Author.prototype, "updated", void 0);
79
83
  //# sourceMappingURL=author.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"author.js","sourceRoot":"","sources":["../../src/models/author.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,iCAA8B;AAK9B,MAAa,MAAM;IAIlB,EAAE,CAAS;IAGX,IAAI,CAAS;IAGb,IAAI,CAAS;IAGb,SAAS,CAAS;IAGlB,QAAQ,CAAS;IAIjB,UAAU,CAAS;IAOnB,sBAAsB,CAAS;IAO/B,cAAc,CAAS;IAIvB,OAAO,CAAS;IAEhB,YAAY,KAAuB;QAClC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAQD,MAAM,CAAC,UAAU,CAAC,IAAc,EAAE,MAAgB,IAAI;QACrD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAG,CAAC;YAAE,OAAO,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,WAAI,CAAC;YAC7B,KAAK,EAAE,CAAC,CAAC,IAAI;YACb,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC;SACb,CAAC,CAAC,CAAA;IACJ,CAAC;CACD;AAzDD,wBAyDC;AArDA;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;kCACR;AAGX;IADC,IAAA,0BAAM,GAAE;;oCACI;AAGb;IADC,IAAA,0BAAM,GAAE;;oCACI;AAGb;IADC,IAAA,0BAAM,GAAE;;yCACS;AAGlB;IADC,IAAA,0BAAM,GAAE;;wCACQ;AAIjB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,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ACR;AAGX;IADC,IAAA,0BAAM,GAAE;;oCACI;AAKb;IADC,IAAA,0BAAM,GAAE;;oCACI;AAGb;IADC,IAAA,0BAAM,GAAE;;yCACS;AAGlB;IADC,IAAA,0BAAM,GAAE;;wCACQ;AAWjB;IAPC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;IAClB,IAAA,6BAAS,EAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,eAAM,CAAC,KAAK,CACnC,YAAY,EACZ,GAAG,EAAE,UAAU,EACf,CAAC,KAAK,EAAE,WAAW,CAAC,CACpB,CAAC;8BACW,eAAM;2CAAC;AAQpB;IANC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;IAClB,IAAA,6BAAS,EAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,eAAM,CAAC,KAAK,CACnC,gBAAgB,EAChB,GAAG,EAAE,cAAc,CACnB,CAAC;8BACe,eAAM;+CAAC;AAMxB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACP,SAAG;uCAAC;AAIb;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACP,SAAG;uCAAC"}
@@ -1,15 +1,14 @@
1
1
  import { Post } from './post';
2
- import { User } from './user';
3
- import { Item } from './item';
2
+ import { Metric } from './metric';
3
+ import { Log } from './log';
4
4
  export declare class Boost {
5
5
  id: number;
6
6
  title: string;
7
+ items: Post[];
7
8
  startDate: Date;
8
9
  endDate: Date;
9
- totalItems: number;
10
- items: Post[];
11
- createdBy: User;
12
- createdOn: Date;
13
- metrics: Item[];
10
+ metricPosts: Metric;
11
+ created: Log;
12
+ updated: Log;
14
13
  constructor(props?: Partial<Boost>);
15
14
  }
@@ -12,18 +12,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Boost = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const post_1 = require("./post");
15
- const user_1 = require("./user");
16
- const item_1 = require("./item");
15
+ const metric_1 = require("./metric");
16
+ const log_1 = require("./log");
17
17
  let Boost = class Boost {
18
18
  id;
19
19
  title;
20
+ items;
20
21
  startDate;
21
22
  endDate;
22
- totalItems;
23
- items;
24
- createdBy;
25
- createdOn;
26
- metrics;
23
+ metricPosts;
24
+ created;
25
+ updated;
27
26
  constructor(props) {
28
27
  Object.assign(this, props);
29
28
  }
@@ -38,6 +37,11 @@ __decorate([
38
37
  (0, class_transformer_1.Expose)(),
39
38
  __metadata("design:type", String)
40
39
  ], Boost.prototype, "title", void 0);
40
+ __decorate([
41
+ (0, class_transformer_1.Expose)(),
42
+ (0, class_transformer_1.Type)(() => post_1.Post),
43
+ __metadata("design:type", Array)
44
+ ], Boost.prototype, "items", void 0);
41
45
  __decorate([
42
46
  (0, class_transformer_1.Expose)(),
43
47
  (0, class_transformer_1.Type)(() => Date),
@@ -49,30 +53,19 @@ __decorate([
49
53
  __metadata("design:type", Date)
50
54
  ], Boost.prototype, "endDate", void 0);
51
55
  __decorate([
52
- (0, class_transformer_1.Expose)(),
53
- (0, class_transformer_1.Type)(() => Number),
54
- __metadata("design:type", Number)
55
- ], Boost.prototype, "totalItems", void 0);
56
- __decorate([
57
- (0, class_transformer_1.Expose)(),
58
- (0, class_transformer_1.Type)(() => post_1.Post),
59
- __metadata("design:type", Array)
60
- ], Boost.prototype, "items", void 0);
61
- __decorate([
62
- (0, class_transformer_1.Expose)(),
63
- (0, class_transformer_1.Type)(() => user_1.User),
64
- __metadata("design:type", user_1.User)
65
- ], Boost.prototype, "createdBy", void 0);
56
+ (0, class_transformer_1.Type)(() => metric_1.Metric),
57
+ __metadata("design:type", metric_1.Metric)
58
+ ], Boost.prototype, "metricPosts", void 0);
66
59
  __decorate([
67
- (0, class_transformer_1.Expose)(),
68
- (0, class_transformer_1.Type)(() => Date),
69
- __metadata("design:type", Date)
70
- ], Boost.prototype, "createdOn", void 0);
60
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
61
+ (0, class_transformer_1.Type)(() => log_1.Log),
62
+ __metadata("design:type", log_1.Log)
63
+ ], Boost.prototype, "created", void 0);
71
64
  __decorate([
72
- (0, class_transformer_1.Expose)(),
73
- (0, class_transformer_1.Type)(() => item_1.Item),
74
- __metadata("design:type", Array)
75
- ], Boost.prototype, "metrics", void 0);
65
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
66
+ (0, class_transformer_1.Type)(() => log_1.Log),
67
+ __metadata("design:type", log_1.Log)
68
+ ], Boost.prototype, "updated", void 0);
76
69
  exports.Boost = Boost = __decorate([
77
70
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
78
71
  __metadata("design:paramtypes", [Object])
@@ -1 +1 @@
1
- {"version":3,"file":"boost.js","sourceRoot":"","sources":["../../src/models/boost.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAGvB,IAAM,KAAK,GAAX,MAAM,KAAK;IAIjB,EAAE,CAAS;IAGX,KAAK,CAAS;IAId,SAAS,CAAO;IAIhB,OAAO,CAAO;IAId,UAAU,CAAS;IAInB,KAAK,CAAS;IAId,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,OAAO,CAAS;IAEhB,YAAY,KAAsB;QACjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD,CAAA;AAxCY,sBAAK;AAIjB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;iCACR;AAGX;IADC,IAAA,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;IAC5B,CAAC;CACD,CAAA;AA3CY,sBAAK;AAIjB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;iCACR;AAKX;IADC,IAAA,0BAAM,GAAE;;oCACK;AAId;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,WAAI,CAAC;;oCACH;AAMd;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACN,IAAI;wCAAC;AAIhB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACR,IAAI;sCAAC;AAKd;IADC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;8BACN,eAAM;0CAAC;AAMpB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACP,SAAG;sCAAC;AAIb;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACP,SAAG;sCAAC;gBAtCD,KAAK;IADjB,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;GACjB,KAAK,CA2CjB"}
@@ -3,26 +3,28 @@ import { Publisher } from './publisher';
3
3
  import { Link } from './link';
4
4
  export declare class Brand {
5
5
  id: number;
6
+ shortname: string;
7
+ modules: ModuleType[];
8
+ contentTypes: PostType[];
6
9
  name: string;
7
- title: string;
8
10
  slogan: string;
9
11
  url: string;
10
12
  email: string;
11
13
  description: string;
12
- language: string;
13
14
  logo: string;
14
15
  status: AccountStatusType;
16
+ language: string;
15
17
  maintaince: boolean;
16
18
  apiVersion: string;
17
19
  appUpgrade: boolean;
18
- modules: ModuleType[];
19
- contentTypes: PostType[];
20
20
  settings: BrandSetting[];
21
21
  publishers: Publisher[];
22
22
  constructor(props?: Partial<Brand>);
23
23
  getMobileStoreLinks(): Link[];
24
24
  getSocialLinks(): Link[];
25
25
  getLegalLinks(): Link[];
26
+ getExternImageProviders(): string[];
27
+ getExternVideoProviders(): string[];
26
28
  }
27
29
  export declare class BrandSetting {
28
30
  id: number;
@@ -16,20 +16,20 @@ const publisher_1 = require("./publisher");
16
16
  const link_1 = require("./link");
17
17
  class Brand {
18
18
  id;
19
+ shortname;
20
+ modules;
21
+ contentTypes;
19
22
  name;
20
- title;
21
23
  slogan;
22
24
  url;
23
25
  email;
24
26
  description;
25
- language;
26
27
  logo;
27
28
  status;
29
+ language;
28
30
  maintaince;
29
31
  apiVersion;
30
32
  appUpgrade;
31
- modules;
32
- contentTypes;
33
33
  settings;
34
34
  publishers;
35
35
  constructor(props) {
@@ -83,6 +83,14 @@ class Brand {
83
83
  url: i.value.replaceAll(this.url, '')
84
84
  })));
85
85
  }
86
+ getExternImageProviders() {
87
+ const setting = this.settings.find(i => i.scope === enums_1.SettingType.Provider && i.name === 'extern-images');
88
+ return setting?.value?.length > 0 ? setting.value.split(',') : [];
89
+ }
90
+ getExternVideoProviders() {
91
+ const setting = this.settings.find(i => i.scope === enums_1.SettingType.Provider && i.name === 'extern-videos');
92
+ return setting?.value?.length > 0 ? setting.value.split(',') : [];
93
+ }
86
94
  }
87
95
  exports.Brand = Brand;
88
96
  __decorate([
@@ -93,11 +101,19 @@ __decorate([
93
101
  __decorate([
94
102
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
95
103
  __metadata("design:type", String)
96
- ], Brand.prototype, "name", void 0);
104
+ ], Brand.prototype, "shortname", void 0);
105
+ __decorate([
106
+ (0, class_transformer_1.Expose)(),
107
+ __metadata("design:type", Array)
108
+ ], Brand.prototype, "modules", void 0);
109
+ __decorate([
110
+ (0, class_transformer_1.Expose)(),
111
+ __metadata("design:type", Array)
112
+ ], Brand.prototype, "contentTypes", void 0);
97
113
  __decorate([
98
114
  (0, class_transformer_1.Expose)(),
99
115
  __metadata("design:type", String)
100
- ], Brand.prototype, "title", void 0);
116
+ ], Brand.prototype, "name", void 0);
101
117
  __decorate([
102
118
  (0, class_transformer_1.Expose)(),
103
119
  __metadata("design:type", String)
@@ -114,10 +130,6 @@ __decorate([
114
130
  (0, class_transformer_1.Expose)(),
115
131
  __metadata("design:type", String)
116
132
  ], Brand.prototype, "description", void 0);
117
- __decorate([
118
- (0, class_transformer_1.Expose)({ groups: ['admin'] }),
119
- __metadata("design:type", String)
120
- ], Brand.prototype, "language", void 0);
121
133
  __decorate([
122
134
  (0, class_transformer_1.Expose)(),
123
135
  __metadata("design:type", String)
@@ -126,6 +138,10 @@ __decorate([
126
138
  (0, class_transformer_1.Expose)({ groups: ['admin'] }),
127
139
  __metadata("design:type", String)
128
140
  ], Brand.prototype, "status", void 0);
141
+ __decorate([
142
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
143
+ __metadata("design:type", String)
144
+ ], Brand.prototype, "language", void 0);
129
145
  __decorate([
130
146
  (0, class_transformer_1.Expose)(),
131
147
  (0, class_transformer_1.Type)(() => Boolean),
@@ -140,14 +156,6 @@ __decorate([
140
156
  (0, class_transformer_1.Type)(() => Boolean),
141
157
  __metadata("design:type", Boolean)
142
158
  ], Brand.prototype, "appUpgrade", void 0);
143
- __decorate([
144
- (0, class_transformer_1.Expose)(),
145
- __metadata("design:type", Array)
146
- ], Brand.prototype, "modules", void 0);
147
- __decorate([
148
- (0, class_transformer_1.Expose)(),
149
- __metadata("design:type", Array)
150
- ], Brand.prototype, "contentTypes", void 0);
151
159
  __decorate([
152
160
  (0, class_transformer_1.Expose)(),
153
161
  (0, class_transformer_1.Type)(() => BrandSetting),
@@ -176,6 +184,18 @@ __decorate([
176
184
  __metadata("design:paramtypes", []),
177
185
  __metadata("design:returntype", Array)
178
186
  ], Brand.prototype, "getLegalLinks", null);
187
+ __decorate([
188
+ (0, class_transformer_1.Expose)(),
189
+ __metadata("design:type", Function),
190
+ __metadata("design:paramtypes", []),
191
+ __metadata("design:returntype", Array)
192
+ ], Brand.prototype, "getExternImageProviders", null);
193
+ __decorate([
194
+ (0, class_transformer_1.Expose)(),
195
+ __metadata("design:type", Function),
196
+ __metadata("design:paramtypes", []),
197
+ __metadata("design:returntype", Array)
198
+ ], Brand.prototype, "getExternVideoProviders", null);
179
199
  class BrandSetting {
180
200
  id;
181
201
  scope;
@@ -1 +1 @@
1
- {"version":3,"file":"brand.js","sourceRoot":"","sources":["../../src/models/brand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AAEjD,oCAAgF;AAChF,2CAAwC;AACxC,iCAA8B;AAE9B,MAAa,KAAK;IAIjB,EAAE,CAAS;IAOX,IAAI,CAAS;IAMb,KAAK,CAAS;IAMd,MAAM,CAAS;IAMf,GAAG,CAAS;IAMZ,KAAK,CAAS;IAMd,WAAW,CAAS;IAMpB,QAAQ,CAAS;IAMjB,IAAI,CAAS;IAMb,MAAM,CAAoB;IAO1B,UAAU,CAAU;IAMpB,UAAU,CAAS;IAOnB,UAAU,CAAU;IAMpB,OAAO,CAAe;IAMtB,YAAY,CAAa;IAOzB,QAAQ,CAAiB;IAOzB,UAAU,CAAc;IAExB,YAAY,KAAsB;QACjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IASD,mBAAmB;QAElB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpB,OAAO;QACR,CAAC;QAKD,MAAM,GAAG,GAA+B;YACvC,mBAAmB,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC;YAC3C,oBAAoB,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;SAC1C,CAAC;QAEF,OAAO,IAAI,CAAC,QAAQ;aAClB,MAAM,CAAC,CAAC,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CAAC,OAAO,CAAC,EAAE,CAAC;;iDACV;AAIpB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,KAAK,CAAC;8BACX,KAAK;2CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { Item } from "./item";
2
+ import { Metric } from "./metric";
2
3
  export declare class Category {
3
4
  id: number;
4
5
  title: string;
@@ -6,7 +7,7 @@ export declare class Category {
6
7
  description: string;
7
8
  sort: number;
8
9
  questionEnabled: boolean;
9
- metrics: Item[];
10
+ metricQuestions: Metric;
10
11
  constructor(props?: Partial<Category>);
11
12
  static toItemList(data: Category[], key?: 'id' | 'hash'): Item<any>[];
12
13
  }
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Category = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const item_1 = require("./item");
15
+ const metric_1 = require("./metric");
15
16
  class Category {
16
17
  id;
17
18
  title;
@@ -19,7 +20,7 @@ class Category {
19
20
  description;
20
21
  sort;
21
22
  questionEnabled;
22
- metrics;
23
+ metricQuestions;
23
24
  constructor(props) {
24
25
  Object.assign(this, props);
25
26
  }
@@ -61,8 +62,8 @@ __decorate([
61
62
  __metadata("design:type", Boolean)
62
63
  ], Category.prototype, "questionEnabled", void 0);
63
64
  __decorate([
64
- (0, class_transformer_1.Expose)(),
65
- (0, class_transformer_1.Type)(() => item_1.Item),
66
- __metadata("design:type", Array)
67
- ], Category.prototype, "metrics", void 0);
65
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
66
+ (0, class_transformer_1.Type)(() => metric_1.Metric),
67
+ __metadata("design:type", metric_1.Metric)
68
+ ], Category.prototype, "metricQuestions", void 0);
68
69
  //# sourceMappingURL=category.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"category.js","sourceRoot":"","sources":["../../src/models/category.ts"],"names":[],"mappings":";;;;;;;;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AAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;iDACK;AAMzB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;8BACF,eAAM;iDAAC"}
@@ -1,14 +1,14 @@
1
1
  import { Post } from './post';
2
2
  import { Publisher } from './publisher';
3
- import { Item } from './item';
4
- import { User } from './user';
3
+ import { Metric } from './metric';
4
+ import { Log } from './log';
5
5
  export declare class Collection {
6
6
  id: number;
7
7
  title: string;
8
8
  items: Post[];
9
+ metricPosts: Metric;
10
+ created: Log;
11
+ updated: Log;
9
12
  publisher: Publisher;
10
- createdBy: User;
11
- createdOn: Date;
12
- metrics: Item[];
13
13
  constructor(props?: Partial<Collection>);
14
14
  }
@@ -13,16 +13,16 @@ exports.Collection = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const post_1 = require("./post");
15
15
  const publisher_1 = require("./publisher");
16
- const item_1 = require("./item");
17
- const user_1 = require("./user");
16
+ const metric_1 = require("./metric");
17
+ const log_1 = require("./log");
18
18
  class Collection {
19
19
  id;
20
20
  title;
21
21
  items;
22
+ metricPosts;
23
+ created;
24
+ updated;
22
25
  publisher;
23
- createdBy;
24
- createdOn;
25
- metrics;
26
26
  constructor(props) {
27
27
  Object.assign(this, props);
28
28
  }
@@ -43,23 +43,23 @@ __decorate([
43
43
  __metadata("design:type", Array)
44
44
  ], Collection.prototype, "items", void 0);
45
45
  __decorate([
46
- (0, class_transformer_1.Expose)(),
47
- (0, class_transformer_1.Type)(() => post_1.Post),
48
- __metadata("design:type", publisher_1.Publisher)
49
- ], Collection.prototype, "publisher", void 0);
46
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
47
+ (0, class_transformer_1.Type)(() => metric_1.Metric),
48
+ __metadata("design:type", metric_1.Metric)
49
+ ], Collection.prototype, "metricPosts", void 0);
50
50
  __decorate([
51
- (0, class_transformer_1.Expose)(),
52
- (0, class_transformer_1.Type)(() => user_1.User),
53
- __metadata("design:type", user_1.User)
54
- ], Collection.prototype, "createdBy", void 0);
51
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
52
+ (0, class_transformer_1.Type)(() => log_1.Log),
53
+ __metadata("design:type", log_1.Log)
54
+ ], Collection.prototype, "created", void 0);
55
55
  __decorate([
56
- (0, class_transformer_1.Expose)(),
57
- (0, class_transformer_1.Type)(() => Date),
58
- __metadata("design:type", Date)
59
- ], Collection.prototype, "createdOn", void 0);
56
+ (0, class_transformer_1.Expose)({ groups: ['admin'] }),
57
+ (0, class_transformer_1.Type)(() => log_1.Log),
58
+ __metadata("design:type", log_1.Log)
59
+ ], Collection.prototype, "updated", void 0);
60
60
  __decorate([
61
61
  (0, class_transformer_1.Expose)(),
62
- (0, class_transformer_1.Type)(() => item_1.Item),
63
- __metadata("design:type", Array)
64
- ], Collection.prototype, "metrics", void 0);
62
+ (0, class_transformer_1.Type)(() => publisher_1.Publisher),
63
+ __metadata("design:type", publisher_1.Publisher)
64
+ ], Collection.prototype, "publisher", void 0);
65
65
  //# sourceMappingURL=collection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/models/collection.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AACjD,iCAA8B;AAC9B,2CAAwC;AACxC,iCAA8B;AAC9B,iCAA8B;AAE9B,MAAa,UAAU;IAItB,EAAE,CAAS;IAGX,KAAK,CAAS;IAId,KAAK,CAAS;IAId,SAAS,CAAY;IAIrB,SAAS,CAAO;IAIhB,SAAS,CAAO;IAIhB,OAAO,CAAS;IAEhB,YAAY,KAA2B;QACtC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAhCD,gCAgCC;AA5BA;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO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A,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,WAAI,CAAC;;yCACH;AAMd;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;8BACN,eAAM;+CAAC;AAMpB;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACP,SAAG;2CAAC;AAIb;IAFC,IAAA,0BAAM,EAAC,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,SAAG,CAAC;8BACP,SAAG;2CAAC;AAMb;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,qBAAS,CAAC;8BACX,qBAAS;6CAAC"}
@@ -1,15 +1,19 @@
1
1
  import { PostType } from '../enums';
2
- import { Item } from './item';
2
+ import { Metric } from './metric';
3
+ import { Log } from './log';
3
4
  export declare class Feedback {
4
5
  id: number;
5
6
  type: PostType;
6
7
  title: string;
7
8
  description: string;
8
- items: FeedbackItem[];
9
9
  icon: string;
10
- metrics: Item[];
10
+ metricQuestions: Metric;
11
+ metricPosts: Metric;
12
+ metricUsers: Metric;
13
+ created: Log;
14
+ updated: Log;
15
+ items: FeedbackItem[];
11
16
  constructor(props?: Partial<Feedback>);
12
- updateMetrics(): void;
13
17
  }
14
18
  export declare class FeedbackItem {
15
19
  id: number;
@@ -18,7 +22,6 @@ export declare class FeedbackItem {
18
22
  sort: number;
19
23
  readonly: boolean;
20
24
  options: FeedbackOption[];
21
- metrics: Item[];
22
25
  constructor(props?: Partial<FeedbackItem>);
23
26
  }
24
27
  export declare class FeedbackOption {