@servicelabsco/nestjs-utility-services 2.0.13 → 2.0.15

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 (141) hide show
  1. package/AGENTS.md +189 -0
  2. package/CODEBASE-LINEAR-VALIDATION-2026-06-03.md +104 -0
  3. package/CODEBASE-REVIEW-2026-06-03.md +102 -0
  4. package/dist/app.controller.d.ts +1 -0
  5. package/dist/app.controller.js +34 -0
  6. package/dist/app.controller.js.map +1 -1
  7. package/dist/auth/services/auth.service.js +1 -1
  8. package/dist/auth/services/auth.service.js.map +1 -1
  9. package/dist/auth/services/device.token.service.js +1 -1
  10. package/dist/auth/services/device.token.service.js.map +1 -1
  11. package/dist/auth/services/social.service.js +1 -1
  12. package/dist/auth/services/social.service.js.map +1 -1
  13. package/dist/common/dtos/capture.record.index.dto.d.ts +1 -1
  14. package/dist/common/dtos/capture.record.index.dto.js.map +1 -1
  15. package/dist/common/libraries/common.mapper.job.d.ts +1 -1
  16. package/dist/common/libraries/common.mapper.job.js.map +1 -1
  17. package/dist/common/libraries/common.subscriber.d.ts +1 -1
  18. package/dist/common/libraries/common.subscriber.js +2 -2
  19. package/dist/common/libraries/common.subscriber.js.map +1 -1
  20. package/dist/common/libraries/platform.utility.js +3 -3
  21. package/dist/common/libraries/platform.utility.js.map +1 -1
  22. package/dist/common/libraries/report.data.manager.d.ts +1 -1
  23. package/dist/common/libraries/report.data.manager.js +1 -1
  24. package/dist/common/libraries/report.data.manager.js.map +1 -1
  25. package/dist/common/libraries/seeder.utility.js +0 -1
  26. package/dist/common/libraries/seeder.utility.js.map +1 -1
  27. package/dist/platformUtility/consumers/job.consumer.d.ts +1 -1
  28. package/dist/platformUtility/consumers/job.consumer.js +2 -2
  29. package/dist/platformUtility/consumers/job.consumer.js.map +1 -1
  30. package/dist/platformUtility/dtos/mail.options.dto.d.ts +1 -0
  31. package/dist/platformUtility/dtos/mail.options.dto.js +5 -0
  32. package/dist/platformUtility/dtos/mail.options.dto.js.map +1 -1
  33. package/dist/platformUtility/es6.classes.d.ts +6 -3
  34. package/dist/platformUtility/es6.classes.js +8 -0
  35. package/dist/platformUtility/es6.classes.js.map +1 -1
  36. package/dist/platformUtility/interfaces/emithook.email.attachment.interface.d.ts +10 -0
  37. package/dist/platformUtility/interfaces/emithook.email.attachment.interface.js +3 -0
  38. package/dist/platformUtility/interfaces/emithook.email.attachment.interface.js.map +1 -0
  39. package/dist/platformUtility/interfaces/emithook.email.list.options.interface.d.ts +7 -0
  40. package/dist/platformUtility/interfaces/emithook.email.list.options.interface.js +3 -0
  41. package/dist/platformUtility/interfaces/emithook.email.list.options.interface.js.map +1 -0
  42. package/dist/platformUtility/interfaces/emithook.email.message.interface.d.ts +20 -0
  43. package/dist/platformUtility/interfaces/emithook.email.message.interface.js +3 -0
  44. package/dist/platformUtility/interfaces/emithook.email.message.interface.js.map +1 -0
  45. package/dist/platformUtility/interfaces/emithook.email.send.options.interface.d.ts +12 -0
  46. package/dist/platformUtility/interfaces/emithook.email.send.options.interface.js +3 -0
  47. package/dist/platformUtility/interfaces/emithook.email.send.options.interface.js.map +1 -0
  48. package/dist/platformUtility/interfaces/emithook.email.send.result.interface.d.ts +3 -0
  49. package/dist/platformUtility/interfaces/emithook.email.send.result.interface.js +3 -0
  50. package/dist/platformUtility/interfaces/emithook.email.send.result.interface.js.map +1 -0
  51. package/dist/platformUtility/interfaces/emithook.suppression.interface.d.ts +6 -0
  52. package/dist/platformUtility/interfaces/emithook.suppression.interface.js +3 -0
  53. package/dist/platformUtility/interfaces/emithook.suppression.interface.js.map +1 -0
  54. package/dist/platformUtility/interfaces/html.pdf.convert.pdf.interface.d.ts +7 -0
  55. package/dist/platformUtility/interfaces/html.pdf.convert.pdf.interface.js +3 -0
  56. package/dist/platformUtility/interfaces/html.pdf.convert.pdf.interface.js.map +1 -0
  57. package/dist/platformUtility/interfaces/html.pdf.convert.request.interface.d.ts +9 -0
  58. package/dist/platformUtility/interfaces/html.pdf.convert.request.interface.js +3 -0
  59. package/dist/platformUtility/interfaces/html.pdf.convert.request.interface.js.map +1 -0
  60. package/dist/platformUtility/interfaces/html.pdf.convert.source.interface.d.ts +6 -0
  61. package/dist/platformUtility/interfaces/html.pdf.convert.source.interface.js +3 -0
  62. package/dist/platformUtility/interfaces/html.pdf.convert.source.interface.js.map +1 -0
  63. package/dist/platformUtility/interfaces/html.pdf.convert.success.interface.d.ts +8 -0
  64. package/dist/platformUtility/interfaces/html.pdf.convert.success.interface.js +3 -0
  65. package/dist/platformUtility/interfaces/html.pdf.convert.success.interface.js.map +1 -0
  66. package/dist/platformUtility/interfaces/html.pdf.margin.interface.d.ts +6 -0
  67. package/dist/platformUtility/interfaces/html.pdf.margin.interface.js +3 -0
  68. package/dist/platformUtility/interfaces/html.pdf.margin.interface.js.map +1 -0
  69. package/dist/platformUtility/interfaces/html.pdf.options.interface.d.ts +13 -0
  70. package/dist/platformUtility/interfaces/html.pdf.options.interface.js +3 -0
  71. package/dist/platformUtility/interfaces/html.pdf.options.interface.js.map +1 -0
  72. package/dist/platformUtility/interfaces/html.pdf.paper.format.interface.d.ts +1 -0
  73. package/dist/platformUtility/interfaces/html.pdf.paper.format.interface.js +3 -0
  74. package/dist/platformUtility/interfaces/html.pdf.paper.format.interface.js.map +1 -0
  75. package/dist/platformUtility/interfaces/index.d.ts +13 -0
  76. package/dist/platformUtility/interfaces/index.js +13 -0
  77. package/dist/platformUtility/interfaces/index.js.map +1 -1
  78. package/dist/platformUtility/jobs/process.ses.delivery.webhook.job.js.map +1 -1
  79. package/dist/platformUtility/jobs/process.tracking.webhook.job.js.map +1 -1
  80. package/dist/platformUtility/jobs/test.job.d.ts +1 -1
  81. package/dist/platformUtility/jobs/test.job.js +1 -1
  82. package/dist/platformUtility/jobs/test.job.js.map +1 -1
  83. package/dist/platformUtility/libraries/index.d.ts +2 -0
  84. package/dist/platformUtility/libraries/index.js +2 -0
  85. package/dist/platformUtility/libraries/index.js.map +1 -1
  86. package/dist/platformUtility/libraries/process.common.emithook.mail.d.ts +13 -0
  87. package/dist/platformUtility/libraries/process.common.emithook.mail.js +42 -0
  88. package/dist/platformUtility/libraries/process.common.emithook.mail.js.map +1 -0
  89. package/dist/platformUtility/libraries/process.common.ses.mail.js.map +1 -1
  90. package/dist/platformUtility/libraries/process.emithook.mail.d.ts +26 -0
  91. package/dist/platformUtility/libraries/process.emithook.mail.js +104 -0
  92. package/dist/platformUtility/libraries/process.emithook.mail.js.map +1 -0
  93. package/dist/platformUtility/libraries/process.ses.mail.js.map +1 -1
  94. package/dist/platformUtility/services/cache.service.js +2 -2
  95. package/dist/platformUtility/services/cache.service.js.map +1 -1
  96. package/dist/platformUtility/services/emithook.mail.service.d.ts +27 -0
  97. package/dist/platformUtility/services/emithook.mail.service.js +137 -0
  98. package/dist/platformUtility/services/emithook.mail.service.js.map +1 -0
  99. package/dist/platformUtility/services/es6.service.d.ts +5 -1
  100. package/dist/platformUtility/services/es6.service.js +9 -1
  101. package/dist/platformUtility/services/es6.service.js.map +1 -1
  102. package/dist/platformUtility/services/index.d.ts +2 -0
  103. package/dist/platformUtility/services/index.js +2 -0
  104. package/dist/platformUtility/services/index.js.map +1 -1
  105. package/dist/platformUtility/services/mail.service.d.ts +3 -1
  106. package/dist/platformUtility/services/mail.service.js +8 -2
  107. package/dist/platformUtility/services/mail.service.js.map +1 -1
  108. package/dist/platformUtility/services/pdf.service.d.ts +28 -0
  109. package/dist/platformUtility/services/pdf.service.js +143 -0
  110. package/dist/platformUtility/services/pdf.service.js.map +1 -0
  111. package/dist/platformUtility/services/remote.request.service.js +1 -1
  112. package/dist/platformUtility/services/remote.request.service.js.map +1 -1
  113. package/dist/platformUtility/services/ses.mail.notification.service.js.map +1 -1
  114. package/dist/system/controllers/user.preference.controller.js +0 -1
  115. package/dist/system/controllers/user.preference.controller.js.map +1 -1
  116. package/dist/system/jobs/column.mapper.job.js.map +1 -1
  117. package/dist/system/jobs/mail.validation.job.d.ts +1 -1
  118. package/dist/system/jobs/mail.validation.job.js +1 -1
  119. package/dist/system/jobs/mail.validation.job.js.map +1 -1
  120. package/dist/system/jobs/mobile.validation.job.d.ts +1 -1
  121. package/dist/system/jobs/mobile.validation.job.js +1 -1
  122. package/dist/system/jobs/mobile.validation.job.js.map +1 -1
  123. package/dist/system/jobs/relationship.mapper.job.js.map +1 -1
  124. package/dist/system/jobs/sms.message.job.d.ts +1 -1
  125. package/dist/system/jobs/sms.message.job.js +1 -1
  126. package/dist/system/jobs/sms.message.job.js.map +1 -1
  127. package/dist/system/jobs/sync.all.code.job.js +2 -2
  128. package/dist/system/jobs/sync.all.code.job.js.map +1 -1
  129. package/dist/system/jobs/test.mongo.job.js.map +1 -1
  130. package/dist/system/jobs/user.group.member.job.js +0 -1
  131. package/dist/system/jobs/user.group.member.job.js.map +1 -1
  132. package/dist/system/libraries/code.evaluator.js.map +1 -1
  133. package/dist/system/libraries/execute.code.fix.js.map +1 -1
  134. package/dist/system/libraries/get.report.query.js +9 -0
  135. package/dist/system/libraries/get.report.query.js.map +1 -1
  136. package/dist/system/libraries/process.script.execution.js.map +1 -1
  137. package/dist/system/services/event.queue.service.js +2 -2
  138. package/dist/system/services/event.queue.service.js.map +1 -1
  139. package/dist/system/subscribers/code.fix.log.subscriber.js.map +1 -1
  140. package/dist/system/subscribers/mobile.validation.subscriber.js.map +1 -1
  141. package/package.json +4 -3
package/AGENTS.md ADDED
@@ -0,0 +1,189 @@
1
+ # AGENTS.md
2
+
3
+ This file provides guidance to Codex (Codex.ai/code) when working with code in this repository.
4
+
5
+ ## Repository nature
6
+
7
+ This is a **publishable npm library** (`@servicelabsco/nestjs-utility-services`) that ships compiled output from `dist/` (`main: dist/index.js`). The `src/index.ts`-equivalent (see `dist/index.d.ts`) re-exports `auth`, `common`, `platformUtility`, `security`, `system`, and `worker.service`. Consuming apps install this package and import its modules/services/entities.
8
+
9
+ It is also runnable as a **standalone NestJS app** (`main.ts` / `worker.ts`) for local development of the library itself — running migrations, exercising endpoints, validating wiring. Treat changes as library changes first: anything exported is part of the public API.
10
+
11
+ ## Common commands
12
+
13
+ ```bash
14
+ yarn build # nest build → dist/
15
+ yarn start:dev # watch mode standalone app (main.ts)
16
+ yarn start:prod # node dist/main
17
+ yarn lint # eslint --fix on src/, apps/, libs/, test/
18
+ yarn format # prettier on src/ and test/
19
+ yarn test # jest (rootDir=src, *.spec.ts)
20
+ yarn test -- path/to/file.spec.ts # run a single test file
21
+ yarn test -- -t "matches test name" # run tests by name
22
+ yarn test:cov # coverage → ../coverage
23
+ yarn test:e2e # jest --config ./test/jest-e2e.json (*.e2e-spec.ts)
24
+
25
+ # Migrations (TypeORM, src/config/orm.config.ts)
26
+ yarn m:g <name> # generate from entity diff
27
+ yarn m:c <name> # create empty
28
+ yarn m:r # run pending (ts-node, dev)
29
+ yarn m:rd # run pending against compiled dist
30
+ yarn m:rev # revert last
31
+
32
+ yarn runtime-check # curl /health/runtime-check (cron-parser + cache sanity)
33
+ yarn save # repo-specific commit helper (see commit.sh)
34
+ ```
35
+
36
+ `yarn save` runs `commit.sh`: pulls, optionally builds, optionally runs `slnu syncClassess`, prettier-formats, then commits as `<JIRA-ID> #comment <message>` extracting the JIRA ID from the current branch name. The recent commit history follows this pattern — preserve it for any commits made through this script.
37
+
38
+ ## High-level architecture
39
+
40
+ ### Five top-level NestJS modules under `src/`
41
+
42
+ - **`auth/`** — users, sessions, JWT, refresh tokens, social login, device tokens, role/permission assignment. Owns `JwtMiddleware`, `BasicAuthMiddleware`, `InternalMiddleware`, `RestrictedMiddleware`.
43
+ - **`common/`** — framework-level base classes and utilities. The module itself is empty (`@Module({})`); its value is the exported classes. Most other modules and consumers extend these. **`CommonEntity`** (audit/who-columns, soft delete, `firstOrNew`, helpers — all postgres entities extend this), `CommonMongoEntity`, `CommonService`, `CommonSubscriber`, `CommonJob`, `CommonConsumer`, `CommonMapperJob`, `MigrationUtility` / `BaseMigrationUtility` / `ReverseMigrationUtility` (wrap TypeORM migrations), `Auth` (static accessor over express-http-context2 — `Auth.user()`, `Auth.check()`, `Auth.id()`, `Auth.login()`), exception classes (`OperationException`, `AccessException`, `FormException`, `MaintenanceException`, `NoLoggedUserException`, `SubscriptionException`), and pure helpers (`Hash`, `CustomCrypt`, `DateUtil`, `PlatformUtility`, `JsonEvaluator`, `EntityEvaluator`, `DatabaseEventEvaluator`, `GenericIndexParser`, `GenericShowParser`, `ReportBodyParser`, `DataManager`, `RecordManager`, `ListManager`, `ReportListManager`, `ReportDataManager`, `ClassMapper`, `CustomLogger`, `SeederUtility`).
44
+ - **`platformUtility/`** — infra-adjacent services: `S3Service`, `SqsService`, `DynamoService`, `RedisService`, `CacheService` (Redis-backed), `QueueService` (BullMQ), `MailService` (with SMTP/SES variants in `libraries/`), `SmsService`, `FcmNotificationService`, `RemoteRequestService`, `AwsConfigService`, `AwsSecretService`, `SqlService`, `ZipService`, `MaintenanceService`, `AuditService`, `StartupService`, `ShutdownService`. Hosts `JobConsumer` (the BullMQ consumer), `MaintenanceMiddleware`, `TrimPipe`.
45
+ - **`security/`** — registers security-related entities (TypeORM `forFeature`); module is otherwise pass-through.
46
+ - **`system/`** — the bulk of the domain: ~70 entities for menus, roles, permissions, models, columns, relationships, properties, lookups, forms, reports, charts, scripts, scheduled events, mail/sms/whatsapp templates, document storage. Controllers (`BaseController`, `DataController`, `FormController`, `MenuController`, `PreferenceController`, `ReportController`, `UploadController`, `UserPreferenceController`), services for each domain area, jobs that drive recurring/material-view/code-fix/scheduled execution, subscribers that react to entity events, and a `SentryInterceptor`.
47
+
48
+ ### Module wiring convention — `es6.classes.ts`
49
+
50
+ Every module folder has an `es6.classes.ts` that imports every controller/service/dto/entity/job/subscriber/middleware/library/consumer in that module and exports a single object with arrays. The module file then spreads those arrays into `@Module({ providers, controllers, exports, imports: [TypeOrmModule.forFeature(es6Classes.entities), ...] })`. **When adding a new class to a module, you must register it in that module's `es6.classes.ts` — otherwise it will not be wired into Nest's DI.** The `slnu syncClassess` step in `commit.sh` regenerates these files via libraries in `platformUtility/libraries/create.es6.*.ts` and `create.entity.constants.file.ts`; prefer running it instead of editing by hand when you've added several files.
51
+
52
+ ### `app.module.ts` composition
53
+
54
+ Top-level wiring:
55
+ - Three TypeORM connections: **`default`** (postgres write — `src/config/typeorm.config.ts`), **`read`** (postgres read replica — `src/config/read.typeorm.config.ts`), **`mongodb`** (`src/config/mongo.config.ts`).
56
+ - BullMQ via `src/config/queue.config.ts`; queue name from `BULL_QUEUE_NAME`. `PlatformUtilityModule` registers consumers only when `BULL_QUEUE_WORKER=true` (otherwise `es6Classes.consumers = []`).
57
+ - TerminusModule for `/health` (master + read replica + redis + filesystem checks in `health.check.controller.ts`; `/health/runtime-check` validates cron-parser v5 and cache round-trip).
58
+ - Middleware order applied to all routes: `MaintenanceMiddleware` → `JwtMiddleware` → `BasicAuthMiddleware`. `RestrictedMiddleware` on `api/*` (rejects unauthenticated). `InternalMiddleware` on `internal/*` (validates `x-internal-token` against `internal.server.key` property, then logs in user id 2).
59
+
60
+ ### Entity / migration discovery
61
+
62
+ Both `typeorm.config.ts` (write) and `mongo.config.ts` glob entities from **the current build dir AND `node_modules/@servicelabsco/**`**:
63
+
64
+ ```ts
65
+ entities: [
66
+ join(__dirname, '/../**/**/*.entity.{ts,js}'),
67
+ join(__dirname, '..', '..', 'node_modules/@servicelabsco/**/*.entity.{ts,js}'),
68
+ ],
69
+ ```
70
+
71
+ Mongo uses `*.mentity.{ts,js}` and `*.mongo.subscriber.{ts,js}`. Migrations are similarly merged from this repo's `src/migrations/` and any `@servicelabsco/*` package's `migrations/` dir. `migrationsTableName` is `sys_migrations`. **This means migrations from sibling packages run in this app's database** — be aware when generating new ones, and don't duplicate names across packages.
72
+
73
+ A snake_case naming strategy (`typeorm-naming-strategies`) maps camelCase entity columns to snake_case in postgres. Postgres `bigint` (oid 20) and `decimal` (oid 1700) are auto-cast to JS `number`/`float` in `pg.types.setTypeParser`.
74
+
75
+ ### Worker vs API
76
+
77
+ `main.ts` is the HTTP entrypoint (helmet, CORS, rate limit, compression, sentry, global ValidationPipe with `whitelist: true, transform: true`, optional graceful shutdown via `SERVER_COOL_DOWN_PERIOD`). `worker.ts` is the queue-worker entrypoint — same `AppModule`, no `listen()`, just `init()` + shutdown hooks; in this mode `BULL_QUEUE_WORKER=true` is required for consumers to register. `WorkerService.onModuleInit` calls `MaintenanceService.disableQueueIfRequired()` before processing starts.
78
+
79
+ ### Auth context
80
+
81
+ Request-scoped user is stored via `express-http-context2` and accessed everywhere through the static `Auth` class (`src/common/libraries/auth.ts`). `JwtMiddleware` sets it from a Bearer token; `InternalMiddleware` sets it to user id 2 after validating the internal token. **Never inject the user from the request manually** — use `Auth.user()` / `Auth.id()` / `Auth.check()` so behavior is consistent with the rest of the codebase, and so it works in jobs/consumers that propagate the context.
82
+
83
+ ### Tests
84
+
85
+ Jest config lives in `package.json` (`rootDir: src`, `testRegex: .*\\.spec\\.ts$`, `ts-jest`). E2E uses `test/jest-e2e.json` with `*.e2e-spec.ts`. Tests sit alongside source as `*.spec.ts` (e.g. `auth.service.spec.ts`, `cache.service.spec.ts`, `zip.service.spec.ts`, all of `common/libraries/`, all of `common/exceptions/`).
86
+
87
+ ## Conventions to follow
88
+
89
+ - **4-space indent, single quotes, 150-char line width** (`.prettierrc`). Run `yarn format` before committing.
90
+ - New entities extend `CommonEntity` (or `CommonMongoEntity` for mongo) — never `BaseEntity` directly. Filename suffix is `.entity.ts` (postgres) or `.mentity.ts` (mongo) — the loader globs depend on this.
91
+ - New subscribers: filename `*.subscriber.ts` (postgres) or `*.mongo.subscriber.ts` (mongo).
92
+ - New services extend `CommonService`. New jobs extend `CommonJob` / `CommonMapperJob`. New consumers extend `CommonConsumer`.
93
+ - Throw the project's exception classes (`OperationException`, `AccessException`, etc.) rather than raw `HttpException` / `Error` — they integrate with the response shape and (where applicable) sentry.
94
+ - Migrations: instantiate `MigrationUtility` (or `ReverseMigrationUtility`) in the generated migration class so the `up`/`down` semantics handle the reverse-migration flag correctly. Migration filenames follow `<timestamp>-<PascalCaseDescription>.ts`.
95
+ - After adding files to a module, regenerate or update that module's `es6.classes.ts` so DI picks it up.
96
+ - Library/exported public API: anything added under the five top-level modules is reachable by consumer apps via `@servicelabsco/nestjs-utility-services`. Avoid breaking renames/removals of exports without considering downstream impact, and rebuild (`yarn build`) before publishing.
97
+
98
+ ## File and class naming conventions
99
+
100
+ These rules are not merely stylistic — the `slnu syncClassess` dev CLI walks every module subdirectory and emits `import { ClassName } from './${dir}/${file}'` for every file it finds. If a file does not export a named symbol matching its filename, the generated `es6.classes.ts` will not compile. Honour the conventions even when you think they don't matter.
101
+
102
+ ### Filename ↔ export name match
103
+
104
+ The filename basename (dot-separated lowercase) maps to PascalCase + a suffix derived from the file's last segment:
105
+
106
+ | Filename | Required named export |
107
+ |----------------------------------|-----------------------------------|
108
+ | `aws.s3.service.ts` | `AwsS3Service` |
109
+ | `create.user.dto.ts` | `CreateUserDto` |
110
+ | `user.entity.ts` | `UserEntity` |
111
+ | `object.ref.interface.ts` | `ObjectRefInterface` |
112
+ | `scheduled.event.subscriber.ts` | `ScheduledEventSubscriber` |
113
+ | `recurring.query.job.ts` | `RecurringQueryJob` |
114
+ | `storage.constants.ts` | `StorageConstants` (object — see below) |
115
+
116
+ Single primary export per file. Helpers tightly coupled to the primary (e.g. `storage.upload.options.dto.ts` exports `StorageSseOptions` next to the primary `StorageUploadOptionsDto`) may co-locate, but **peer types must each live in their own file** — do not stuff multiple unrelated interfaces in one file.
117
+
118
+ ### Interfaces and types live in `interfaces/`, not `dtos/`
119
+
120
+ `dtos/` is for class-based DTOs (often with `class-validator` decorators). Pure TypeScript `interface` / `type` declarations belong under a sibling `interfaces/` directory:
121
+
122
+ ```
123
+ src/system/dtos/file.upload.dto.ts # class FileUploadDto {}
124
+ src/system/interfaces/object.ref.interface.ts # interface ObjectRefInterface {}
125
+ src/system/interfaces/storage.ref.interface.ts # type StorageRefInterface = string | ObjectRefInterface
126
+ ```
127
+
128
+ File suffix `.interface.ts`, type name suffix `Interface`. One type per file when types are peers.
129
+
130
+ ### Constants: single-bag object pattern
131
+
132
+ Constants files are exempt from "one class per file" but still must match the filename↔export rule. Use a **named object export** (not `export = ...`, which breaks the dev CLI's named-import generation):
133
+
134
+ ```ts
135
+ // src/system/constants/storage.constants.ts
136
+ export const StorageConstants = {
137
+ ENGINE_S3: 's3',
138
+ ENGINE_R2: 'r2',
139
+ };
140
+ ```
141
+
142
+ Consumers: `import { StorageConstants } from '...'; StorageConstants.ENGINE_S3`.
143
+
144
+ `src/config/source.hash.ts` uses the older `export = SourceHash` + `import SourceHash = require(...)` pattern — that's legacy. New constants files should use `export const Foo = {...}`.
145
+
146
+ ### No "bag of functions" files
147
+
148
+ Do not create files (like the now-removed `sql.safety.ts`) whose only purpose is to `export function ...`. The convention is one class/object per file; bare functions don't fit it. Fold helpers into the class that owns the responsibility — e.g. SQL safety helpers (`isSafeOrderBy`, `escapeSqlString`, `detectSqlInjectionSignature`, `detectHighConfidenceInjection`) live as **instance methods** on `SqlService`.
149
+
150
+ When the helper needs to be reached from a manually-instantiated (non-DI) class like `GenericIndexParser` or `GetReportQuery`, thread the owning service through the constructor:
151
+
152
+ ```ts
153
+ new GenericIndexParser(query, this.sqlService).process();
154
+ new GetReportQuery(this.report, this.sqlService).process(...);
155
+ ```
156
+
157
+ ### Prefer instance methods over static
158
+
159
+ Service methods should be instance methods (`this.sqlService.isSafeOrderBy(x)`), not static (`SqlService.isSafeOrderBy(x)`). Instance methods give consistent DI/mocking semantics and stay testable via the injected instance. Reserve `static` for genuinely class-level concerns like factories or singletons.
160
+
161
+ ### Module wiring lives in `es6.classes.ts`, not inline in module files
162
+
163
+ The dev CLI regenerates each module's `es6.classes.ts` from filesystem contents. Module files (`system.module.ts`, `platform.utility.module.ts`, etc.) should be minimal:
164
+
165
+ ```ts
166
+ @Module({
167
+ imports: [TypeOrmModule.forFeature(es6Classes.entities), ...],
168
+ controllers: es6Classes.controllers,
169
+ providers: [...es6Classes.services, ...es6Classes.subscribers, ...es6Classes.jobs],
170
+ exports: [...es6Classes.services, ...es6Classes.jobs],
171
+ })
172
+ export class SystemModule {}
173
+ ```
174
+
175
+ Avoid inline `{ provide: SOME_TOKEN, useFactory: ... }` provider blocks. If a service consumes a set of adapter classes, **inject the adapter classes directly** rather than introducing a DI token + factory:
176
+
177
+ ```ts
178
+ // Good — wiring is automatic via es6Classes.services
179
+ constructor(private readonly s3: AwsS3Service, private readonly r2: CloudflareR2Service) {
180
+ this.registry = new Map([[s3.engineId, s3], [r2.engineId, r2]]);
181
+ }
182
+
183
+ // Avoid — pulls bespoke wiring into the module file
184
+ constructor(@Inject(STORAGE_ENGINE_ADAPTERS) adapters: CommonStorageService[]) { ... }
185
+ ```
186
+
187
+ ### Fixing CLI fallout
188
+
189
+ If `slnu syncClassess` emits a broken import, the source file violates the naming convention — fix the source file (rename, add the missing export, move it to the right directory). Do not hand-edit `es6.classes.ts` as a permanent workaround; the next CLI run will overwrite your edit.
@@ -0,0 +1,104 @@
1
+ # Linear Audit Validation - nestjs-utility-services
2
+
3
+ Snapshot: `main` @ `03266dbb18b5f3eaed4688da9b165bb6a1a28b5a`
4
+ Date: 2026-06-03
5
+ Linear project: `Codebase Audit - nestjs-utility-services` (`25e106d9-1063-4468-984a-7fdfbb3fb8b2`)
6
+
7
+ This validation combines:
8
+
9
+ - Existing repo audit docs: `CODEBASE-REVIEW.md` and `CODEBASE-REVIEW-2026-06-03.md`.
10
+ - Open Linear issues in the audit project: 31 Backlog issues plus 2 In Review precision issues.
11
+ - Five parallel read-only validation passes over auth, platformUtility, system/bootstrap, common, and migrations/config.
12
+ - Local spot-checks against current files.
13
+
14
+ Verification command run:
15
+
16
+ ```bash
17
+ yarn test -- dynamo.service.spec.ts entity.evaluator.spec.ts access.service.spec.ts jwt.middleware.spec.ts report.column.sync.job.spec.ts event.queue.service.spec.ts
18
+ ```
19
+
20
+ Result: 6 suites passed, 47 tests passed. This does not clear the findings below; several verified bugs remain present while the existing tests do not exercise them.
21
+
22
+ ## Executive Summary
23
+
24
+ The Linear re-audit issue set is substantially valid against current `main`. The most urgent work is still a tight P0 cluster:
25
+
26
+ - `FIN-243` / `R-B2`: Dynamo `updateItem` existing-row reads are broken.
27
+ - `FIN-244` / `R-B1`: report-column sync returns `undefined` on first column creation.
28
+ - `FIN-245` / `R-S1`: revoked bearer sessions fall through as anonymous.
29
+ - `FIN-246` / `R-S2`: access checks grant when role/permission arrays are undefined.
30
+
31
+ The dominant residual pattern is partial fixes: the original May audit fixed headline paths, but sibling paths remained open (`add` fixed but `addBulk` not, `SqsPollingJob` fixed but `CommonSqsPolling` not, equality comparator fixed but range comparator not, health detailed gated but quick/runtime left public).
32
+
33
+ ## P0 - Confirmed Fix-Now Items
34
+
35
+ | Linear | Status | Evidence | Fix direction |
36
+ |---|---|---|---|
37
+ | `FIN-243` / `R-B2` | Confirmed | `src/platformUtility/services/dynamo.service.ts:286-295` passes a bare key map into `getItem`; `getItem` expects `{ TableName, Key }` at `:118-123`. Existing row lookup fails before optimistic update. | Call `this.getItem({ TableName: tableName, Key: param })`; add `updateItem` regression spec. |
38
+ | `FIN-244` / `R-B1` | Confirmed | `src/system/jobs/report.column.sync.job.ts:65-78` saves a new column but does not return it; caller derefs `response.name` at `:49-51`. | `return column.save();`; add first-sync-new-column spec. |
39
+ | `FIN-245` / `R-S1` | Confirmed | `src/auth/middlewares/jwt.middleware.ts:51-52` does `if (!isAllowed) return next()` after `validateSession`; revoked tokens become anonymous instead of rejected. | Throw `AccessException` or equivalent when a presented token has an invalid/revoked session. |
40
+ | `FIN-246` / `R-S2` | Confirmed | `src/auth/services/access.service.ts:153,154,172,190,207,208,224,225,241,257` uses `arr?.indexOf(x) !== -1`; `undefined !== -1` is true. Non-admin auth objects can omit these arrays. | Normalize arrays to `[]` and/or use `Array.isArray(arr) && arr.includes(value)` everywhere. |
41
+
42
+ ## P1 - Confirmed Important Items
43
+
44
+ | Linear | Status | Evidence | Fix direction |
45
+ |---|---|---|---|
46
+ | `FIN-247` / `R-A5` | Confirmed | `src/common/libraries/record.manager.ts:155` and `src/common/libraries/report.data.manager.ts:153` still substitute values into SQL text. | Return structured SQL plus bound params; no value interpolation. |
47
+ | `FIN-248` / `R-S3` | Confirmed | `src/auth/controllers/admin.auth.controller.ts:143-168` checks `used_at`, then rotates; `src/auth/services/refresh.token.service.ts:48-51` saves non-conditionally. | Atomic compare-and-set on `used_at IS NULL` in a transaction; zero affected rows means reuse. |
48
+ | `FIN-249` / `R-S4` | Confirmed | `src/platformUtility/services/remote.request.service.ts:56-102` applies axios caps but no scheme/DNS/private-IP/IMDS guard. | Validate `http/https`, resolve DNS, block loopback/private/link-local/IMDS, revalidate redirects. |
49
+ | `FIN-250` / `R-S5` | Confirmed | `src/health.check.controller.ts:88-103,129-143` returns raw DB driver `error.message` from public health checks. | Public health should return generic down status; verbose errors only on internal route. |
50
+ | `FIN-251` / `R-S6` | Confirmed | `/health/quick` calls heavy `checkRedis()` at `src/health.check.controller.ts:372-375`; runtime check still does cache set/get/delete. `app.module.ts:61-66` gates only `/health/detailed`. | Use ping-only on public health or gate quick/runtime. |
51
+ | `FIN-252` / `R-S7` | Confirmed with nuance | Generic `CacheService.set` stores plaintext JSON for 30 days at `src/platformUtility/services/cache.service.ts:33-58`. The property-cache secret path is partly fixed: `refresh.property.cache.job.ts:36-40` stores encrypted envelopes. | Keep encrypted property envelope; add encrypted/sensitive cache API or block secret-like keys; shorten default TTL. |
52
+ | `FIN-253` / `R-S8` | Confirmed | Postgres/Mongo/Redis/Bull configs do not expose TLS/SSL knobs; Redis URLs hardcode `redis://` and do not encode credentials. | Add env-gated SSL blocks, `rediss://`, and URI-encoded Redis credentials. |
53
+ | `FIN-254` / `R-B3` | Confirmed | `src/common/libraries/entity.evaluator.ts:47-124,160-205,232-236` still uses falsy guards, so `0`, `''`, and `false` are mishandled in comparator families. | Use nullish checks and safe string conversion; add zero/empty-string specs. |
54
+ | `FIN-255` / `R-B4` | Confirmed | `src/platformUtility/services/mail.service.ts:127-130` returns from the recipient loop on first untracked recipient. | `await r.save(); continue;`; test multi-recipient no-tracking and mixed-tracking cases. |
55
+ | `FIN-256` / `R-B5` | Confirmed | `src/platformUtility/services/sqs.service.ts:128-133` hardcodes FIFO batch `MessageGroupId: 'group-1'`. | Accept/derive per-message group and dedup ids; test FIFO batch path. |
56
+ | `FIN-257` / `R-B6` | Confirmed | `src/system/services/event.queue.service.ts:94-95` derefs `findOne()` result before null guard. | Throw `OperationException` when missing. |
57
+ | `FIN-258` / `R-B7` | Confirmed | `src/system/services/event.queue.service.ts:155-156` calls `.length` on a free-form value. | `if (value == null) return null; value = String(value);`. |
58
+ | `FIN-259` / `R-B8` | Confirmed | `src/system/services/event.queue.service.ts:82-85,103-106` returns from `finally`, masking thrown errors. | Do not return from `finally`; add `no-unsafe-finally`. |
59
+ | `FIN-260` / `R-B9` | Confirmed | `src/system/services/document.service.ts:141-142` returns maybe-null `DocumentEntity.first(file.id)`; deref at `:98`. | Guard explicit id path and throw. |
60
+ | `FIN-261` / `R-B10` | Confirmed with nuance | `src/common/libraries/common.job.ts:255-256` checks `event.driver === 'mongo'`; current TypeORM driver string is `mongodb`. CommonSubscriber subclaim is stale; it already uses `mongodb`. | Shared driver constant; update `common.job.spec.ts`. |
61
+ | `FIN-262` / `R-M1` | Confirmed, count stale | `src/migrations/1780002352495-MigrateJsonColumnsToJsonb.ts` still loops `ALTER TABLE ... TYPE jsonb`; validator counted 103 column tuples, not 116. | Split by table/hotness or run outside one large transaction with operational guidance. |
62
+ | `FIN-263` / `R-M2` | Confirmed | Unique index migrations `1779607111923` and `1779607111924` call helper indexes without dedup pass. | Add dedup/remediation SQL; consider concurrent/index-swap pattern. |
63
+ | `FIN-264` / `R-M3` | Confirmed | `src/common/libraries/base.migration.utility.ts:829-842` claims metadata-only but accepts volatile defaults. | Reject volatile defaults or force two-phase migration. |
64
+ | `FIN-265` / `R-M4` | Confirmed | `src/migrations/1779773659655-AddIdempotencyIndexesForJobs.ts:73-88` dedups/indexes nullable `scheduled_start_time` with normal equality/unique semantics. | Use `IS NOT DISTINCT FROM`, `COALESCE` expression index, or enforce non-null. |
65
+ | `FIN-266` / `R-A1` | Confirmed | Cross-bucket evidence shows partial sibling fixes in auth, SQS, health, managers, evaluators, and migrations. | Fix by method family, not only by named incident. |
66
+ | `FIN-267` / `R-A2` | Confirmed | Focused test slice passes while P0/P1 code defects remain. Existing Dynamo/evaluator tests do not cover the regression cases. | Require failing-then-green regression specs per audit fix. |
67
+ | `FIN-268` / `R-A3` | Confirmed | `eslint.config.js` lacks `no-unsafe-finally`, return-in-loop, manager SQL interpolation, and falsy-comparator guards. | Add targeted lint/custom rules to `yarn lint`. |
68
+ | `FIN-269` / `R-A4` | Confirmed | `CommonEntity.first()` is typed as `Promise<T>` but can return `null`/`undefined`; downstream derefs remain. | Change to `Promise<T | null>` or add `firstOrThrow`; update callers deliberately. |
69
+
70
+ ## P2 / Rollups - Confirmed or Nuanced
71
+
72
+ | Linear | Status | Notes |
73
+ |---|---|---|
74
+ | `FIN-270` / minor bugs | Mostly confirmed | `model.service.ts:175` nullable `scope.includes`, `sqs.polling.job.ts:52` unguarded `JSON.parse`, `storage.service.ts` empty-bucket URL, `job.consumer` shared stats, and refresh-token sibling race coverage gap all remain credible. |
75
+ | `FIN-271` / minor security | Confirmed | `social.identity.service.ts:31-39` email auto-linking lacks local verification; `redis.service.ts:221-222` has unprefixed `flushdb` on a public-exposed service surface; app hash/test routes need deletion/gating. |
76
+ | `FIN-272` / enhancements | Mostly confirmed | `CachedProperty` stampede/no undefined cache, `LogRedactor` object rebuilding, `attributes: any`, width-DSL misuse, and unadopted `concurrentIndex` remain. The `*.ts.ts` filename item is stale; no current files matched. |
77
+ | `FIN-242` / CustomCrypt legacy readers | Confirmed as rollout debt | Legacy reader paths still exist in `custom.crypt.ts`; remove only after consumer re-encrypt rollout is proven complete. |
78
+ | `FIN-212` / `A21` and `FIN-226` / `E13` | Mostly remediated, follow-through remains | Current config defaults decimal/numeric to strings unless `PG_DECIMAL_AS_FLOAT=true`; `Money` and `DecimalColumnTransformer` exist; `rg` found no active `type: 'float'` entity columns. Remaining work is consumer adoption and closing Linear after review. |
79
+
80
+ ## New / Missed Findings From Verification
81
+
82
+ | ID | Severity | Evidence | Fix direction |
83
+ |---|---|---|---|
84
+ | `V-S1` | P1 security | `BasicAuthMiddleware` logs in valid users without the blocked-user check used by password/JWT flows. | Mirror blocked-user rejection before `Auth.login()`; add spec. |
85
+ | `V-S2` | P1 if exposed | `UploadService` URL upload path fetches arbitrary URL via raw `axios.get` without SSRF/timeout/size guard. | Confirm service-registry reachability; if reachable, reuse RemoteRequestService URL guard. |
86
+ | `V-P1` | P1 security/ops | `SplitPdfService` appears to retain hardcoded Lambda URL and infinite body caps, a sibling of prior ZipService hardening. | Property-driven URL and finite caps. |
87
+ | `V-P2` | P1/P0 if used | `CommonSqsPolling` still deletes SQS messages before handler success, while `SqsPollingJob` was fixed. | Delete only after successful handler; malformed JSON gets logged and dropped deliberately. |
88
+ | `V-P3` | P1 ops | `JobConsumer` parses Bull retention env values with invalid `parseInt` radices, unlike `CommonJob` helper path. | Reuse/factor `CommonJob.parseBullLimit`; finite-count spec. |
89
+ | `V-C1` | P2/P1 depending on rule use | `JsonEvaluator` still conflates null/falsy in sibling predicates. | Apply nullish-vs-falsy cleanup and define empty semantics. |
90
+
91
+ ## Recommended Order
92
+
93
+ 1. `FIN-243`, `FIN-244`, `FIN-245`, `FIN-246` - four P0s, each test-first.
94
+ 2. `FIN-247`, `FIN-248`, `FIN-249`, `FIN-250`, `FIN-251`, `FIN-253` - P1 security/resilience.
95
+ 3. `FIN-254`, `FIN-255`, `FIN-256`, `FIN-257`, `FIN-258`, `FIN-259`, `FIN-260`, `FIN-261` - P1 correctness.
96
+ 4. `FIN-262` through `FIN-265` - migration safety, planned with consumer DB size awareness.
97
+ 5. `FIN-266` through `FIN-269` - systemic guardrails that prevent this same class from coming back.
98
+
99
+ Highest single-day ROI:
100
+
101
+ - `FIN-246` - one helper/array-normalization pattern closes a real privilege bug family.
102
+ - `FIN-243` - one wrong method call breaks Dynamo updates on existing rows.
103
+ - `FIN-244` - one missing return breaks first report-column sync.
104
+ - `FIN-268` - lint guardrails convert repeated audit memory into mechanical prevention.
@@ -0,0 +1,102 @@
1
+ # Codebase Re-Audit — nestjs-utility-services (2026-06-03)
2
+
3
+ **Snapshot:** branch `main` @ `03266dbb1` · 681 TS files / ~51K LOC · 96 spec files
4
+ **Method:** 7 parallel module-bucket reviewers (system-logic, system-data, common, platformUtility, auth, migrations, config/bootstrap), each prior-aware (briefed on the May-18 `CODEBASE-REVIEW.md` baseline + the 93 fixed findings) and tasked to find **new / missed / regression** issues only.
5
+
6
+ ---
7
+
8
+ ## Part A — What changed since the first audit
9
+
10
+ The first audit (May 18) graded the repo ~C. Since then **93 findings were fixed** across 5 merged-PR waves. This re-audit **verified those fixes held** — spot-checks across every bucket confirm the headline remediations are genuine, not papered over:
11
+
12
+ - **Security:** SQL injection → `SqlService` bound params; sandboxed script exec; refresh-token hashing + family rotation + reuse detection; social-login identity binding; CustomCrypt v2 GCM + gated plaintext fallback; PII/secrets redaction (`LogRedactor`) at Sentry/log exit points; AWS default credential chain; constant-time internal-token compare; CORS deny-by-default; rate-limit + trust-proxy hops; JWT_SECRET fail-fast + alg pinning.
13
+ - **Resilience:** job idempotency via `firstOrCreate` on polymorphic keys; subscriber dispatch-after-commit; bounded loops + poison detection; graceful worker drain; conditional Dynamo writes (see regression R-B2); `/health` split + maintenance-middleware exclusion.
14
+ - **Correctness:** pg decimal → string + `Money`/`DecimalColumnTransformer`; float-column lint ban (E5); bigint primary default; `Auth` null-safety; `CommonEntity` 23505 race handling; typed jsonb attribute DTOs (partial).
15
+ - **Architecture:** `AwsClientFactory`, `CachedProperty`, storage-adapter pattern (sms/push/secret), lockable `PlatformUtility` registries, the `common/` primitive-layer ESLint guard (A13).
16
+
17
+ **No fix introduced a *new* security hole, but one introduced a functional regression (R-B2, Dynamo).** The dominant residual theme is **partial fixes** — a finding's headline method/path was fixed while sibling members or a second axis were left open.
18
+
19
+ **Overall grade: B−** (was ~C), trending up. The two 🔴 functional bugs and the auth privilege/revocation gaps must close before this is a solid B.
20
+
21
+ ---
22
+
23
+ ## Part B — Findings (ID-tagged, by severity)
24
+
25
+ IDs use an `R-` prefix to avoid colliding with the first audit's S/M/B/A/E numbering.
26
+
27
+ ### 🔴 P0 — must fix (correctness / security)
28
+
29
+ - **R-B1 — `report.column.sync.job.ts:77` `saveColumn` missing `return` on create path.** Resolves `undefined`; caller `loadReportColumns:49-51` derefs `response.name` → `TypeError` on first sync of any new column. Fails closed (B9 guard prevents mass-delete) but crashes sync. **Fix:** `return column.save();` (mirror `:200`).
30
+ - **R-B2 — `dynamo.service.ts:286-296,118-127` optimistic-concurrency read broken (regression from B26).** `getUpdateItemDataFromRemoteServer` passes a bare key map to `getItem()`, which expects `{TableName, Key}`; existing-row read always `undefined` → every update to an existing row takes the `attribute_not_exists` branch → `ConditionalCheckFailedException` after 3 retries. **Fix:** `this.getItem({ TableName: tableName, Key: param })` + add `dynamo.service.spec.ts`.
31
+ - **R-S1 — `jwt.middleware.ts:51-52` + `auth.service.ts:178-187` revoked session downgrades to anonymous.** When `validateSession` returns `false` (logout revocation, the S36 fix), middleware `return next()` proceeds *unauthenticated* instead of rejecting; `api/*` is saved by `RestrictedMiddleware`, non-`api/*` routes serve the request. **Fix:** throw `AccessException` on `isAllowed === false` (mirror the blocked-user path).
32
+ - **R-S2 — `access.service.ts:153,172,190,207-257` privilege escalation via `arr?.indexOf(x) !== -1` on undefined arrays.** When `user.roles`/permissions is `undefined` (non-admins get an empty user object), `undefined !== -1` is `true` → 7 role-*identifier* / permission methods grant access. The B30 sweep fixed `hasRoleId(s)` but missed these siblings. **Fix:** `private has(arr,v){return Array.isArray(arr)&&arr.includes(v)}` everywhere. *(Verify the real-world `roles` shape; if always `[]` not `undefined`, severity drops to P1 — but treat as P0 until confirmed.)*
33
+
34
+ ### 🟡 P1 — important (resilience / security hardening / correctness)
35
+
36
+ - **R-B3 — `entity.evaluator.ts` numeric comparators falsy-conflate `0`.** `gt/gteq/lt/lteq/between/notBetween/startsWith/endsWith/notContains` retain `if (!entityValue) return false`; `gteq('balance', 0)` returns `false`. B20 fixed equality/string ops but not these. **Fix:** nullish check (`value == null`) + zero-edge specs.
37
+ - **R-A5 / R-S(SQLi) — manager SQL value interpolation persists (`record.manager.ts:155`, `report.data.manager.ts:153`).** B25 hardened the *regex* but record/report-param *values* are still concatenated into SQL before reaching `SqlService.read`. **Fix:** bind values as params at every manager exit.
38
+ - **R-S3 — `refresh.token.service.ts:48-52` / `admin.auth.controller.ts:143-168` rotation race.** No atomic compare-and-set on `used_at`; concurrent refresh forks the family past reuse detection. **Fix:** conditional `update({id, used_at: IsNull()}, {used_at: now})` in a tx; zero rows affected → reuse → `revokeFamily`.
39
+ - **R-S4 — `remote.request.service.ts` SSRF half-closed.** DoS caps landed; no IMDS/loopback/RFC-1918/scheme guard on a `@PublicExposed` service. **Fix:** pre-flight resolved-IP block + http/https-only, with explicit `allowInternal` opt-in.
40
+ - **R-S5 — `health.check.controller.ts:88-103,129-143` leaks raw DB driver `error.message` to anonymous `/health`** (host/db/role, "password authentication failed"). **Fix:** generic `status:'down'` on public `/health`; verbose only on gated `/detailed`.
41
+ - **R-S6 — `health.check.controller.ts:372-383` `/health/quick` + `/health/runtime-check` run the heavy unauth Redis write-read-delete probe** S23 set out to remove (it gated `/detailed` but not these). **Fix:** use ping-only or gate via InternalMiddleware.
42
+ - **R-S7 — `cache.service.ts:33-59` stores plaintext JSON (incl. decrypted secrets from the S32 path) with 30-day default TTL.** **Fix:** document "no secrets via `set`" or add an encrypted variant; shorten default TTL.
43
+ - **R-S8 — no TLS/SSL on DB/Redis connections** (`typeorm.config`, `read.typeorm.config`, `mongo.config`, `redis.config`). **Fix:** env-gated `ssl` block; `rediss://` option; `encodeURIComponent(password)` in Redis URL.
44
+ - **R-B4 — `mail.service.ts:124-137` `setRecipient` `return r.save()` inside a `for` loop drops later recipients** (same class as fixed B40). **Fix:** `await r.save(); continue;`.
45
+ - **R-B5 — `sqs.service.ts:130-133` `addBulk` hardcodes `MessageGroupId:'group-1'`** (B28 fixed only single `add()`), serializing all FIFO batches + no per-entry dedup id. **Fix:** thread per-message group id.
46
+ - **R-B6 — `event.queue.service.ts:94-95` null deref in `triggerById`** (`findOne` → null then `event.start_time=`). **Fix:** guard + `OperationException`.
47
+ - **R-B7 — `event.queue.service.ts:155-156` `typeCastParameter` calls `.length` on possibly-non-string.** **Fix:** `if (value==null) return null; value=String(value);`.
48
+ - **R-B8 — `event.queue.service.ts:82-85,103-106` `return` inside `finally` masks thrown errors.** **Fix:** move `save()` out of `finally`.
49
+ - **R-B9 — `document.service.ts:142` `DocumentEntity.first(file.id)` null deref on explicit-id path** (`upsertDocument:98` derefs). **Fix:** throw when null.
50
+ - **R-B10 — `common.job.ts:256` `isMongoEntity` compares `=== 'mongo'` but driver string is `'mongodb'`** → mongo branch never matches. **Fix:** compare `'mongodb'` / shared constant.
51
+ - **R-M1 — `1780002352495-MigrateJsonColumnsToJsonb.ts:120-130` runs 116 `ALTER…TYPE jsonb` (ACCESS EXCLUSIVE rewrites) in one transaction.** Aggregate lock stall on large consumer DBs; one failure rolls back all. **Fix:** per-table migrations or `transaction=false` + commit per table; order hot tables last.
52
+ - **R-M2 — `1779607111923/924` unique-index migrations build *blocking* indexes with no dedup pass.** Pre-existing duplicates → 23505 → stuck deploy, no remediation. **Fix:** dedup DELETE first (mirror `AddIdempotencyIndexesForJobs`) and/or use the E4 `concurrentIndex` helper.
53
+ - **R-M3 — `base.migration.utility.ts:839-842` `addColumnWithDefault` "metadata-only" claim is false for volatile defaults** (`uuid_generate_v4()`/`now()` force a rewrite). **Fix:** document caveat / reject non-constant defaults.
54
+ - **R-M4 — `1779773659655` dedup join assumes `scheduled_start_time` non-NULL** (NULL≠NULL) → idempotency silently doesn't cover NULL-scheduled events. **Fix:** `COALESCE` into key or enforce NOT NULL.
55
+
56
+ ### 🟢 P2 — minor / enhancement
57
+
58
+ - **R-B11** `model.service.ts:175` `role.scope.includes` assumes non-null scope.
59
+ - **R-B12** `sqs.polling.job.ts:52` unguarded `JSON.parse(message.Body)` → poison-message redelivery loop (no DLQ/max-receive). Treat parse failure like unknown-handler (log+delete).
60
+ - **R-B13** `data.manager.ts:356-357` `loadFromCache` skips user-binding when `Auth.user()` null → anonymous reads another identity's cached plan. Use `Auth.id() ?? null`.
61
+ - **R-B14** `storage.service.ts:355` `publicUrl` builds URL against empty bucket silently.
62
+ - **R-B15** `job.consumer.ts:208-262` non-atomic shared-singleton stats mutation across workers (cosmetic).
63
+ - **R-B16** `refresh.token.service.ts:61-65` revoked-family sibling presented mid-sweep — add a test.
64
+ - **R-B17** `auth.service.ts:63-79` refresh token issued bound to an unregistered device is unusable with no error at issue time.
65
+ - **R-S9** `social.identity.service.ts:31-39` auto-links provider-verified email to a possibly-unverified local account.
66
+ - **R-S10** `redis.service.ts:212-223` `flushdb` is `@PublicExposed` + unprefixed (wipes co-tenant keys).
67
+ - **R-S11** `app.controller.ts:111-114` `api/admin/file-hash/:str` MD5 oracle for the document lookup scheme (authenticated, not role-gated).
68
+ - **R-S12** `app.controller.ts:78-81` dead `api/test` handler returns empty 200 — delete. `loginInfo:102-105` reads `req.user` directly — migrate to `Auth.user()`.
69
+ - **R-M5** `1779807657061` refresh-token backfill `UPDATE…digest()` unbatched in one tx (fine at typical volume).
70
+ - **R-M6** `1778754675764` lossy `down()` (text→varchar(2048)) undocumented.
71
+ - **R-M7** legacy `width:` DSL misuse persists (~19 files; B24 baseline — columns silently `varchar(255)`).
72
+ - **R-E1** triplicated `getDisplayName`/`getColumnDisplayName` (`model.scanner.job:264`, `report.column.sync.job:138`, `sync.all.code.job:478`) → one helper.
73
+ - **R-E2** user-group sync job family (member/role/permission) → registry/strategy.
74
+ - **R-E3** `cached.property.ts:57-66` no in-flight dedup (stampede) + never caches `undefined`.
75
+ - **R-E4** `log.redactor.ts:64-74` rebuilds `Date`/`Buffer`/`Error` as plain `{}` (loses type/message in Sentry).
76
+ - **R-A7** ~50 entities still `@Column('jsonb') attributes: any`; "typed" DTOs (e.g. `ScheduledEventAttributesDto`) are empty `extends CommonAttributesDto` with no class-validator → compile-time hints only, no runtime validation.
77
+ - **R-A8** E4 `concurrentIndex` helper exists but is unadopted in `src/migrations/`.
78
+
79
+ ---
80
+
81
+ ## Part C — Systemic patterns + phase plan
82
+
83
+ ### Systemic patterns (recurred across ≥3 buckets)
84
+
85
+ - **R-A1 — "Partial fix" is the dominant residual class.** A fix landed the headline method/path/axis but left siblings open: B20→numeric comparators (R-B3), B30→permission methods (R-S2), B28→batch path (R-B5), S5→SSRF axis (R-S4), B25→value interpolation (R-A5), S23→`/health/quick`+`runtime-check` (R-S6). **Action:** when a finding spans a method family or two axes, fix the whole set; add a lint rule per class where possible.
86
+ - **R-A2 — Fixes shipped without the regression test that would catch the re-break.** R-B2 (Dynamo, no spec) and R-B3 (evaluator zero-edge, no spec) are the clearest. **Action:** require a failing-then-green test with each fix; backfill `dynamo.service.spec.ts`.
87
+ - **R-A3 — `return` inside `for`/`finally`.** R-B4 (mail loop), R-B8 (event-queue finally). **Action:** ESLint `no-unsafe-finally` + a rule flagging `return <expr>` in an un-broken loop body.
88
+ - **R-A4 — `Entity.first(id)` / `findOne` deref without null guard** in less-trafficked service methods (R-B6, R-B9, R-B11). **Action:** tighten `CommonEntity.first()` return type to `T | null` (E7-adjacent) to surface all sites at compile time.
89
+
90
+ ### Phase plan
91
+
92
+ | Phase | Scope | Items |
93
+ |---|---|---|
94
+ | **0 — Verify** | Confirm R-S2's real `roles` shape (undefined vs `[]`); reproduce R-B2 & R-B1 with a failing test | R-S2, R-B2, R-B1 |
95
+ | **1 — P0 fixes** | One PR each, test-first | R-B1, R-B2, R-S1, R-S2 |
96
+ | **2 — P1 security** | SSRF guard, health info-disclosure, TLS knobs, rotation race, secret-cache | R-S3–R-S8, R-A5 |
97
+ | **3 — P1 bugs** | Null-guards, return-in-loop, mongo driver string, evaluator zero | R-B3–R-B10 |
98
+ | **4 — Migrations safety** | Split jsonb tx, dedup-before-unique-index, volatile-default caveat | R-M1–R-M4, R-A8 |
99
+ | **5 — Systemic** | Lint rules (no-return-in-loop, no-template-SQL-in-managers, no-falsy-guard-in-comparators), `first()` return-type tightening | R-A1–R-A4 |
100
+ | **6 — Enhancements** | Consolidate duplicated helpers, typed-attributes runtime validation, cached-property stampede | R-E1–R-E4, R-A7 |
101
+
102
+ **Recommended kickoff:** do **R-B2 (Dynamo regression)** end-to-end first — it's a confirmed functional break with a clear fix and an obvious missing spec, so it establishes the test-first template; then R-B1, then the auth P0s (R-S1, R-S2) after verifying R-S2's severity.
@@ -33,6 +33,7 @@ export declare class AppController {
33
33
  }>;
34
34
  getUserAuthObject(): Promise<any>;
35
35
  testOne(): Promise<any>;
36
+ testEmithookMail(to?: string): Promise<any>;
36
37
  getQueueInstance(): Promise<any>;
37
38
  queue(id: string): Promise<any>;
38
39
  }
@@ -14,7 +14,9 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.AppController = void 0;
16
16
  const common_1 = require("@nestjs/common");
17
+ const class_transformer_1 = require("class-transformer");
17
18
  const auth_1 = require("./common/libraries/auth");
19
+ const mail_options_dto_1 = require("./platformUtility/dtos/mail.options.dto");
18
20
  const test_job_1 = require("./platformUtility/jobs/test.job");
19
21
  const audit_service_1 = require("./platformUtility/services/audit.service");
20
22
  const cache_service_1 = require("./platformUtility/services/cache.service");
@@ -55,6 +57,31 @@ let AppController = class AppController {
55
57
  async testOne() {
56
58
  return auth_1.Auth.user();
57
59
  }
60
+ async testEmithookMail(to) {
61
+ try {
62
+ const log = await this.mailService.send((0, class_transformer_1.plainToClass)(mail_options_dto_1.MailOptionsDto, {
63
+ gateway: 'emithook',
64
+ to: to || 'hemantanshu@gmail.com',
65
+ subject: 'Emithook test from nestjs-utility-services',
66
+ html: '<p>Test email sent via MailService with the Emithook gateway.</p>',
67
+ idempotency_key: `nu-emithook-test-${Date.now()}`,
68
+ }));
69
+ return {
70
+ success: true,
71
+ mail_log_id: log?.id,
72
+ gateway: log?.gateway,
73
+ identifier: log?.identifier,
74
+ subject: log?.subject,
75
+ body: log?.body,
76
+ };
77
+ }
78
+ catch (error) {
79
+ return {
80
+ success: false,
81
+ error: error?.message || String(error),
82
+ };
83
+ }
84
+ }
58
85
  async getQueueInstance() {
59
86
  return this.queueService.data;
60
87
  }
@@ -81,6 +108,13 @@ __decorate([
81
108
  __metadata("design:paramtypes", []),
82
109
  __metadata("design:returntype", Promise)
83
110
  ], AppController.prototype, "testOne", null);
111
+ __decorate([
112
+ (0, common_1.Get)('test/emithook-mail'),
113
+ __param(0, (0, common_1.Query)('to')),
114
+ __metadata("design:type", Function),
115
+ __metadata("design:paramtypes", [String]),
116
+ __metadata("design:returntype", Promise)
117
+ ], AppController.prototype, "testEmithookMail", null);
84
118
  __decorate([
85
119
  (0, common_1.Get)('api/admin/queue-instance'),
86
120
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwD;AACxD,kDAA+C;AAC/C,8DAA0D;AAC1D,4EAAwE;AACxE,4EAAwE;AACxE,0EAAsE;AACtE,4EAAwE;AACxE,4EAAwE;AACxE,wEAAoE;AACpE,6EAAuE;AACvE,mFAA6E;AAC7E,uEAAiE;AACjE,qEAAiE;AACjE,yEAAqE;AACrE,qEAAiE;AAGjE,wEAAoE;AAS7D,IAAM,aAAa,GAAnB,MAAM,aAAa;IAgBtB,YACqB,YAA0B,EACxB,OAAgB,EAChB,oBAA0C,EAC1C,WAAwB,EACxB,eAAgC,EAChC,UAAsB,EACtB,iBAAoC,EACpC,cAA8B,EAC9B,YAA0B,EAC1B,YAA0B,EAC1B,aAA4B,EAC5B,aAA4B,EAC5B,YAA0B,EAC1B,UAAsB;Q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I,CAAC;IAClC,CAAC;IASK,AAAN,KAAK,CAAC,KAAK,CAAc,EAAU;QAC/B,OAAO,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAA;AAjHY,sCAAa;AAsChB;IADL,IAAA,YAAG,GAAE;;;;wCAGL;AAOK;IADL,IAAA,YAAG,EAAC,UAAU,CAAC;;;;sDAGf;AAOK;IADL,IAAA,YAAG,EAAC,UAAU,CAAC;;;;4CAGf;AAOK;IADL,IAAA,YAAG,EAAC,oBAAoB,CAAC;IACF,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;qDA0BlC;AAQK;IADL,IAAA,YAAG,EAAC,0BAA0B,CAAC;;;;qDAG/B;AASK;IADL,IAAA,YAAG,EAAC,8BAA8B,CAAC;IACvB,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;0CAEvB;wBAhHQ,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAkB0B,4BAAY;QACf,kBAAO;QACM,8CAAoB;QAC7B,0BAAW;QACP,kCAAe;QACpB,wBAAU;QACH,wCAAiB;QACpB,kCAAc;QAChB,4BAAY;QACZ,4BAAY;QACX,8BAAa;QACb,8BAAa;QACd,4BAAY;QACd,wBAAU;GA9BpC,aAAa,CAiHzB"}
@@ -53,7 +53,7 @@ let AuthService = class AuthService extends common_service_1.CommonService {
53
53
  try {
54
54
  return await this.jwtService.verify(token);
55
55
  }
56
- catch (e) {
56
+ catch {
57
57
  return false;
58
58
  }
59
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../../src/auth/services/auth.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qCAAyC;AACzC,sDAAmD;AAEnD,qFAAgF;AAChF,yDAAqD;AACrD,mEAA8D;AAC9D,iDAA6C;AAC7C,0EAAsE;AAQ/D,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ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,IAAI,CAAC;QAE7B,MAAM,CAAC,GAAG,MAAM,mDAAuB,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QACxF,IAAI,CAAC,CAAC,UAAU;YAAE,OAAO,KAAK,CAAC;QAE/B,OAAO,IAAI,CAAC;IAChB,CAAC;IAOM,KAAK,CAAC,aAAa;QACtB,MAAM,IAAI,GAAG,WAAI,CAAC,IAAI,EAAE,CAAC;QAEzB,MAAM,UAAU,GAAG,IAAI,EAAE,eAAe,EAAE,kBAAkB,CAAC;QAC7D,IAAI,CAAC,UAAU;YAAE,OAAO;QAExB,MAAM,CAAC,GAAG,MAAM,mDAAuB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;QAE7F,IAAI,CAAC,CAAC;YAAE,OAAO;QACf,IAAI,CAAC,CAAC,UAAU;YAAE,OAAO;QAEzB,CAAC,CAAC,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC;QAE1B,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;CACJ,CAAA;AA7JY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAUwB,gBAAU;QACD,2CAAmB;QAC3B,0BAAW;GAXpC,WAAW,CA6JvB"}
@@ -30,7 +30,7 @@ let DeviceTokenService = class DeviceTokenService {
30
30
  try {
31
31
  return await record.save();
32
32
  }
33
- catch (error) {
33
+ catch {
34
34
  return this.setDeviceToken(req, body);
35
35
  }
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"device.token.service.js","sourceRoot":"","sources":["../../../src/auth/services/device.token.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,yDAA0D;AAC1D,sDAAmD;AACnD,gEAA4D;AAC5D,yEAAoE;AAS7D,IAAM,kBAAkB,GAAxB,MAAM,kB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+35,7 @@ let SocialService = class SocialService {
35
35
  try {
36
36
  return await this.remoteRequestService.sendThroughAxios(options);
37
37
  }
38
- catch (e) {
38
+ catch {
39
39
  return false;
40
40
  }
41
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"social.service.js","sourceRoot":"","sources":["../../../src/auth/services/social.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oGAA+F;AASxF,IAAM,aAAa,GAAnB,MAAM,aAAa;IAKtB,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAO3E,KAAK,CAAC,OAAO,CAAC,KAAa;QACvB,MAAM,GAAG,GAAG,mGAAmG,GAAG,KAAK,CAAC;QACxH,MAAM,OAAO,GAAQ;YACjB,MAAM,EAAE,KAAK;YACb,GAAG;SACN,CAAC;QACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC3E,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAQD,KAAK,CAAC,WAAW,CAAC,KAAa,EAAE,WAAoB,IAAI;QACrD,IAAI,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,kDAAkD,CAAC,CAAC,CAAC,6DAA6D,CAAC;QAExI,GAAG,GAAG,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;QAExB,MAAM,OAAO,GAAQ;YACjB,MAAM,EAAE,KAAK;YACb,GAAG;SACN,CAAC;QAEF,IAAI,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACrE,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;CACJ,CAAA;AA5CY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAM0C,6CAAoB;GAL9D,aAAa,CA4CzB"}
1
+ {"version":3,"file":"social.service.js","sourceRoot":"","sources":["../../../src/auth/services/social.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oGAA+F;AASxF,IAAM,aAAa,GAAnB,MAAM,aAAa;IAKtB,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAO3E,KAAK,CAAC,OAAO,CAAC,KAAa;QACvB,MAAM,GAAG,GAAG,mGAAmG,GAAG,KAAK,CAAC;QACxH,MAAM,OAAO,GAAQ;YACjB,MAAM,EAAE,KAAK;YACb,GAAG;SACN,CAAC;QACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC3E,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAQD,KAAK,CAAC,WAAW,CAAC,KAAa,EAAE,WAAoB,IAAI;QACrD,IAAI,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,kDAAkD,CAAC,CAAC,CAAC,6DAA6D,CAAC;QAExI,GAAG,GAAG,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;QAExB,MAAM,OAAO,GAAQ;YACjB,MAAM,EAAE,KAAK;YACb,GAAG;SACN,CAAC;QAEF,IAAI,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACrE,CAAC;QAAC,MAAM,CAAC;YACL,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;CACJ,CAAA;AA5CY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAM0C,6CAAoB;GAL9D,aAAa,CA4CzB"}
@@ -1,4 +1,4 @@
1
- export declare class CaptureRecordIndexDto<T> {
1
+ export declare class CaptureRecordIndexDto {
2
2
  query: string;
3
3
  page: number;
4
4
  limit: number;
@@ -1 +1 @@
1
- {"version":3,"file":"capture.record.index.dto.js","sourceRoot":"","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
@@ -1,5 +1,5 @@
1
1
  import { CommonJob } from './common.job';
2
- export declare class CommonMapperJob<T> extends CommonJob {
2
+ export declare class CommonMapperJob extends CommonJob {
3
3
  protected mapping: {};
4
4
  protected baseColumn: string;
5
5
  handle(data: any): Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"common.mapper.job.js","sourceRoot":"","sources":["../../../src/common/libraries/common.mapper.job.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAUzC,MAAa,eAAmB,SAAQ,sBAAS;IAAjD;;QAOc,YAAO,GAAG,EAAE,CAAC;QAOb,eAAU,GAAG,EAAE,CAAC;IA+C9B,CAAC;IAvCG,KAAK,CAAC,MAAM,CAAC,IAAS;QAClB,IAAI,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAErD,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAOD,KAAK,CAAC,UAAU,CAAC,IAAS;QACtB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO;YAAE,OAAO;QAErB,MAAM,MAAM,GAAG,EAAE,CAAC;QAElB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;QAClC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QAExC,OAAO,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;IAOD,KAAK,CAAC,aAAa,CAAC,IAAS;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO;YAAE,OAAO;QAErB,MAAM,MAAM,GAAG,EAAE,CAAC;QAElB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,GAA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AAC,UAAU,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;QAClC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QAExC,OAAO,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;CACJ;AA7DD,0CA6DC"}
@@ -17,7 +17,7 @@ export declare class CommonSubscriber<T> implements EntitySubscriberInterface<T>
17
17
  private handleFloatColumn;
18
18
  private handleNumberColumn;
19
19
  private handleBooleanColumn;
20
- afterRemove(event: RemoveEvent<T>): Promise<void>;
20
+ afterRemove(_event: RemoveEvent<T>): Promise<void>;
21
21
  isColumnUpdated(event: any, column: any): boolean;
22
22
  isNewRecord(event: any): boolean;
23
23
  protected isSoftRemoved(event: any): boolean;