itlab-internal-services 2.0.2 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/env.d.ts +5 -0
  2. package/dist/env.js +8 -0
  3. package/dist/guards/index.d.ts +0 -2
  4. package/dist/guards/index.js +0 -2
  5. package/dist/guards/perms.guard.js +1 -1
  6. package/dist/index.d.ts +1 -4
  7. package/dist/index.js +1 -4
  8. package/dist/modules/authentication/authentication.module.d.ts +7 -0
  9. package/dist/modules/authentication/authentication.module.js +26 -0
  10. package/dist/modules/authentication/index.d.ts +3 -0
  11. package/dist/{services → modules/authentication}/index.js +5 -8
  12. package/dist/modules/authentication/internal/index.d.ts +3 -0
  13. package/dist/modules/authentication/internal/index.js +19 -0
  14. package/dist/modules/authentication/internal/internal.constants.d.ts +5 -0
  15. package/dist/modules/authentication/internal/internal.constants.js +8 -0
  16. package/dist/modules/authentication/internal/internal.decorators.d.ts +1 -0
  17. package/dist/modules/authentication/internal/internal.decorators.js +9 -0
  18. package/dist/modules/authentication/internal/internal.guard.d.ts +4 -0
  19. package/dist/modules/authentication/internal/internal.guard.js +18 -0
  20. package/dist/modules/authentication/internal/internal.strategy.d.ts +10 -0
  21. package/dist/modules/authentication/internal/internal.strategy.js +36 -0
  22. package/dist/modules/authentication/jwt/index.d.ts +3 -0
  23. package/dist/modules/authentication/jwt/index.js +19 -0
  24. package/dist/modules/authentication/jwt/jwt.constants.d.ts +8 -0
  25. package/dist/modules/authentication/jwt/jwt.constants.js +10 -0
  26. package/dist/modules/authentication/jwt/jwt.decorators.d.ts +5 -0
  27. package/dist/modules/authentication/jwt/jwt.decorators.js +21 -0
  28. package/dist/modules/authentication/jwt/jwt.guard.d.ts +9 -0
  29. package/dist/modules/authentication/jwt/jwt.guard.js +37 -0
  30. package/dist/modules/authentication/jwt/jwt.strategy.d.ts +9 -0
  31. package/dist/modules/authentication/jwt/jwt.strategy.js +35 -0
  32. package/dist/modules/database/database.module-options.d.ts +4 -0
  33. package/dist/modules/database/database.module.d.ts +6 -0
  34. package/dist/modules/database/database.module.js +69 -0
  35. package/dist/modules/database/index.d.ts +5 -0
  36. package/dist/modules/database/index.js +11 -0
  37. package/dist/{services → modules/database/model-service}/model.service.d.ts +25 -25
  38. package/dist/{services → modules/database/model-service}/model.service.js +11 -11
  39. package/dist/{model-schemas → modules/database/model-service/schemas}/hub-account.schemas.d.ts +1 -1
  40. package/dist/{model-schemas → modules/database/model-service/schemas}/hub-books.schemas.d.ts +1 -1
  41. package/dist/{model-schemas → modules/database/model-service/schemas}/hub-comments.schemas.d.ts +1 -1
  42. package/dist/{model-schemas → modules/database/model-service/schemas}/hub-content.schemas.d.ts +1 -1
  43. package/dist/{model-schemas → modules/database/model-service/schemas}/hub-demo-hive.schemas.d.ts +1 -1
  44. package/dist/{model-schemas → modules/database/model-service/schemas}/hub-events.schemas.d.ts +1 -1
  45. package/dist/{model-schemas → modules/database/model-service/schemas}/hub-hackschool.schemas.d.ts +3 -3
  46. package/dist/{model-schemas → modules/database/model-service/schemas}/hub-newsroom.schemas.d.ts +1 -1
  47. package/dist/{model-schemas → modules/database/model-service/schemas}/hub-podcasts.schemas.d.ts +1 -1
  48. package/dist/{model-schemas → modules/database/model-service/schemas}/hub-team.schemas.d.ts +1 -1
  49. package/dist/{model-schemas → modules/database/model-service/schemas}/hub-tech-radar.schemas.d.ts +2 -2
  50. package/dist/{services → modules/database/populate-service}/populate.service.d.ts +1 -1
  51. package/dist/{services → modules/database/populate-service}/populate.service.js +2 -2
  52. package/dist/{services → modules/database/service-mapper-service}/service-mapper.service.d.ts +1 -1
  53. package/dist/{services → modules/database/service-mapper-service}/service-mapper.service.js +1 -1
  54. package/dist/modules/index.d.ts +3 -0
  55. package/dist/modules/index.js +19 -0
  56. package/dist/{services → modules/services/account-service}/account.service.d.ts +3 -3
  57. package/dist/{services → modules/services/account-service}/account.service.js +10 -16
  58. package/dist/modules/services/comment-service/comment-service.definitions.d.ts +5 -0
  59. package/dist/modules/services/comment-service/comment-service.definitions.js +28 -0
  60. package/dist/{services → modules/services/comment-service}/comment.service.d.ts +6 -10
  61. package/dist/{services → modules/services/comment-service}/comment.service.js +15 -36
  62. package/dist/{services → modules/services/content-service}/content.service.d.ts +5 -5
  63. package/dist/{services → modules/services/content-service}/content.service.js +14 -19
  64. package/dist/modules/services/index.d.ts +9 -0
  65. package/dist/modules/services/index.js +22 -0
  66. package/dist/modules/services/mail-service/mail-service.definitions.d.ts +13 -0
  67. package/dist/modules/services/mail-service/mail-service.definitions.js +55 -0
  68. package/dist/modules/services/mail-service/mail.service.d.ts +11 -0
  69. package/dist/{services → modules/services/mail-service}/mail.service.js +19 -30
  70. package/dist/modules/services/search-service/search-service.definitions.d.ts +6 -0
  71. package/dist/modules/services/search-service/search-service.definitions.js +32 -0
  72. package/dist/modules/services/search-service/search.service.d.ts +11 -0
  73. package/dist/modules/services/search-service/search.service.js +46 -0
  74. package/dist/modules/services/services.module-utils.d.ts +7 -0
  75. package/dist/modules/services/services.module-utils.js +15 -0
  76. package/dist/modules/services/services.module.d.ts +7 -0
  77. package/dist/modules/services/services.module.js +30 -0
  78. package/dist/swagger.config.js +2 -2
  79. package/package.json +3 -3
  80. package/dist/guards/internal.guard.d.ts +0 -15
  81. package/dist/guards/internal.guard.js +0 -49
  82. package/dist/guards/jwt.guard.d.ts +0 -25
  83. package/dist/guards/jwt.guard.js +0 -74
  84. package/dist/itlab.interfaces.d.ts +0 -4
  85. package/dist/itlab.module-definition.d.ts +0 -4
  86. package/dist/itlab.module-definition.js +0 -10
  87. package/dist/itlab.module.d.ts +0 -3
  88. package/dist/itlab.module.js +0 -32
  89. package/dist/mongo.factory.d.ts +0 -6
  90. package/dist/mongo.factory.js +0 -34
  91. package/dist/services/index.d.ts +0 -8
  92. package/dist/services/mail.service.d.ts +0 -23
  93. package/dist/services/search.service.d.ts +0 -16
  94. package/dist/services/search.service.js +0 -71
  95. /package/dist/{itlab.interfaces.js → modules/database/database.module-options.js} +0 -0
  96. /package/dist/{model-schemas → modules/database/model-service/schemas}/hub-account.schemas.js +0 -0
  97. /package/dist/{model-schemas → modules/database/model-service/schemas}/hub-books.schemas.js +0 -0
  98. /package/dist/{model-schemas → modules/database/model-service/schemas}/hub-comments.schemas.js +0 -0
  99. /package/dist/{model-schemas → modules/database/model-service/schemas}/hub-content.schemas.js +0 -0
  100. /package/dist/{model-schemas → modules/database/model-service/schemas}/hub-demo-hive.schemas.js +0 -0
  101. /package/dist/{model-schemas → modules/database/model-service/schemas}/hub-events.schemas.js +0 -0
  102. /package/dist/{model-schemas → modules/database/model-service/schemas}/hub-hackschool.schemas.js +0 -0
  103. /package/dist/{model-schemas → modules/database/model-service/schemas}/hub-newsroom.schemas.js +0 -0
  104. /package/dist/{model-schemas → modules/database/model-service/schemas}/hub-podcasts.schemas.js +0 -0
  105. /package/dist/{model-schemas → modules/database/model-service/schemas}/hub-team.schemas.js +0 -0
  106. /package/dist/{model-schemas → modules/database/model-service/schemas}/hub-tech-radar.schemas.js +0 -0
@@ -23,17 +23,17 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  import { Connection, Schema } from 'mongoose';
26
- import { AccountModel } from '../model-schemas/hub-account.schemas';
27
- import { BookModel } from '../model-schemas/hub-books.schemas';
28
- import { CommentModel } from '../model-schemas/hub-comments.schemas';
29
- import { ContentModel } from '../model-schemas/hub-content.schemas';
30
- import { DemoModel } from '../model-schemas/hub-demo-hive.schemas';
31
- import { EventModel } from '../model-schemas/hub-events.schemas';
32
- import { CourseModel, DocModel, ThreadModel } from '../model-schemas/hub-hackschool.schemas';
33
- import { NewsModel } from '../model-schemas/hub-newsroom.schemas';
34
- import { PodcastModel } from '../model-schemas/hub-podcasts.schemas';
35
- import { MemberModel } from '../model-schemas/hub-team.schemas';
36
- import { BlipModel, RadarModel } from '../model-schemas/hub-tech-radar.schemas';
26
+ import { AccountModel } from './schemas/hub-account.schemas';
27
+ import { BookModel } from './schemas/hub-books.schemas';
28
+ import { CommentModel } from './schemas/hub-comments.schemas';
29
+ import { ContentModel } from './schemas/hub-content.schemas';
30
+ import { DemoModel } from './schemas/hub-demo-hive.schemas';
31
+ import { EventModel } from './schemas/hub-events.schemas';
32
+ import { CourseModel, DocModel, ThreadModel } from './schemas/hub-hackschool.schemas';
33
+ import { NewsModel } from './schemas/hub-newsroom.schemas';
34
+ import { PodcastModel } from './schemas/hub-podcasts.schemas';
35
+ import { MemberModel } from './schemas/hub-team.schemas';
36
+ import { BlipModel, RadarModel } from './schemas/hub-tech-radar.schemas';
37
37
  export declare class ModelService {
38
38
  private readonly connection;
39
39
  constructor(connection: Connection);
@@ -42,98 +42,98 @@ export declare class ModelService {
42
42
  _id: import("mongoose").Types.ObjectId;
43
43
  }, Schema<AccountModel, import("mongoose").Model<AccountModel, any, any, any, import("mongoose").Document<unknown, any, AccountModel> & AccountModel & {
44
44
  _id: import("mongoose").Types.ObjectId;
45
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, AccountModel, import("mongoose").Document<unknown, {}, AccountModel> & AccountModel & {
45
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, AccountModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<AccountModel>> & import("mongoose").FlatRecord<AccountModel> & {
46
46
  _id: import("mongoose").Types.ObjectId;
47
47
  }>>;
48
48
  commentModel: () => import("mongoose").Model<CommentModel, {}, {}, {}, import("mongoose").Document<unknown, {}, CommentModel> & CommentModel & {
49
49
  _id: import("mongoose").Types.ObjectId;
50
50
  }, Schema<CommentModel, import("mongoose").Model<CommentModel, any, any, any, import("mongoose").Document<unknown, any, CommentModel> & CommentModel & {
51
51
  _id: import("mongoose").Types.ObjectId;
52
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CommentModel, import("mongoose").Document<unknown, {}, CommentModel> & CommentModel & {
52
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CommentModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<CommentModel>> & import("mongoose").FlatRecord<CommentModel> & {
53
53
  _id: import("mongoose").Types.ObjectId;
54
54
  }>>;
55
55
  contentModel: () => import("mongoose").Model<ContentModel, {}, {}, {}, import("mongoose").Document<unknown, {}, ContentModel> & ContentModel & {
56
56
  _id: import("mongoose").Types.ObjectId;
57
57
  }, Schema<ContentModel, import("mongoose").Model<ContentModel, any, any, any, import("mongoose").Document<unknown, any, ContentModel> & ContentModel & {
58
58
  _id: import("mongoose").Types.ObjectId;
59
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ContentModel, import("mongoose").Document<unknown, {}, ContentModel> & ContentModel & {
59
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ContentModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ContentModel>> & import("mongoose").FlatRecord<ContentModel> & {
60
60
  _id: import("mongoose").Types.ObjectId;
61
61
  }>>;
62
62
  bookModel: () => import("mongoose").Model<BookModel, {}, {}, {}, import("mongoose").Document<unknown, {}, BookModel> & BookModel & {
63
63
  _id: import("mongoose").Types.ObjectId;
64
64
  }, Schema<BookModel, import("mongoose").Model<BookModel, any, any, any, import("mongoose").Document<unknown, any, BookModel> & BookModel & {
65
65
  _id: import("mongoose").Types.ObjectId;
66
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, BookModel, import("mongoose").Document<unknown, {}, BookModel> & BookModel & {
66
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, BookModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<BookModel>> & import("mongoose").FlatRecord<BookModel> & {
67
67
  _id: import("mongoose").Types.ObjectId;
68
68
  }>>;
69
69
  demoModel: () => import("mongoose").Model<DemoModel, {}, {}, {}, import("mongoose").Document<unknown, {}, DemoModel> & DemoModel & {
70
70
  _id: import("mongoose").Types.ObjectId;
71
71
  }, Schema<DemoModel, import("mongoose").Model<DemoModel, any, any, any, import("mongoose").Document<unknown, any, DemoModel> & DemoModel & {
72
72
  _id: import("mongoose").Types.ObjectId;
73
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DemoModel, import("mongoose").Document<unknown, {}, DemoModel> & DemoModel & {
73
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DemoModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<DemoModel>> & import("mongoose").FlatRecord<DemoModel> & {
74
74
  _id: import("mongoose").Types.ObjectId;
75
75
  }>>;
76
76
  eventModel: () => import("mongoose").Model<EventModel, {}, {}, {}, import("mongoose").Document<unknown, {}, EventModel> & EventModel & {
77
77
  _id: import("mongoose").Types.ObjectId;
78
78
  }, Schema<EventModel, import("mongoose").Model<EventModel, any, any, any, import("mongoose").Document<unknown, any, EventModel> & EventModel & {
79
79
  _id: import("mongoose").Types.ObjectId;
80
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, EventModel, import("mongoose").Document<unknown, {}, EventModel> & EventModel & {
80
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, EventModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<EventModel>> & import("mongoose").FlatRecord<EventModel> & {
81
81
  _id: import("mongoose").Types.ObjectId;
82
82
  }>>;
83
83
  courseModel: () => import("mongoose").Model<CourseModel, {}, {}, {}, import("mongoose").Document<unknown, {}, CourseModel> & CourseModel & {
84
84
  _id: import("mongoose").Types.ObjectId;
85
85
  }, Schema<CourseModel, import("mongoose").Model<CourseModel, any, any, any, import("mongoose").Document<unknown, any, CourseModel> & CourseModel & {
86
86
  _id: import("mongoose").Types.ObjectId;
87
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CourseModel, import("mongoose").Document<unknown, {}, CourseModel> & CourseModel & {
87
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CourseModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<CourseModel>> & import("mongoose").FlatRecord<CourseModel> & {
88
88
  _id: import("mongoose").Types.ObjectId;
89
89
  }>>;
90
90
  docModel: () => import("mongoose").Model<DocModel, {}, {}, {}, import("mongoose").Document<unknown, {}, DocModel> & DocModel & {
91
91
  _id: import("mongoose").Types.ObjectId;
92
92
  }, Schema<DocModel, import("mongoose").Model<DocModel, any, any, any, import("mongoose").Document<unknown, any, DocModel> & DocModel & {
93
93
  _id: import("mongoose").Types.ObjectId;
94
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DocModel, import("mongoose").Document<unknown, {}, DocModel> & DocModel & {
94
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DocModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<DocModel>> & import("mongoose").FlatRecord<DocModel> & {
95
95
  _id: import("mongoose").Types.ObjectId;
96
96
  }>>;
97
97
  threadModel: () => import("mongoose").Model<ThreadModel, {}, {}, {}, import("mongoose").Document<unknown, {}, ThreadModel> & ThreadModel & {
98
98
  _id: import("mongoose").Types.ObjectId;
99
99
  }, Schema<ThreadModel, import("mongoose").Model<ThreadModel, any, any, any, import("mongoose").Document<unknown, any, ThreadModel> & ThreadModel & {
100
100
  _id: import("mongoose").Types.ObjectId;
101
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ThreadModel, import("mongoose").Document<unknown, {}, ThreadModel> & ThreadModel & {
101
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ThreadModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ThreadModel>> & import("mongoose").FlatRecord<ThreadModel> & {
102
102
  _id: import("mongoose").Types.ObjectId;
103
103
  }>>;
104
104
  newsModel: () => import("mongoose").Model<NewsModel, {}, {}, {}, import("mongoose").Document<unknown, {}, NewsModel> & NewsModel & {
105
105
  _id: import("mongoose").Types.ObjectId;
106
106
  }, Schema<NewsModel, import("mongoose").Model<NewsModel, any, any, any, import("mongoose").Document<unknown, any, NewsModel> & NewsModel & {
107
107
  _id: import("mongoose").Types.ObjectId;
108
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, NewsModel, import("mongoose").Document<unknown, {}, NewsModel> & NewsModel & {
108
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, NewsModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<NewsModel>> & import("mongoose").FlatRecord<NewsModel> & {
109
109
  _id: import("mongoose").Types.ObjectId;
110
110
  }>>;
111
111
  podcastModel: () => import("mongoose").Model<PodcastModel, {}, {}, {}, import("mongoose").Document<unknown, {}, PodcastModel> & PodcastModel & {
112
112
  _id: import("mongoose").Types.ObjectId;
113
113
  }, Schema<PodcastModel, import("mongoose").Model<PodcastModel, any, any, any, import("mongoose").Document<unknown, any, PodcastModel> & PodcastModel & {
114
114
  _id: import("mongoose").Types.ObjectId;
115
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PodcastModel, import("mongoose").Document<unknown, {}, PodcastModel> & PodcastModel & {
115
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PodcastModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<PodcastModel>> & import("mongoose").FlatRecord<PodcastModel> & {
116
116
  _id: import("mongoose").Types.ObjectId;
117
117
  }>>;
118
118
  memberModel: () => import("mongoose").Model<MemberModel, {}, {}, {}, import("mongoose").Document<unknown, {}, MemberModel> & MemberModel & {
119
119
  _id: import("mongoose").Types.ObjectId;
120
120
  }, Schema<MemberModel, import("mongoose").Model<MemberModel, any, any, any, import("mongoose").Document<unknown, any, MemberModel> & MemberModel & {
121
121
  _id: import("mongoose").Types.ObjectId;
122
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, MemberModel, import("mongoose").Document<unknown, {}, MemberModel> & MemberModel & {
122
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, MemberModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<MemberModel>> & import("mongoose").FlatRecord<MemberModel> & {
123
123
  _id: import("mongoose").Types.ObjectId;
124
124
  }>>;
125
125
  blipModel: () => import("mongoose").Model<BlipModel, {}, {}, {}, import("mongoose").Document<unknown, {}, BlipModel> & BlipModel & {
126
126
  _id: import("mongoose").Types.ObjectId;
127
127
  }, Schema<BlipModel, import("mongoose").Model<BlipModel, any, any, any, import("mongoose").Document<unknown, any, BlipModel> & BlipModel & {
128
128
  _id: import("mongoose").Types.ObjectId;
129
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, BlipModel, import("mongoose").Document<unknown, {}, BlipModel> & BlipModel & {
129
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, BlipModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<BlipModel>> & import("mongoose").FlatRecord<BlipModel> & {
130
130
  _id: import("mongoose").Types.ObjectId;
131
131
  }>>;
132
132
  radarModel: () => import("mongoose").Model<RadarModel, {}, {}, {}, import("mongoose").Document<unknown, {}, RadarModel> & RadarModel & {
133
133
  _id: import("mongoose").Types.ObjectId;
134
134
  }, Schema<RadarModel, import("mongoose").Model<RadarModel, any, any, any, import("mongoose").Document<unknown, any, RadarModel> & RadarModel & {
135
135
  _id: import("mongoose").Types.ObjectId;
136
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, RadarModel, import("mongoose").Document<unknown, {}, RadarModel> & RadarModel & {
136
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, RadarModel, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<RadarModel>> & import("mongoose").FlatRecord<RadarModel> & {
137
137
  _id: import("mongoose").Types.ObjectId;
138
138
  }>>;
139
139
  }
@@ -16,17 +16,17 @@ exports.ModelService = void 0;
16
16
  const common_1 = require("@nestjs/common");
17
17
  const mongoose_1 = require("@nestjs/mongoose");
18
18
  const mongoose_2 = require("mongoose");
19
- const hub_account_schemas_1 = require("../model-schemas/hub-account.schemas");
20
- const hub_books_schemas_1 = require("../model-schemas/hub-books.schemas");
21
- const hub_comments_schemas_1 = require("../model-schemas/hub-comments.schemas");
22
- const hub_content_schemas_1 = require("../model-schemas/hub-content.schemas");
23
- const hub_demo_hive_schemas_1 = require("../model-schemas/hub-demo-hive.schemas");
24
- const hub_events_schemas_1 = require("../model-schemas/hub-events.schemas");
25
- const hub_hackschool_schemas_1 = require("../model-schemas/hub-hackschool.schemas");
26
- const hub_newsroom_schemas_1 = require("../model-schemas/hub-newsroom.schemas");
27
- const hub_podcasts_schemas_1 = require("../model-schemas/hub-podcasts.schemas");
28
- const hub_team_schemas_1 = require("../model-schemas/hub-team.schemas");
29
- const hub_tech_radar_schemas_1 = require("../model-schemas/hub-tech-radar.schemas");
19
+ const hub_account_schemas_1 = require("./schemas/hub-account.schemas");
20
+ const hub_books_schemas_1 = require("./schemas/hub-books.schemas");
21
+ const hub_comments_schemas_1 = require("./schemas/hub-comments.schemas");
22
+ const hub_content_schemas_1 = require("./schemas/hub-content.schemas");
23
+ const hub_demo_hive_schemas_1 = require("./schemas/hub-demo-hive.schemas");
24
+ const hub_events_schemas_1 = require("./schemas/hub-events.schemas");
25
+ const hub_hackschool_schemas_1 = require("./schemas/hub-hackschool.schemas");
26
+ const hub_newsroom_schemas_1 = require("./schemas/hub-newsroom.schemas");
27
+ const hub_podcasts_schemas_1 = require("./schemas/hub-podcasts.schemas");
28
+ const hub_team_schemas_1 = require("./schemas/hub-team.schemas");
29
+ const hub_tech_radar_schemas_1 = require("./schemas/hub-tech-radar.schemas");
30
30
  let ModelService = class ModelService {
31
31
  constructor(connection) {
32
32
  this.connection = connection;
@@ -35,7 +35,7 @@ declare class AccountModel extends Document {
35
35
  }
36
36
  declare const AccountSchema: import("mongoose").Schema<AccountModel, import("mongoose").Model<AccountModel, any, any, any, Document<unknown, any, AccountModel> & AccountModel & {
37
37
  _id: import("mongoose").Types.ObjectId;
38
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, AccountModel, Document<unknown, {}, AccountModel> & AccountModel & {
38
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, AccountModel, Document<unknown, {}, import("mongoose").FlatRecord<AccountModel>> & import("mongoose").FlatRecord<AccountModel> & {
39
39
  _id: import("mongoose").Types.ObjectId;
40
40
  }>;
41
41
  declare const AccountDB = "hub-account";
@@ -29,7 +29,7 @@ declare class BookModel extends Document {
29
29
  }
30
30
  declare const BookSchema: import("mongoose").Schema<BookModel, import("mongoose").Model<BookModel, any, any, any, Document<unknown, any, BookModel> & BookModel & {
31
31
  _id: import("mongoose").Types.ObjectId;
32
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, BookModel, Document<unknown, {}, BookModel> & BookModel & {
32
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, BookModel, Document<unknown, {}, import("mongoose").FlatRecord<BookModel>> & import("mongoose").FlatRecord<BookModel> & {
33
33
  _id: import("mongoose").Types.ObjectId;
34
34
  }>;
35
35
  declare const BooksDB = "hub-books";
@@ -36,7 +36,7 @@ declare class CommentModel extends Document {
36
36
  }
37
37
  declare const CommentSchema: import("mongoose").Schema<CommentModel, import("mongoose").Model<CommentModel, any, any, any, Document<unknown, any, CommentModel> & CommentModel & {
38
38
  _id: import("mongoose").Types.ObjectId;
39
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CommentModel, Document<unknown, {}, CommentModel> & CommentModel & {
39
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CommentModel, Document<unknown, {}, import("mongoose").FlatRecord<CommentModel>> & import("mongoose").FlatRecord<CommentModel> & {
40
40
  _id: import("mongoose").Types.ObjectId;
41
41
  }>;
42
42
  declare const CommentDB = "hub-comments";
@@ -32,7 +32,7 @@ declare class ContentModel extends Document {
32
32
  }
33
33
  declare const ContentSchema: import("mongoose").Schema<ContentModel, import("mongoose").Model<ContentModel, any, any, any, Document<unknown, any, ContentModel> & ContentModel & {
34
34
  _id: import("mongoose").Types.ObjectId;
35
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ContentModel, Document<unknown, {}, ContentModel> & ContentModel & {
35
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ContentModel, Document<unknown, {}, import("mongoose").FlatRecord<ContentModel>> & import("mongoose").FlatRecord<ContentModel> & {
36
36
  _id: import("mongoose").Types.ObjectId;
37
37
  }>;
38
38
  declare const ContentDB = "hub-content";
@@ -29,7 +29,7 @@ declare class DemoModel extends Document {
29
29
  }
30
30
  declare const DemoSchema: import("mongoose").Schema<DemoModel, import("mongoose").Model<DemoModel, any, any, any, Document<unknown, any, DemoModel> & DemoModel & {
31
31
  _id: import("mongoose").Types.ObjectId;
32
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DemoModel, Document<unknown, {}, DemoModel> & DemoModel & {
32
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DemoModel, Document<unknown, {}, import("mongoose").FlatRecord<DemoModel>> & import("mongoose").FlatRecord<DemoModel> & {
33
33
  _id: import("mongoose").Types.ObjectId;
34
34
  }>;
35
35
  declare const DemoHiveDB = "hub-demo-hive";
@@ -31,7 +31,7 @@ declare class EventModel extends Document {
31
31
  }
32
32
  declare const EventSchema: import("mongoose").Schema<EventModel, import("mongoose").Model<EventModel, any, any, any, Document<unknown, any, EventModel> & EventModel & {
33
33
  _id: import("mongoose").Types.ObjectId;
34
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, EventModel, Document<unknown, {}, EventModel> & EventModel & {
34
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, EventModel, Document<unknown, {}, import("mongoose").FlatRecord<EventModel>> & import("mongoose").FlatRecord<EventModel> & {
35
35
  _id: import("mongoose").Types.ObjectId;
36
36
  }>;
37
37
  declare const EventsDB = "hub-events";
@@ -29,7 +29,7 @@ declare class CourseModel extends Document {
29
29
  }
30
30
  declare const CourseSchema: import("mongoose").Schema<CourseModel, import("mongoose").Model<CourseModel, any, any, any, Document<unknown, any, CourseModel> & CourseModel & {
31
31
  _id: import("mongoose").Types.ObjectId;
32
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CourseModel, Document<unknown, {}, CourseModel> & CourseModel & {
32
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CourseModel, Document<unknown, {}, import("mongoose").FlatRecord<CourseModel>> & import("mongoose").FlatRecord<CourseModel> & {
33
33
  _id: import("mongoose").Types.ObjectId;
34
34
  }>;
35
35
  declare class DocModel extends Document {
@@ -38,7 +38,7 @@ declare class DocModel extends Document {
38
38
  }
39
39
  declare const DocSchema: import("mongoose").Schema<DocModel, import("mongoose").Model<DocModel, any, any, any, Document<unknown, any, DocModel> & DocModel & {
40
40
  _id: import("mongoose").Types.ObjectId;
41
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DocModel, Document<unknown, {}, DocModel> & DocModel & {
41
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DocModel, Document<unknown, {}, import("mongoose").FlatRecord<DocModel>> & import("mongoose").FlatRecord<DocModel> & {
42
42
  _id: import("mongoose").Types.ObjectId;
43
43
  }>;
44
44
  declare class ThreadModel extends Document {
@@ -47,7 +47,7 @@ declare class ThreadModel extends Document {
47
47
  }
48
48
  declare const ThreadSchema: import("mongoose").Schema<ThreadModel, import("mongoose").Model<ThreadModel, any, any, any, Document<unknown, any, ThreadModel> & ThreadModel & {
49
49
  _id: import("mongoose").Types.ObjectId;
50
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ThreadModel, Document<unknown, {}, ThreadModel> & ThreadModel & {
50
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ThreadModel, Document<unknown, {}, import("mongoose").FlatRecord<ThreadModel>> & import("mongoose").FlatRecord<ThreadModel> & {
51
51
  _id: import("mongoose").Types.ObjectId;
52
52
  }>;
53
53
  declare const HackschoolDB = "hub-hackschool";
@@ -31,7 +31,7 @@ declare class NewsModel extends Document {
31
31
  }
32
32
  declare const NewsSchema: import("mongoose").Schema<NewsModel, import("mongoose").Model<NewsModel, any, any, any, Document<unknown, any, NewsModel> & NewsModel & {
33
33
  _id: import("mongoose").Types.ObjectId;
34
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, NewsModel, Document<unknown, {}, NewsModel> & NewsModel & {
34
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, NewsModel, Document<unknown, {}, import("mongoose").FlatRecord<NewsModel>> & import("mongoose").FlatRecord<NewsModel> & {
35
35
  _id: import("mongoose").Types.ObjectId;
36
36
  }>;
37
37
  declare const NewsroomDB = "hub-newsroom";
@@ -29,7 +29,7 @@ declare class PodcastModel extends Document {
29
29
  }
30
30
  declare const PodcastSchema: import("mongoose").Schema<PodcastModel, import("mongoose").Model<PodcastModel, any, any, any, Document<unknown, any, PodcastModel> & PodcastModel & {
31
31
  _id: import("mongoose").Types.ObjectId;
32
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PodcastModel, Document<unknown, {}, PodcastModel> & PodcastModel & {
32
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PodcastModel, Document<unknown, {}, import("mongoose").FlatRecord<PodcastModel>> & import("mongoose").FlatRecord<PodcastModel> & {
33
33
  _id: import("mongoose").Types.ObjectId;
34
34
  }>;
35
35
  declare const PodcastsDB = "hub-podcasts";
@@ -29,7 +29,7 @@ declare class MemberModel extends Document {
29
29
  }
30
30
  declare const MemberSchema: import("mongoose").Schema<MemberModel, import("mongoose").Model<MemberModel, any, any, any, Document<unknown, any, MemberModel> & MemberModel & {
31
31
  _id: import("mongoose").Types.ObjectId;
32
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, MemberModel, Document<unknown, {}, MemberModel> & MemberModel & {
32
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, MemberModel, Document<unknown, {}, import("mongoose").FlatRecord<MemberModel>> & import("mongoose").FlatRecord<MemberModel> & {
33
33
  _id: import("mongoose").Types.ObjectId;
34
34
  }>;
35
35
  declare const TeamDB = "hub-team";
@@ -29,7 +29,7 @@ declare class BlipModel extends Document {
29
29
  }
30
30
  declare const BlipSchema: import("mongoose").Schema<BlipModel, import("mongoose").Model<BlipModel, any, any, any, Document<unknown, any, BlipModel> & BlipModel & {
31
31
  _id: import("mongoose").Types.ObjectId;
32
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, BlipModel, Document<unknown, {}, BlipModel> & BlipModel & {
32
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, BlipModel, Document<unknown, {}, import("mongoose").FlatRecord<BlipModel>> & import("mongoose").FlatRecord<BlipModel> & {
33
33
  _id: import("mongoose").Types.ObjectId;
34
34
  }>;
35
35
  declare class RadarModel extends Document {
@@ -39,7 +39,7 @@ declare class RadarModel extends Document {
39
39
  }
40
40
  declare const RadarSchema: import("mongoose").Schema<RadarModel, import("mongoose").Model<RadarModel, any, any, any, Document<unknown, any, RadarModel> & RadarModel & {
41
41
  _id: import("mongoose").Types.ObjectId;
42
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, RadarModel, Document<unknown, {}, RadarModel> & RadarModel & {
42
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, RadarModel, Document<unknown, {}, import("mongoose").FlatRecord<RadarModel>> & import("mongoose").FlatRecord<RadarModel> & {
43
43
  _id: import("mongoose").Types.ObjectId;
44
44
  }>;
45
45
  declare const TechRadarDB = "hub-tech-radar";
@@ -1,5 +1,5 @@
1
1
  import { PopulateOptions } from 'mongoose';
2
- import { ModelService } from '.';
2
+ import { ModelService } from '../model-service/model.service';
3
3
  export declare class PopulateService {
4
4
  private readonly modelService;
5
5
  constructor(modelService: ModelService);
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.PopulateService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
- const _1 = require(".");
14
+ const model_service_1 = require("../model-service/model.service");
15
15
  let PopulateService = class PopulateService {
16
16
  constructor(modelService) {
17
17
  this.modelService = modelService;
@@ -56,6 +56,6 @@ let PopulateService = class PopulateService {
56
56
  };
57
57
  PopulateService = __decorate([
58
58
  (0, common_1.Injectable)(),
59
- __metadata("design:paramtypes", [_1.ModelService])
59
+ __metadata("design:paramtypes", [model_service_1.ModelService])
60
60
  ], PopulateService);
61
61
  exports.PopulateService = PopulateService;
@@ -1,5 +1,5 @@
1
1
  import { PopulateOptions } from 'mongoose';
2
- import { ModelService } from './model.service';
2
+ import { ModelService } from '../model-service/model.service';
3
3
  export declare class ServiceMapperService {
4
4
  private readonly modelService;
5
5
  constructor(modelService: ModelService);
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ServiceMapperService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
- const model_service_1 = require("./model.service");
14
+ const model_service_1 = require("../model-service/model.service");
15
15
  let ServiceMapperService = class ServiceMapperService {
16
16
  constructor(modelService) {
17
17
  this.modelService = modelService;
@@ -0,0 +1,3 @@
1
+ export * from './authentication';
2
+ export * from './database';
3
+ export * from './services';
@@ -0,0 +1,19 @@
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("./authentication"), exports);
18
+ __exportStar(require("./database"), exports);
19
+ __exportStar(require("./services"), exports);
@@ -1,8 +1,8 @@
1
+ import { ConfigService } from '@nestjs/config';
1
2
  import { AccountInformation } from 'itlab-functions';
2
- import { ITLabModuleOptions } from '../itlab.interfaces';
3
3
  export declare class AccountService {
4
- private readonly options;
5
- constructor(options: ITLabModuleOptions);
4
+ private readonly configService;
5
+ constructor(configService: ConfigService);
6
6
  private axios;
7
7
  get(accountId: string): Promise<AccountInformation>;
8
8
  }
@@ -8,9 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
13
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -20,21 +17,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
20
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
21
18
  });
22
19
  };
23
- var __importDefault = (this && this.__importDefault) || function (mod) {
24
- return (mod && mod.__esModule) ? mod : { "default": mod };
25
- };
26
20
  Object.defineProperty(exports, "__esModule", { value: true });
27
21
  exports.AccountService = void 0;
28
22
  const common_1 = require("@nestjs/common");
29
- const axios_1 = __importDefault(require("axios"));
30
- const guards_1 = require("../guards");
31
- const itlab_module_definition_1 = require("../itlab.module-definition");
23
+ const config_1 = require("@nestjs/config");
24
+ const env_1 = require("../../../env");
25
+ const services_module_utils_1 = require("../services.module-utils");
32
26
  let AccountService = class AccountService {
33
- constructor(options) {
34
- this.options = options;
35
- this.axios = axios_1.default.create({
36
- baseURL: 'https://services.svi-itlab.com/account/internal/',
37
- headers: { [guards_1.INTERNAL_HEADER_KEY]: this.options.token },
27
+ constructor(configService) {
28
+ this.configService = configService;
29
+ this.axios = (0, services_module_utils_1.createAxios)({
30
+ baseUrl: 'https://services.svi-itlab.com/account/internal/',
31
+ k8sToken: this.configService.getOrThrow(env_1.ENV_K8S_TOKEN),
38
32
  });
39
33
  }
40
34
  get(accountId) {
@@ -49,7 +43,7 @@ let AccountService = class AccountService {
49
43
  }
50
44
  };
51
45
  AccountService = __decorate([
52
- __param(0, (0, common_1.Inject)(itlab_module_definition_1.ITLAB_MODULE_OPTIONS_TOKEN)),
53
- __metadata("design:paramtypes", [Object])
46
+ (0, common_1.Injectable)(),
47
+ __metadata("design:paramtypes", [config_1.ConfigService])
54
48
  ], AccountService);
55
49
  exports.AccountService = AccountService;
@@ -0,0 +1,5 @@
1
+ export declare class Comment {
2
+ authorId: string;
3
+ timestamp: number;
4
+ richtext: string;
5
+ }
@@ -0,0 +1,28 @@
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.Comment = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ class Comment {
15
+ }
16
+ __decorate([
17
+ (0, swagger_1.ApiProperty)(),
18
+ __metadata("design:type", String)
19
+ ], Comment.prototype, "authorId", void 0);
20
+ __decorate([
21
+ (0, swagger_1.ApiProperty)(),
22
+ __metadata("design:type", Number)
23
+ ], Comment.prototype, "timestamp", void 0);
24
+ __decorate([
25
+ (0, swagger_1.ApiProperty)(),
26
+ __metadata("design:type", String)
27
+ ], Comment.prototype, "richtext", void 0);
28
+ exports.Comment = Comment;
@@ -1,16 +1,12 @@
1
+ import { ConfigService } from '@nestjs/config';
1
2
  import { ContentRichtext } from 'itlab-functions';
2
- import { ITLabModuleOptions } from '../itlab.interfaces';
3
- import { Targets } from '../pipes/target.pipe';
4
- export declare class Comment {
5
- authorId: string;
6
- timestamp: number;
7
- richtext: string;
8
- }
3
+ import { Targets } from '../../../pipes';
4
+ import { Comment } from './comment-service.definitions';
9
5
  export declare class CommentService {
10
- private readonly options;
11
- constructor(options: ITLabModuleOptions);
12
- private axios;
6
+ private readonly configService;
13
7
  private logger;
8
+ constructor(configService: ConfigService);
9
+ private axios;
14
10
  post(targetId: string, authorId: string, comment: ContentRichtext, target: Targets): Promise<Comment>;
15
11
  delete(targetId: string, target: Targets): Promise<void>;
16
12
  }
@@ -8,9 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
13
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -20,39 +17,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
20
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
21
18
  });
22
19
  };
23
- var __importDefault = (this && this.__importDefault) || function (mod) {
24
- return (mod && mod.__esModule) ? mod : { "default": mod };
25
- };
20
+ var CommentService_1;
26
21
  Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.CommentService = exports.Comment = void 0;
22
+ exports.CommentService = void 0;
28
23
  const common_1 = require("@nestjs/common");
29
- const swagger_1 = require("@nestjs/swagger");
30
- const axios_1 = __importDefault(require("axios"));
31
- const guards_1 = require("../guards");
32
- const itlab_module_definition_1 = require("../itlab.module-definition");
33
- class Comment {
34
- }
35
- __decorate([
36
- (0, swagger_1.ApiProperty)(),
37
- __metadata("design:type", String)
38
- ], Comment.prototype, "authorId", void 0);
39
- __decorate([
40
- (0, swagger_1.ApiProperty)(),
41
- __metadata("design:type", Number)
42
- ], Comment.prototype, "timestamp", void 0);
43
- __decorate([
44
- (0, swagger_1.ApiProperty)(),
45
- __metadata("design:type", String)
46
- ], Comment.prototype, "richtext", void 0);
47
- exports.Comment = Comment;
48
- let CommentService = class CommentService {
49
- constructor(options) {
50
- this.options = options;
51
- this.axios = axios_1.default.create({
52
- baseURL: 'https://services.svi-itlab.com/comment/internal/',
53
- headers: { [guards_1.INTERNAL_HEADER_KEY]: this.options.token },
24
+ const config_1 = require("@nestjs/config");
25
+ const env_1 = require("../../../env");
26
+ const services_module_utils_1 = require("../services.module-utils");
27
+ let CommentService = CommentService_1 = class CommentService {
28
+ constructor(configService) {
29
+ this.configService = configService;
30
+ this.logger = new common_1.Logger(CommentService_1.name);
31
+ this.axios = (0, services_module_utils_1.createAxios)({
32
+ baseUrl: 'https://services.svi-itlab.com/comment/internal/',
33
+ k8sToken: this.configService.getOrThrow(env_1.ENV_K8S_TOKEN),
54
34
  });
55
- this.logger = new common_1.Logger(CommentService.name);
56
35
  }
57
36
  post(targetId, authorId, comment, target) {
58
37
  return __awaiter(this, void 0, void 0, function* () {
@@ -89,8 +68,8 @@ let CommentService = class CommentService {
89
68
  });
90
69
  }
91
70
  };
92
- CommentService = __decorate([
93
- __param(0, (0, common_1.Inject)(itlab_module_definition_1.ITLAB_MODULE_OPTIONS_TOKEN)),
94
- __metadata("design:paramtypes", [Object])
71
+ CommentService = CommentService_1 = __decorate([
72
+ (0, common_1.Injectable)(),
73
+ __metadata("design:paramtypes", [config_1.ConfigService])
95
74
  ], CommentService);
96
75
  exports.CommentService = CommentService;
@@ -1,11 +1,11 @@
1
+ import { ConfigService } from '@nestjs/config';
1
2
  import { Content } from 'itlab-functions';
2
- import { ITLabModuleOptions } from '../itlab.interfaces';
3
- import { Targets } from '../pipes/target.pipe';
3
+ import { Targets } from '../../../pipes';
4
4
  export declare class ContentService {
5
- private readonly options;
6
- constructor(options: ITLabModuleOptions);
7
- private axios;
5
+ private readonly configService;
8
6
  private logger;
7
+ constructor(configService: ConfigService);
8
+ private axios;
9
9
  verify(content: Content): Promise<void>;
10
10
  post(targetId: string, content: Content, target: Targets): Promise<string>;
11
11
  delete(targetId: string, target: Targets): Promise<void>;