@forklaunch/implementation-iam-base 0.7.4 → 0.8.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.
@@ -264,7 +264,11 @@ export class BasePermissionService<
264
264
  this.openTelemetryCollector.info('Getting batch permissions', idsDto);
265
265
  }
266
266
  return Promise.all(
267
- (await (em ?? this.em).find('Permission', idsDto)).map((permission) =>
267
+ (
268
+ await (em ?? this.em).find('Permission', {
269
+ id: { $in: idsDto.ids }
270
+ })
271
+ ).map((permission) =>
268
272
  this.mappers.PermissionMapper.toDto(
269
273
  permission as MapperEntities['PermissionMapper']
270
274
  )
@@ -152,9 +152,13 @@ export class BaseUserService<
152
152
 
153
153
  return Promise.all(
154
154
  (
155
- await (em ?? this.em).find('User', idsDto, {
156
- populate: ['id', '*']
157
- })
155
+ await (em ?? this.em).find(
156
+ 'User',
157
+ { id: { $in: idsDto.ids } },
158
+ {
159
+ populate: ['id', '*']
160
+ }
161
+ )
158
162
  ).map((user) =>
159
163
  this.mappers.UserMapper.toDto(user as MapperEntities['UserMapper'])
160
164
  )
@@ -226,7 +230,7 @@ export class BaseUserService<
226
230
  if (this.evaluatedTelemetryOptions.logging) {
227
231
  this.openTelemetryCollector.info('Deleting batch users', idsDto);
228
232
  }
229
- await (em ?? this.em).nativeDelete('User', idsDto);
233
+ await (em ?? this.em).nativeDelete('User', { id: { $in: idsDto.ids } });
230
234
  }
231
235
 
232
236
  async surfaceRoles(
@@ -282,7 +282,9 @@ var BasePermissionService = class {
282
282
  this.openTelemetryCollector.info("Getting batch permissions", idsDto);
283
283
  }
284
284
  return Promise.all(
285
- (await (em ?? this.em).find("Permission", idsDto)).map(
285
+ (await (em ?? this.em).find("Permission", {
286
+ id: { $in: idsDto.ids }
287
+ })).map(
286
288
  (permission) => this.mappers.PermissionMapper.toDto(
287
289
  permission
288
290
  )
@@ -589,9 +591,13 @@ var BaseUserService = class {
589
591
  this.openTelemetryCollector.info("Getting batch users", idsDto);
590
592
  }
591
593
  return Promise.all(
592
- (await (em ?? this.em).find("User", idsDto, {
593
- populate: ["id", "*"]
594
- })).map(
594
+ (await (em ?? this.em).find(
595
+ "User",
596
+ { id: { $in: idsDto.ids } },
597
+ {
598
+ populate: ["id", "*"]
599
+ }
600
+ )).map(
595
601
  (user) => this.mappers.UserMapper.toDto(user)
596
602
  )
597
603
  );
@@ -644,7 +650,7 @@ var BaseUserService = class {
644
650
  if (this.evaluatedTelemetryOptions.logging) {
645
651
  this.openTelemetryCollector.info("Deleting batch users", idsDto);
646
652
  }
647
- await (em ?? this.em).nativeDelete("User", idsDto);
653
+ await (em ?? this.em).nativeDelete("User", { id: { $in: idsDto.ids } });
648
654
  }
649
655
  async surfaceRoles(idDto, em) {
650
656
  if (this.evaluatedTelemetryOptions.logging) {
@@ -256,7 +256,9 @@ var BasePermissionService = class {
256
256
  this.openTelemetryCollector.info("Getting batch permissions", idsDto);
257
257
  }
258
258
  return Promise.all(
259
- (await (em ?? this.em).find("Permission", idsDto)).map(
259
+ (await (em ?? this.em).find("Permission", {
260
+ id: { $in: idsDto.ids }
261
+ })).map(
260
262
  (permission) => this.mappers.PermissionMapper.toDto(
261
263
  permission
262
264
  )
@@ -567,9 +569,13 @@ var BaseUserService = class {
567
569
  this.openTelemetryCollector.info("Getting batch users", idsDto);
568
570
  }
569
571
  return Promise.all(
570
- (await (em ?? this.em).find("User", idsDto, {
571
- populate: ["id", "*"]
572
- })).map(
572
+ (await (em ?? this.em).find(
573
+ "User",
574
+ { id: { $in: idsDto.ids } },
575
+ {
576
+ populate: ["id", "*"]
577
+ }
578
+ )).map(
573
579
  (user) => this.mappers.UserMapper.toDto(user)
574
580
  )
575
581
  );
@@ -622,7 +628,7 @@ var BaseUserService = class {
622
628
  if (this.evaluatedTelemetryOptions.logging) {
623
629
  this.openTelemetryCollector.info("Deleting batch users", idsDto);
624
630
  }
625
- await (em ?? this.em).nativeDelete("User", idsDto);
631
+ await (em ?? this.em).nativeDelete("User", { id: { $in: idsDto.ids } });
626
632
  }
627
633
  async surfaceRoles(idDto, em) {
628
634
  if (this.evaluatedTelemetryOptions.logging) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/implementation-iam-base",
3
- "version": "0.7.4",
3
+ "version": "0.8.1",
4
4
  "description": "Billing basic implementation for forklaunch",
5
5
  "homepage": "https://github.com/forklaunch/forklaunch-js#readme",
6
6
  "bugs": {
@@ -36,18 +36,18 @@
36
36
  "lib/**"
37
37
  ],
38
38
  "dependencies": {
39
- "@forklaunch/common": "^0.6.14",
40
- "@forklaunch/core": "^0.15.3",
41
- "@forklaunch/internal": "^0.3.14",
42
- "@forklaunch/validator": "^0.10.14",
43
- "@mikro-orm/core": "^6.5.6",
39
+ "@forklaunch/common": "^0.6.18",
40
+ "@forklaunch/core": "^0.15.7",
41
+ "@forklaunch/internal": "^0.3.18",
42
+ "@forklaunch/validator": "^0.10.18",
43
+ "@mikro-orm/core": "^6.5.7",
44
44
  "@sinclair/typebox": "^0.34.41",
45
45
  "ajv": "^8.17.1",
46
- "zod": "^4.1.11",
47
- "@forklaunch/interfaces-iam": "0.7.3"
46
+ "zod": "^4.1.12",
47
+ "@forklaunch/interfaces-iam": "0.8.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@typescript/native-preview": "7.0.0-dev.20250930.1",
50
+ "@typescript/native-preview": "7.0.0-dev.20251008.1",
51
51
  "depcheck": "^1.4.7",
52
52
  "prettier": "^3.6.2",
53
53
  "typedoc": "^0.28.13"