itlab-internal-services 2.16.22 → 2.16.23

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.
@@ -9,7 +9,7 @@ export declare class EntityMap<T extends {
9
9
  * @param map Map of id -> user/account object
10
10
  * @returns user/account object
11
11
  */
12
- get(id: string): T;
12
+ get(id: string): T | undefined;
13
13
  /**
14
14
  * Maps an array of IDs to user/account objects using a user/account Map.
15
15
  * Filters out any IDs that don’t have a corresponding entity.
@@ -24,7 +24,8 @@ class EntityMap {
24
24
  getMultiple(ids) {
25
25
  if (!ids || ids.length === 0)
26
26
  return [];
27
- return ids.map((id) => this.map.get(id)).filter(Boolean);
27
+ const entities = ids.map((id) => this.map.get(id));
28
+ return entities.filter(Boolean);
28
29
  }
29
30
  }
30
31
  exports.EntityMap = EntityMap;
@@ -21,11 +21,11 @@ export declare enum HubResource {
21
21
  NEWSROOM_NEWS = "newsroom-news",
22
22
  EVENTS_EVENT = "events-event",
23
23
  HACKSCHOOL_COURSE = "hackschool-course",
24
- HACKSCHOOL_THREAD = "hackschool-thread",
25
24
  HACKSCHOOL_DOC = "hackschool-doc",
26
25
  DEMO_HIVE_DEMO = "demo-hive-demo",
27
26
  TECH_RADAR_BLIP = "tech-radar-blip",
28
27
  TECH_RADAR_EDITION = "tech-radar-edition",
28
+ TECH_RADAR_TECH_SCOUT = "tech-radar-tech-scout",
29
29
  PODCASTS_EPISODE = "podcasts-podcast",
30
30
  BOOKS_BOOK = "books-book",
31
31
  TEAM_MEMBER = "team-member",
@@ -25,11 +25,11 @@ var HubResource;
25
25
  HubResource["NEWSROOM_NEWS"] = "newsroom-news";
26
26
  HubResource["EVENTS_EVENT"] = "events-event";
27
27
  HubResource["HACKSCHOOL_COURSE"] = "hackschool-course";
28
- HubResource["HACKSCHOOL_THREAD"] = "hackschool-thread";
29
28
  HubResource["HACKSCHOOL_DOC"] = "hackschool-doc";
30
29
  HubResource["DEMO_HIVE_DEMO"] = "demo-hive-demo";
31
30
  HubResource["TECH_RADAR_BLIP"] = "tech-radar-blip";
32
31
  HubResource["TECH_RADAR_EDITION"] = "tech-radar-edition";
32
+ HubResource["TECH_RADAR_TECH_SCOUT"] = "tech-radar-tech-scout";
33
33
  HubResource["PODCASTS_EPISODE"] = "podcasts-podcast";
34
34
  HubResource["BOOKS_BOOK"] = "books-book";
35
35
  HubResource["TEAM_MEMBER"] = "team-member";
@@ -54,11 +54,11 @@ exports.HUB_RESOURCES = [
54
54
  HubResource.NEWSROOM_NEWS,
55
55
  HubResource.EVENTS_EVENT,
56
56
  HubResource.HACKSCHOOL_COURSE,
57
- HubResource.HACKSCHOOL_THREAD,
58
57
  HubResource.HACKSCHOOL_DOC,
59
58
  HubResource.DEMO_HIVE_DEMO,
60
59
  HubResource.TECH_RADAR_BLIP,
61
60
  HubResource.TECH_RADAR_EDITION,
61
+ HubResource.TECH_RADAR_TECH_SCOUT,
62
62
  HubResource.PODCASTS_EPISODE,
63
63
  HubResource.BOOKS_BOOK,
64
64
  HubResource.TEAM_MEMBER,
@@ -1,10 +1,9 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
- import { LabHackschoolCourse, LabHackschoolDoc, LabHackschoolThread } from 'itlab-functions';
2
+ import { LabHackschoolCourse, LabHackschoolDoc } from 'itlab-functions';
3
3
  import { AuthenticationModuleOptions } from '../../../authentication';
4
4
  import { BaseHttpService } from '../../base-http.service';
5
5
  import { FetchCourseOptionsDtoV1 } from './fetch-course-options.dto.v1.type';
6
6
  import { FetchDocOptionsDtoV1 } from './fetch-doc-options.dto.v1.type';
7
- import { FetchThreadOptionsDtoV1 } from './fetch-thread-options.dto.v1.type';
8
7
  /**
9
8
  * HackschoolService
10
9
  *
@@ -48,27 +47,6 @@ export declare class HackschoolService extends BaseHttpService {
48
47
  * @returns {Promise<LabHackschoolCourse[]>} Resolves to a list of courses, or an empty array if none found.
49
48
  */
50
49
  fetchCourseCollectionV1(options?: FetchCourseOptionsDtoV1): Promise<LabHackschoolCourse[]>;
51
- /**
52
- * Retrieves a single thread entry by its MongoDB identifier.
53
- *
54
- * This method gracefully handles downstream failures by logging
55
- * and returning `undefined` instead of throwing.
56
- *
57
- * @param {string} threadId - Unique MongoDB identifier of the thread.
58
- * @param {FetchThreadOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
59
- * @returns {Promise<LabHackschoolThread | undefined>} Resolves to an Thread or `undefined` on failure.
60
- */
61
- fetchThreadV1(threadId: string, options?: FetchThreadOptionsDtoV1): Promise<LabHackschoolThread | undefined>;
62
- /**
63
- * Retrieves a collection of thread entries.
64
- *
65
- * Useful for batch lookups or paginated listings.
66
- * Returns an empty array if the downstream service call fails.
67
- *
68
- * @param {FetchThreadOptionsDtoV1} [options] - Optional filter options for narrowing results.
69
- * @returns {Promise<LabHackschoolThread[]>} Resolves to a list of threads, or an empty array if none found.
70
- */
71
- fetchThreadCollectionV1(options?: FetchThreadOptionsDtoV1): Promise<LabHackschoolThread[]>;
72
50
  /**
73
51
  * Retrieves a single doc entry by its MongoDB identifier.
74
52
  *
@@ -71,34 +71,6 @@ let HackschoolService = class HackschoolService extends base_http_service_1.Base
71
71
  return this.fetchResourceCollection(`v1/internal/courses`, { params: options });
72
72
  }
73
73
  // ─────────────────────────────────────────────────────────────
74
- // Thread Resource Methods
75
- // ─────────────────────────────────────────────────────────────
76
- /**
77
- * Retrieves a single thread entry by its MongoDB identifier.
78
- *
79
- * This method gracefully handles downstream failures by logging
80
- * and returning `undefined` instead of throwing.
81
- *
82
- * @param {string} threadId - Unique MongoDB identifier of the thread.
83
- * @param {FetchThreadOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
84
- * @returns {Promise<LabHackschoolThread | undefined>} Resolves to an Thread or `undefined` on failure.
85
- */
86
- async fetchThreadV1(threadId, options) {
87
- return this.fetchResource(`v1/internal/thread/${threadId}`, { params: options });
88
- }
89
- /**
90
- * Retrieves a collection of thread entries.
91
- *
92
- * Useful for batch lookups or paginated listings.
93
- * Returns an empty array if the downstream service call fails.
94
- *
95
- * @param {FetchThreadOptionsDtoV1} [options] - Optional filter options for narrowing results.
96
- * @returns {Promise<LabHackschoolThread[]>} Resolves to a list of threads, or an empty array if none found.
97
- */
98
- async fetchThreadCollectionV1(options) {
99
- return this.fetchResourceCollection(`v1/internal/threads`, { params: options });
100
- }
101
- // ─────────────────────────────────────────────────────────────
102
74
  // Doc Resource Methods
103
75
  // ─────────────────────────────────────────────────────────────
104
76
  /**
@@ -1,2 +1,3 @@
1
+ export * from './fetch-course-options.dto.v1.type';
1
2
  export * from './fetch-doc-options.dto.v1.type';
2
3
  export * from './hackschool.service';
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./fetch-course-options.dto.v1.type"), exports);
17
18
  __exportStar(require("./fetch-doc-options.dto.v1.type"), exports);
18
19
  __exportStar(require("./hackschool.service"), exports);
@@ -0,0 +1,22 @@
1
+ import { BaseFetchOptions, DraftedFetchOptions, TimestampsFetchOptions } from '../../../../classes';
2
+ /**
3
+ * FetchTechScoutOptionsDtoV1
4
+ *
5
+ * Data Transfer Object for querying tech scout collections.
6
+ * Inherits timestamp filtering fields and extends them with
7
+ * tech-scout-specific query parameters.
8
+ */
9
+ export type FetchTechScoutOptionsDtoV1 = BaseFetchOptions & TimestampsFetchOptions & DraftedFetchOptions & {
10
+ includeAccount?: boolean;
11
+ includeEditionIds?: boolean;
12
+ includeEditions?: boolean;
13
+ includeBlipIds?: boolean;
14
+ includeBlips?: boolean;
15
+ isActive?: boolean;
16
+ accountId?: string;
17
+ accountIds?: string[];
18
+ department?: string;
19
+ departments?: string[];
20
+ role?: string;
21
+ roles?: string[];
22
+ };
@@ -1,3 +1,4 @@
1
1
  export * from './fetch-blip-options.dto.v1.type';
2
- export * from './fetch-edition-options.dto.v1.type copy';
2
+ export * from './fetch-edition-options.dto.v1.type';
3
+ export * from './fetch-tech-scout-options.dto.v1.type';
3
4
  export * from './tech-radar.service';
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./fetch-blip-options.dto.v1.type"), exports);
18
- __exportStar(require("./fetch-edition-options.dto.v1.type copy"), exports);
18
+ __exportStar(require("./fetch-edition-options.dto.v1.type"), exports);
19
+ __exportStar(require("./fetch-tech-scout-options.dto.v1.type"), exports);
19
20
  __exportStar(require("./tech-radar.service"), exports);
@@ -1,9 +1,10 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
- import { LabTechRadarBlip, LabTechRadarEdition } from 'itlab-functions';
2
+ import { LabTechRadarBlip, LabTechRadarEdition, LabTechRadarTechScout } from 'itlab-functions';
3
3
  import { AuthenticationModuleOptions } from '../../../authentication';
4
4
  import { BaseHttpService } from '../../base-http.service';
5
5
  import { FetchBlipOptionsDtoV1 } from './fetch-blip-options.dto.v1.type';
6
- import { FetchEditionOptionsDtoV1 } from './fetch-edition-options.dto.v1.type copy';
6
+ import { FetchEditionOptionsDtoV1 } from './fetch-edition-options.dto.v1.type';
7
+ import { FetchTechScoutOptionsDtoV1 } from './fetch-tech-scout-options.dto.v1.type';
7
8
  /**
8
9
  * TechRadarService
9
10
  *
@@ -68,4 +69,25 @@ export declare class TechRadarService extends BaseHttpService {
68
69
  * @returns {Promise<LabTechRadarEdition[]>} Resolves to a list of editions, or an empty array if none found.
69
70
  */
70
71
  fetchEditionCollectionV1(options?: FetchEditionOptionsDtoV1): Promise<LabTechRadarEdition[]>;
72
+ /**
73
+ * Retrieves a single tech scout entry by its MongoDB identifier.
74
+ *
75
+ * This method gracefully handles downstream failures by logging
76
+ * and returning `undefined` instead of throwing.
77
+ *
78
+ * @param {string} techScoutId - Unique MongoDB identifier of the tech scout.
79
+ * @param {FetchTechScoutOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
80
+ * @returns {Promise<LabTechRadarTechScout | undefined>} Resolves to an Tech Scout or `undefined` on failure.
81
+ */
82
+ fetchTechScoutV1(techScoutId: string, options?: FetchTechScoutOptionsDtoV1): Promise<LabTechRadarTechScout | undefined>;
83
+ /**
84
+ * Retrieves a collection of tech scout entries.
85
+ *
86
+ * Useful for batch lookups or paginated listings.
87
+ * Returns an empty array if the downstream service call fails.
88
+ *
89
+ * @param {FetchTechScoutOptionsDtoV1} [options] - Optional filter options for narrowing results.
90
+ * @returns {Promise<LabTechRadarTechScout[]>} Resolves to a list of tech scouts, or an empty array if none found.
91
+ */
92
+ fetchTechScoutCollectionV1(options?: FetchTechScoutOptionsDtoV1): Promise<LabTechRadarTechScout[]>;
71
93
  }
@@ -98,6 +98,34 @@ let TechRadarService = class TechRadarService extends base_http_service_1.BaseHt
98
98
  async fetchEditionCollectionV1(options) {
99
99
  return this.fetchResourceCollection(`v1/internal/editions`, { params: options });
100
100
  }
101
+ // ─────────────────────────────────────────────────────────────
102
+ // Tech Scout Resource Methods
103
+ // ─────────────────────────────────────────────────────────────
104
+ /**
105
+ * Retrieves a single tech scout entry by its MongoDB identifier.
106
+ *
107
+ * This method gracefully handles downstream failures by logging
108
+ * and returning `undefined` instead of throwing.
109
+ *
110
+ * @param {string} techScoutId - Unique MongoDB identifier of the tech scout.
111
+ * @param {FetchTechScoutOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
112
+ * @returns {Promise<LabTechRadarTechScout | undefined>} Resolves to an Tech Scout or `undefined` on failure.
113
+ */
114
+ async fetchTechScoutV1(techScoutId, options) {
115
+ return this.fetchResource(`v1/internal/tech-scout/${techScoutId}`, { params: options });
116
+ }
117
+ /**
118
+ * Retrieves a collection of tech scout entries.
119
+ *
120
+ * Useful for batch lookups or paginated listings.
121
+ * Returns an empty array if the downstream service call fails.
122
+ *
123
+ * @param {FetchTechScoutOptionsDtoV1} [options] - Optional filter options for narrowing results.
124
+ * @returns {Promise<LabTechRadarTechScout[]>} Resolves to a list of tech scouts, or an empty array if none found.
125
+ */
126
+ async fetchTechScoutCollectionV1(options) {
127
+ return this.fetchResourceCollection(`v1/internal/tech-scouts`, { params: options });
128
+ }
101
129
  };
102
130
  exports.TechRadarService = TechRadarService;
103
131
  exports.TechRadarService = TechRadarService = __decorate([
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Timo Scheuermann",
5
5
  "email": "timo.scheuermann@sv-informatik.de"
6
6
  },
7
- "version": "2.16.22",
7
+ "version": "2.16.23",
8
8
  "type": "commonjs",
9
9
  "files": [
10
10
  "dist"
@@ -35,7 +35,7 @@
35
35
  "cache-manager": "^7.2.4",
36
36
  "class-transformer": "^0.5.1",
37
37
  "class-validator": "^0.14.2",
38
- "itlab-functions": "^1.0.10",
38
+ "itlab-functions": "^1.0.13",
39
39
  "mongoose": "^8.19.2",
40
40
  "rxjs": "^7.8.2"
41
41
  },
@@ -1,18 +0,0 @@
1
- import { BaseFetchOptions, CommentsFetchOptions, ContentFetchOptions, ViewedByFetchOptions } from '../../../../classes';
2
- /**
3
- * FetchThreadOptionsDtoV1
4
- *
5
- * Data Transfer Object for querying thread collections.
6
- * Inherits timestamp filtering fields and extends them with
7
- * thread-specific query parameters.
8
- */
9
- export type FetchThreadOptionsDtoV1 = BaseFetchOptions & ContentFetchOptions & ViewedByFetchOptions & CommentsFetchOptions & {
10
- includeAuthor?: boolean;
11
- isClosed?: boolean;
12
- tag?: string;
13
- tags?: string[];
14
- authorId?: string;
15
- authorIds?: string[];
16
- timestampMin?: number;
17
- timestampMax?: number;
18
- };