chore(root): upgrade NestJS to 11.1.18 and align ecosystem packages#10584
chore(root): upgrade NestJS to 11.1.18 and align ecosystem packages#10584
Conversation
✅ Deploy Preview for dashboard-v2-novu-staging canceled.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR upgrades NestJS packages to v11 across the monorepo, adjusts related package.json fields and pnpm overrides, updates a few import paths and typings, refines Swagger/OpenAPI decorators, adds explicit Express query-parser configuration, and tweaks Passport ApiKeyStrategy verification to expose a public validate method. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hey there and thank you for opening this pull request! 👋 We require pull request titles to follow specific formatting rules and it looks like your proposed title needs to be adjusted. Your PR title is: Requirements:
Expected format: Details: PR title must end with 'fixes TICKET-ID' (e.g., 'fixes NOV-123') or include ticket ID in branch name |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (8)
libs/application-generic/src/dtos/workflow/generate-preview-response.dto.ts (2)
126-136:additionalProperties: trueis inaccurate for this closed type.The
lookBackWindowproperty has a fixed structure with onlyamountandunit(as confirmed by theLookBackWindowDtodefinition). AddingadditionalProperties: truemisrepresents the schema as accepting arbitrary extra fields.Consider referencing the existing DTO class instead of an inline type, which would provide accurate schema documentation:
Proposed fix
`@ApiPropertyOptional`({ description: 'Look back window configuration', - type: 'object', - additionalProperties: true, + type: () => LookBackWindowDto, }) `@IsOptional`() `@ValidateNested`() + `@Type`(() => LookBackWindowDto) lookBackWindow?: { amount: number; unit: TimeUnitEnum; };This requires importing
LookBackWindowDtofrom./controls/look-back-window.dto.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/application-generic/src/dtos/workflow/generate-preview-response.dto.ts` around lines 126 - 136, Replace the inline anonymous type and inaccurate ApiPropertyOptional additionalProperties setting for lookBackWindow with a reference to the existing DTO: use `@ApiPropertyOptional`({ type: LookBackWindowDto }) (and keep `@IsOptional`() and `@ValidateNested`()) and change the property type to LookBackWindowDto; import LookBackWindowDto from ./controls/look-back-window.dto so the OpenAPI schema only allows the defined amount and unit fields.
257-321: Schema permits extra properties that TypeScript union doesn't allow.Similar to other DTOs in this PR,
additionalProperties: trueat line 260 opens the schema to arbitrary properties, while the TypeScript union type (lines 322-367) defines closed variants with specific fields. The firstoneOfvariant (lines 263-265) being a generic{ type: 'object', additionalProperties: true }already serves as a catch-all.If this is a workaround for Swagger v11 compatibility issues mentioned in the PR objectives, a brief comment would help future maintainers understand the intent.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/application-generic/src/dtos/workflow/generate-preview-response.dto.ts` around lines 257 - 321, The ApiProperty schema for the Preview result is overly permissive: remove the top-level additionalProperties: true and delete (or tighten) the generic oneOf variant that is just { type: 'object', additionalProperties: true } so the OpenAPI oneOf matches the closed TypeScript union; if this permissiveness is intentional for Swagger v11 compatibility, replace the generic variant with a clear inline comment in generate-preview-response.dto.ts next to the ApiProperty decorator explaining the workaround and the reason for allowing extra properties so future maintainers understand the intent.apps/api/src/app/layouts-v2/dtos/generate-layout-preview-response.dto.ts (1)
33-49: Schema permits extra properties that TypeScript type doesn't allow.The TypeScript type for
result(lines 46-49) is a closed object with onlytypeandpreviewproperties, butadditionalProperties: truedeclares the OpenAPI schema as open-ended. This mismatch could mislead API consumers into thinking arbitrary properties are accepted.If this is a necessary workaround for Swagger v11 compatibility, consider adding a brief comment explaining why. Otherwise, the TypeScript type and schema should be aligned.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/api/src/app/layouts-v2/dtos/generate-layout-preview-response.dto.ts` around lines 33 - 49, The OpenAPI decorator for the result property declares additionalProperties: true but the TypeScript type for result is a closed object (type: ChannelTypeEnum.EMAIL; preview?: EmailLayoutRenderOutput), causing a schema/type mismatch; fix by either removing additionalProperties from the `@ApiProperty` options to make the OpenAPI schema closed, or broaden the TS type to allow arbitrary props (e.g., add an index signature) so it matches the decorator; if additionalProperties: true is required as a Swagger v11 workaround, add a brief inline comment next to the `@ApiProperty` explaining that constraint and reference the result type, ChannelTypeEnum, and EmailLayoutRenderOutput to make intent clear.apps/api/src/app/shared/dtos/subscriptions/create-subscriptions-response.dto.ts (1)
140-146: Pre-existing optionality mismatch.
SubscriptionResponseDto.identifieris marked as optional in TypeScript (identifier?: string) and has@IsOptional(), but uses@ApiPropertyinstead of@ApiPropertyOptional.Proposed fix
- `@ApiProperty`({ + `@ApiPropertyOptional`({ description: 'The identifier of the subscription', example: 'tk=product-updates:si=subscriber-123', }) `@IsString`() `@IsOptional`() identifier?: string;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/api/src/app/shared/dtos/subscriptions/create-subscriptions-response.dto.ts` around lines 140 - 146, The ApiProperty decorator on the optional property identifier should be changed to ApiPropertyOptional to match its TypeScript optionality and `@IsOptional`() usage; update the decorator on the identifier field (in the CreateSubscriptionsResponseDto / SubscriptionResponseDto property named identifier) and ensure ApiPropertyOptional is imported from `@nestjs/swagger` instead of or in addition to ApiProperty.apps/api/src/app/shared/dtos/subscriptions/create-subscriptions.dto.ts (1)
72-90: Pre-existing optionality mismatches in unchanged code.Several optional properties still use
@ApiPropertyinstead of@ApiPropertyOptional:
GroupPreferenceFilterDetailsDto.workflowIds?(Line 72)GroupPreferenceFilterDetailsDto.tags?(Line 82)CreateSubscriptionsRequestDto.subscriberIds?(Line 106)CreateSubscriptionsRequestDto.name?(Line 138)CreateSubscriptionsRequestDto.preferences?(Line 146)Consider addressing these for consistency with the coding guidelines in a follow-up.
Also applies to: 106-118, 138-144, 146-161
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/api/src/app/shared/dtos/subscriptions/create-subscriptions.dto.ts` around lines 72 - 90, The DTOs declare optional fields but still use `@ApiProperty`; update the decorators to `@ApiPropertyOptional` for GroupPreferenceFilterDetailsDto.workflowIds, GroupPreferenceFilterDetailsDto.tags, CreateSubscriptionsRequestDto.subscriberIds, CreateSubscriptionsRequestDto.name, and CreateSubscriptionsRequestDto.preferences so the OpenAPI spec reflects optionality; locate those properties in create-subscriptions.dto and replace the `@ApiProperty` imports/usages with `@ApiPropertyOptional` while keeping the existing description/type/example/validation metadata unchanged.apps/api/src/app/widgets/dtos/feeds-response.dto.ts (1)
48-53: Pre-existing reverse optionality mismatch.
NotificationFeedItemDto._messageTemplateIdis marked as required in TypeScript (no?) but uses@ApiPropertyOptional, which implies it's optional in the OpenAPI schema. If the field is truly required, it should use@ApiProperty.Proposed fix (if field is required)
- `@ApiPropertyOptional`({ + `@ApiProperty`({ description: 'Identifier for the message template used.', example: 'message_template_54321', type: String, }) _messageTemplateId: string;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/api/src/app/widgets/dtos/feeds-response.dto.ts` around lines 48 - 53, NotificationFeedItemDto._messageTemplateId is declared as required in TypeScript but annotated with `@ApiPropertyOptional`; make the TypeScript and OpenAPI annotations consistent by either changing `@ApiPropertyOptional` to `@ApiProperty` on _messageTemplateId if the field is required, or by making the property optional (add a ?) if it truly is optional; update the decorator on the _messageTemplateId property accordingly to keep the TS type and the OpenAPI metadata in sync.libs/application-generic/src/dtos/step-filter-dto.ts (1)
117-124: Pre-existing optionality mismatch between decorators and TypeScript properties.The
isNegatedandtypeproperties are marked as optional in TypeScript (?) but use@ApiPropertywhich implies they are required in the OpenAPI schema. As per coding guidelines, these should use@ApiPropertyOptionalinstead.This is a pre-existing issue, but since this file was touched, consider fixing it for consistency.
Proposed fix
export class StepFilterDto { - `@ApiProperty`() + `@ApiPropertyOptional`() isNegated?: boolean; - `@ApiProperty`({ + `@ApiPropertyOptional`({ enum: ['BOOLEAN', 'TEXT', 'DATE', 'NUMBER', 'STATEMENT', 'LIST', 'MULTI_LIST', 'GROUP'], enumName: 'BuilderFieldTypeEnum', }) type?: BuilderFieldType;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/application-generic/src/dtos/step-filter-dto.ts` around lines 117 - 124, The OpenAPI decorators for the optional properties are incorrect: replace `@ApiProperty` with `@ApiPropertyOptional` for the optional fields isNegated and type so the generated schema matches the TypeScript optionality; update the decorator on isNegated to `@ApiPropertyOptional`() and change the type property decorator to `@ApiPropertyOptional`({ enum: ['BOOLEAN','TEXT','DATE','NUMBER','STATEMENT','LIST','MULTI_LIST','GROUP'], enumName: 'BuilderFieldTypeEnum' }) while leaving the TypeScript definitions (isNegated?: boolean and type?: BuilderFieldType) unchanged.apps/api/src/app/auth/services/passport/apikey.strategy.ts (1)
31-44: Drop the no-opcatchand align the early return with repo style.The
catchblock just rethrows, so it doesn't change control flow. Line 36 also misses the repo-required blank line beforereturn.♻️ Proposed simplification
async validate(apiKey: string): Promise<UserSessionData | false> { - try { - const user = await this.validateApiKey(apiKey); + const user = await this.validateApiKey(apiKey); - if (!user) { - return false; - } + if (!user) { + + return false; + } - addNewRelicTraceAttributes(user); + addNewRelicTraceAttributes(user); - return user; - } catch (err) { - throw err; - } + + return user; }As per coding guidelines, "Include a blank line before every
returnstatement."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/api/src/app/auth/services/passport/apikey.strategy.ts` around lines 31 - 44, Remove the no-op try/catch from the async validate method and follow repo style by adding a blank line before each return; specifically, in the validate(apiKey: string) method drop the surrounding try { ... } catch (err) { throw err; }, call await this.validateApiKey(apiKey) and if (!user) add a blank line then return false, call addNewRelicTraceAttributes(user), add a blank line and then return user; use the validateApiKey and addNewRelicTraceAttributes symbols to locate the code to update.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Around line 287-299: The packageExtensions block is forcing NestJS 11
compatibility for third-party packages—specifically it formalizes existing
support for `@sentry/nestjs`@^8.0.0 but also forces nest-raven@10.1.0 (and earlier
nest-raven 9.2.0) to accept ^11.0.0 without official support; either upgrade
nest-raven to a release that officially lists ^11.0.0 in its peerDependencies or
remove the nest-raven@10.1.0 packageExtensions entry and instead add an inline
comment/documentation stating the compatibility risk, keeping the
`@sentry/nestjs`@^8.0.0 extension as-is if it truly supports NestJS 11. Ensure you
change the packageExtensions entry for nest-raven (or drop it) and document the
decision so future maintainers know why compatibility was forced or why upgrade
was required.
---
Nitpick comments:
In `@apps/api/src/app/auth/services/passport/apikey.strategy.ts`:
- Around line 31-44: Remove the no-op try/catch from the async validate method
and follow repo style by adding a blank line before each return; specifically,
in the validate(apiKey: string) method drop the surrounding try { ... } catch
(err) { throw err; }, call await this.validateApiKey(apiKey) and if (!user) add
a blank line then return false, call addNewRelicTraceAttributes(user), add a
blank line and then return user; use the validateApiKey and
addNewRelicTraceAttributes symbols to locate the code to update.
In `@apps/api/src/app/layouts-v2/dtos/generate-layout-preview-response.dto.ts`:
- Around line 33-49: The OpenAPI decorator for the result property declares
additionalProperties: true but the TypeScript type for result is a closed object
(type: ChannelTypeEnum.EMAIL; preview?: EmailLayoutRenderOutput), causing a
schema/type mismatch; fix by either removing additionalProperties from the
`@ApiProperty` options to make the OpenAPI schema closed, or broaden the TS type
to allow arbitrary props (e.g., add an index signature) so it matches the
decorator; if additionalProperties: true is required as a Swagger v11
workaround, add a brief inline comment next to the `@ApiProperty` explaining that
constraint and reference the result type, ChannelTypeEnum, and
EmailLayoutRenderOutput to make intent clear.
In
`@apps/api/src/app/shared/dtos/subscriptions/create-subscriptions-response.dto.ts`:
- Around line 140-146: The ApiProperty decorator on the optional property
identifier should be changed to ApiPropertyOptional to match its TypeScript
optionality and `@IsOptional`() usage; update the decorator on the identifier
field (in the CreateSubscriptionsResponseDto / SubscriptionResponseDto property
named identifier) and ensure ApiPropertyOptional is imported from
`@nestjs/swagger` instead of or in addition to ApiProperty.
In `@apps/api/src/app/shared/dtos/subscriptions/create-subscriptions.dto.ts`:
- Around line 72-90: The DTOs declare optional fields but still use
`@ApiProperty`; update the decorators to `@ApiPropertyOptional` for
GroupPreferenceFilterDetailsDto.workflowIds,
GroupPreferenceFilterDetailsDto.tags,
CreateSubscriptionsRequestDto.subscriberIds, CreateSubscriptionsRequestDto.name,
and CreateSubscriptionsRequestDto.preferences so the OpenAPI spec reflects
optionality; locate those properties in create-subscriptions.dto and replace the
`@ApiProperty` imports/usages with `@ApiPropertyOptional` while keeping the existing
description/type/example/validation metadata unchanged.
In `@apps/api/src/app/widgets/dtos/feeds-response.dto.ts`:
- Around line 48-53: NotificationFeedItemDto._messageTemplateId is declared as
required in TypeScript but annotated with `@ApiPropertyOptional`; make the
TypeScript and OpenAPI annotations consistent by either changing
`@ApiPropertyOptional` to `@ApiProperty` on _messageTemplateId if the field is
required, or by making the property optional (add a ?) if it truly is optional;
update the decorator on the _messageTemplateId property accordingly to keep the
TS type and the OpenAPI metadata in sync.
In `@libs/application-generic/src/dtos/step-filter-dto.ts`:
- Around line 117-124: The OpenAPI decorators for the optional properties are
incorrect: replace `@ApiProperty` with `@ApiPropertyOptional` for the optional
fields isNegated and type so the generated schema matches the TypeScript
optionality; update the decorator on isNegated to `@ApiPropertyOptional`() and
change the type property decorator to `@ApiPropertyOptional`({ enum:
['BOOLEAN','TEXT','DATE','NUMBER','STATEMENT','LIST','MULTI_LIST','GROUP'],
enumName: 'BuilderFieldTypeEnum' }) while leaving the TypeScript definitions
(isNegated?: boolean and type?: BuilderFieldType) unchanged.
In `@libs/application-generic/src/dtos/workflow/generate-preview-response.dto.ts`:
- Around line 126-136: Replace the inline anonymous type and inaccurate
ApiPropertyOptional additionalProperties setting for lookBackWindow with a
reference to the existing DTO: use `@ApiPropertyOptional`({ type:
LookBackWindowDto }) (and keep `@IsOptional`() and `@ValidateNested`()) and change
the property type to LookBackWindowDto; import LookBackWindowDto from
./controls/look-back-window.dto so the OpenAPI schema only allows the defined
amount and unit fields.
- Around line 257-321: The ApiProperty schema for the Preview result is overly
permissive: remove the top-level additionalProperties: true and delete (or
tighten) the generic oneOf variant that is just { type: 'object',
additionalProperties: true } so the OpenAPI oneOf matches the closed TypeScript
union; if this permissiveness is intentional for Swagger v11 compatibility,
replace the generic variant with a clear inline comment in
generate-preview-response.dto.ts next to the ApiProperty decorator explaining
the workaround and the reason for allowing extra properties so future
maintainers understand the intent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 79c4737b-fae0-44ad-a102-51250ea20c2c
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (45)
.sourceapps/api/package.jsonapps/api/scripts/generate-metadata.tsapps/api/src/app/auth/framework/community.user.auth.guard.tsapps/api/src/app/auth/services/passport/apikey.strategy.tsapps/api/src/app/contexts/dtos/create-context-request.dto.tsapps/api/src/app/contexts/dtos/update-context-request.dto.tsapps/api/src/app/events/dtos/trigger-event-request.dto.tsapps/api/src/app/events/dtos/trigger-event-to-all-request.dto.tsapps/api/src/app/layouts-v2/dtos/generate-layout-preview-response.dto.tsapps/api/src/app/notifications/dtos/activities-response.dto.tsapps/api/src/app/shared/dtos/subscriptions/create-subscriptions-response.dto.tsapps/api/src/app/shared/dtos/subscriptions/create-subscriptions.dto.tsapps/api/src/app/shared/framework/response.interceptor.tsapps/api/src/app/shared/framework/user.decorator.tsapps/api/src/app/subscribers-v2/dtos/get-subscriber-notifications-response.dto.tsapps/api/src/app/subscribers-v2/dtos/subscriber-notification-action.dto.tsapps/api/src/app/subscribers-v2/subscribers.controller.tsapps/api/src/app/subscribers/subscribersV1.controller.tsapps/api/src/app/widgets/dtos/feeds-response.dto.tsapps/api/src/app/widgets/widgets.controller.tsapps/api/src/bootstrap.tsapps/api/src/config/cors.config.tsapps/api/src/error-dto.tsapps/webhook/src/shared/framework/user.decorator.tsapps/worker/package.jsonapps/worker/src/app/shared/response.interceptor.tsapps/worker/src/bootstrap.tsapps/ws/package.jsonapps/ws/src/bootstrap.tsenterprise/packages/ai/package.jsonenterprise/packages/api/package.jsonenterprise/packages/auth/package.jsonenterprise/packages/billing/package.jsonenterprise/packages/shared-services/package.jsonenterprise/packages/translation/package.jsonlibs/application-generic/package.jsonlibs/application-generic/src/decorators/context-payload.decorator.tslibs/application-generic/src/decorators/user-session.decorator.tslibs/application-generic/src/dtos/step-filter-dto.tslibs/application-generic/src/dtos/workflow/generate-preview-response.dto.tslibs/application-generic/src/webhooks/dtos/webhook-payload.dto.tslibs/dal/package.jsonpackage.jsonpackages/framework/package.json
💤 Files with no reviewable changes (2)
- apps/api/src/app/notifications/dtos/activities-response.dto.ts
- apps/api/src/app/events/dtos/trigger-event-to-all-request.dto.ts
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/api/src/app/shared/framework/swagger/swagger.controller.ts (1)
28-129: Consider extracting the inline type to an interface.The tag definition type is used inline. Per coding guidelines for backend TypeScript files, prefer
interfacefor type definitions:interface OpenApiTagDefinition { name: string; description: string; docUrl?: string; } const OPEN_API_TAG_DEFINITIONS: ReadonlyArray<OpenApiTagDefinition> = [ // ... ];This improves reusability and documentation if the type needs to be referenced elsewhere.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/api/src/app/shared/framework/swagger/swagger.controller.ts` around lines 28 - 129, Extract the inline object type into a named interface (e.g., OpenApiTagDefinition) and update the OPEN_API_TAG_DEFINITIONS declaration to use ReadonlyArray<OpenApiTagDefinition>; specifically add an interface declaration with fields name: string, description: string, docUrl?: string, then replace the current inline type on OPEN_API_TAG_DEFINITIONS with the new interface to improve reusability and clarity.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@apps/api/src/app/shared/framework/swagger/swagger.controller.ts`:
- Around line 28-129: Extract the inline object type into a named interface
(e.g., OpenApiTagDefinition) and update the OPEN_API_TAG_DEFINITIONS declaration
to use ReadonlyArray<OpenApiTagDefinition>; specifically add an interface
declaration with fields name: string, description: string, docUrl?: string, then
replace the current inline type on OPEN_API_TAG_DEFINITIONS with the new
interface to improve reusability and clarity.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f247aeac-b21c-4ac0-a2fb-5bec33a3c52d
📒 Files selected for processing (2)
apps/api/src/app/environments-v1/dtos/create-environment-request.dto.tsapps/api/src/app/shared/framework/swagger/swagger.controller.ts
✅ Files skipped from review due to trivial changes (1)
- apps/api/src/app/environments-v1/dtos/create-environment-request.dto.ts
- Bump @nestjs/*, Swagger 11, Passport 11, and related typings across api, worker, ws, and shared packages - Adapt API for Swagger v11, Express 5 query parsing, and Passport API key strategy validate() - Document pnpm packageExtensions for nest-raven and @sentry/nestjs peer ranges - Keep enterprise ee packages on .source symlinks (no vendored src under enterprise/packages)
b513683 to
b9daaba
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
libs/application-generic/src/dtos/step-filter-dto.ts (1)
117-124: Pre-existing ApiProperty/ApiPropertyOptional misalignments.While not introduced by this PR, these properties have misaligned decorators:
isNegated?: boolean(line 118) andtype?: BuilderFieldType(line 124) are optional (?) but use@ApiPropertyinstead of@ApiPropertyOptionalwebhookUrl: string(line 57) is required (no?) but uses@ApiPropertyOptionalinstead of@ApiPropertyConsider addressing these in a follow-up to maintain OpenAPI schema accuracy.
Suggested fixes
export class WebhookFilterPartDto extends BaseFieldFilterPart { `@ApiProperty`({ enum: [FilterPartTypeEnum.WEBHOOK], }) on: FilterPartTypeEnum.WEBHOOK; - `@ApiPropertyOptional`() + `@ApiProperty`() webhookUrl: string; }export class StepFilterDto { - `@ApiProperty`() + `@ApiPropertyOptional`() isNegated?: boolean; - `@ApiProperty`({ + `@ApiPropertyOptional`({ enum: ['BOOLEAN', 'TEXT', 'DATE', 'NUMBER', 'STATEMENT', 'LIST', 'MULTI_LIST', 'GROUP'], enumName: 'BuilderFieldTypeEnum', }) type?: BuilderFieldType;As per coding guidelines: "Align
ApiProperty/ApiPropertyOptionaldecorators with TypeScript optional properties (?) in DTO files."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/application-generic/src/dtos/step-filter-dto.ts` around lines 117 - 124, Update the OpenAPI decorators to match the TypeScript optionality: change the decorator on isNegated (property name isNegated) and on type (property name type of type BuilderFieldType) from `@ApiProperty` to `@ApiPropertyOptional` since both are optional (marked with ?), and change the decorator on webhookUrl (property name webhookUrl) from `@ApiPropertyOptional` to `@ApiProperty` because webhookUrl is required (no ?); ensure only the decorator changes and no other type/behavior is modified.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@libs/application-generic/src/dtos/step-filter-dto.ts`:
- Around line 117-124: Update the OpenAPI decorators to match the TypeScript
optionality: change the decorator on isNegated (property name isNegated) and on
type (property name type of type BuilderFieldType) from `@ApiProperty` to
`@ApiPropertyOptional` since both are optional (marked with ?), and change the
decorator on webhookUrl (property name webhookUrl) from `@ApiPropertyOptional` to
`@ApiProperty` because webhookUrl is required (no ?); ensure only the decorator
changes and no other type/behavior is modified.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: eff2fdbf-afe5-4872-b10d-a959fab2a5ef
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (46)
apps/api/package.jsonapps/api/scripts/generate-metadata.tsapps/api/src/app/auth/framework/community.user.auth.guard.tsapps/api/src/app/auth/services/passport/apikey.strategy.tsapps/api/src/app/contexts/dtos/create-context-request.dto.tsapps/api/src/app/contexts/dtos/update-context-request.dto.tsapps/api/src/app/environments-v1/dtos/create-environment-request.dto.tsapps/api/src/app/events/dtos/trigger-event-request.dto.tsapps/api/src/app/events/dtos/trigger-event-to-all-request.dto.tsapps/api/src/app/layouts-v2/dtos/generate-layout-preview-response.dto.tsapps/api/src/app/notifications/dtos/activities-response.dto.tsapps/api/src/app/shared/dtos/subscriptions/create-subscriptions-response.dto.tsapps/api/src/app/shared/dtos/subscriptions/create-subscriptions.dto.tsapps/api/src/app/shared/framework/response.interceptor.tsapps/api/src/app/shared/framework/swagger/swagger.controller.tsapps/api/src/app/shared/framework/user.decorator.tsapps/api/src/app/subscribers-v2/dtos/get-subscriber-notifications-response.dto.tsapps/api/src/app/subscribers-v2/dtos/subscriber-notification-action.dto.tsapps/api/src/app/subscribers-v2/subscribers.controller.tsapps/api/src/app/subscribers/subscribersV1.controller.tsapps/api/src/app/widgets/dtos/feeds-response.dto.tsapps/api/src/app/widgets/widgets.controller.tsapps/api/src/bootstrap.tsapps/api/src/config/cors.config.tsapps/api/src/error-dto.tsapps/webhook/src/shared/framework/user.decorator.tsapps/worker/package.jsonapps/worker/src/app/shared/response.interceptor.tsapps/worker/src/bootstrap.tsapps/ws/package.jsonapps/ws/src/bootstrap.tsenterprise/packages/ai/package.jsonenterprise/packages/api/package.jsonenterprise/packages/auth/package.jsonenterprise/packages/billing/package.jsonenterprise/packages/shared-services/package.jsonenterprise/packages/translation/package.jsonlibs/application-generic/package.jsonlibs/application-generic/src/decorators/context-payload.decorator.tslibs/application-generic/src/decorators/user-session.decorator.tslibs/application-generic/src/dtos/step-filter-dto.tslibs/application-generic/src/dtos/workflow/generate-preview-response.dto.tslibs/application-generic/src/webhooks/dtos/webhook-payload.dto.tslibs/dal/package.jsonpackage.jsonpackages/framework/package.json
💤 Files with no reviewable changes (2)
- apps/api/src/app/notifications/dtos/activities-response.dto.ts
- apps/api/src/app/events/dtos/trigger-event-to-all-request.dto.ts
✅ Files skipped from review due to trivial changes (28)
- apps/api/scripts/generate-metadata.ts
- apps/worker/src/app/shared/response.interceptor.ts
- apps/api/src/bootstrap.ts
- apps/api/src/app/subscribers-v2/subscribers.controller.ts
- apps/api/src/app/widgets/widgets.controller.ts
- apps/api/src/app/environments-v1/dtos/create-environment-request.dto.ts
- libs/dal/package.json
- apps/webhook/src/shared/framework/user.decorator.ts
- apps/api/src/app/shared/framework/response.interceptor.ts
- apps/api/src/app/contexts/dtos/create-context-request.dto.ts
- apps/api/src/app/shared/dtos/subscriptions/create-subscriptions-response.dto.ts
- apps/api/src/app/shared/framework/user.decorator.ts
- apps/api/src/config/cors.config.ts
- apps/api/src/app/events/dtos/trigger-event-request.dto.ts
- packages/framework/package.json
- apps/api/src/app/subscribers-v2/dtos/get-subscriber-notifications-response.dto.ts
- libs/application-generic/src/decorators/context-payload.decorator.ts
- enterprise/packages/api/package.json
- apps/api/src/app/subscribers-v2/dtos/subscriber-notification-action.dto.ts
- enterprise/packages/auth/package.json
- apps/api/src/app/widgets/dtos/feeds-response.dto.ts
- apps/api/src/app/shared/framework/swagger/swagger.controller.ts
- enterprise/packages/translation/package.json
- apps/worker/package.json
- apps/api/package.json
- enterprise/packages/billing/package.json
- libs/application-generic/package.json
- enterprise/packages/ai/package.json
🚧 Files skipped from review as they are similar to previous changes (12)
- apps/api/src/app/layouts-v2/dtos/generate-layout-preview-response.dto.ts
- apps/api/src/app/contexts/dtos/update-context-request.dto.ts
- libs/application-generic/src/decorators/user-session.decorator.ts
- libs/application-generic/src/webhooks/dtos/webhook-payload.dto.ts
- apps/api/src/app/auth/framework/community.user.auth.guard.ts
- apps/api/src/app/subscribers/subscribersV1.controller.ts
- apps/api/src/app/shared/dtos/subscriptions/create-subscriptions.dto.ts
- libs/application-generic/src/dtos/workflow/generate-preview-response.dto.ts
- apps/api/src/error-dto.ts
- apps/worker/src/bootstrap.ts
- apps/api/src/app/auth/services/passport/apikey.strategy.ts
- package.json
Bump submodule pointer to a new commit and fix enterprise/packages/shared-services/package.json to reference the compiled type declarations. Replaced the incorrect "types": "src/index.ts" entry with "typings": "build/main/index.d.ts" so consumers use the built .d.ts output.
Introduce normalizeBlob in encodings.ts to normalize blob-like values into real Blobs before appending to FormData. Update translationsMasterUpload.ts and translationsUpload.ts to call normalizeBlob and preserve original file.name when appending. Enable fixEnumNameSanitization in the speakeasy config and bump SDK generator metadata (genVersion and userAgent). Also update the postman generation lock accordingly.
Summary
NestJS 11 /
@nestjs/swaggerv11 upgrade with dependency pins and migration-guide follow-ups.validate-submodule-sync
.sourcetrackspackages-enterprise/next(b1d8f81).Enterprise / CI (TypeScript)
enterprise/packages/authandtranslation: vendoredsrc/(replacing symlinks into.source) so Passport v11 / Swagger fixes stay in-tree.@novu/ee-shared-services: vendoredsrc/pluspackage.json"types": "src/index.ts"(replacing typings that only existed underbuild/). FixesCannot find module '@novu/ee-shared-services'when CI runstscon dependents (e.g.@novu/ee-translation) beforeee-shared-servicesis built.OpenAPI lint (Spectral)
swagger.controller.ts.CreateEnvironmentRequestDto.colorexample uses uppercase hex (#3498DB).CodeQL (PR checks)
js/insufficient-password-hash:ee.auth.serviceuses SHA-256 for API key lookup identifiers (stored inapiKeys.hash), not password storage — documented with acodeql[js/insufficient-password-hash]suppression comment.js/polynomial-redos:Translate.replaceTranslationKeysno longer usesnew RegExp(..., 'gi').replaceon notification content; translation keys are found with a linear{{…t.…}}scanner (same shape asTRANSLATION_KEY_SINGLE_REGEX).Other fixes
Swagger
PRIMARYissue (explicit@ApiParamforButtonTypeEnumwhere inferred from@Param), etc.Docs
AGENTS.mdcoverspackageExtensions(nest-raven /@sentry/nestjs) and enterprise vendoredsrc/typeslayout.What changed
NestJS was upgraded from v10 to v11, along with aligned ecosystem packages (@nestjs/swagger v7/v11→v11.2.6, and corresponding updates to JWT, Passport, Axios, Terminus, Throttler, and CLI tooling). Enterprise packages were migrated from symlinks to vendored
src/directories to support Passport v11 and Swagger fixes. OpenAPI tags are now registered alphabetically, hex color examples use uppercase formatting, and@ApiPropertydecorators were replaced with@ApiPropertyOptionalwhere appropriate. TypeScript type casting was added for GraphQL context checks, and Express v5 compatibility was enabled by configuring the query parser to "extended" mode.Affected areas
api: Updated NestJS runtime and dev dependencies to v11; refactored auth guards, DTOs, and Swagger metadata; added Express query parser configuration and bootstrap type hints.
worker: Bumped NestJS and tooling versions to v11; updated response interceptor with GraphQL type casting and Express v5 query parser support.
ws: Upgraded NestJS packages to v11 including platform-socket.io and websockets; applied Express configuration changes in bootstrap.
webhook: Applied GraphQL context type casting in user decorator.
Enterprise packages (auth, billing, shared-services, translation, ai, api): Updated peer dependencies and type declaration fields; vendored
src/directories to replace symlinks; updated@novu/ee-shared-servicesto referencesrc/index.tsfor TypeScript resolution.shared libs (application-generic, dal, notifications, framework): Updated peer dependencies, Swagger import paths, and type declaration fields (renamed
typingstotypes).root: Added
pnpm.packageExtensionsfornest-ravenand@sentry/nestjsto support NestJS v11 peer dependency ranges; addedpnpm.ignoredBuiltDependenciesfor@scarf/scarf; pinned NestJS monorepo packages to explicit versions.Key technical decisions
typingstotypesacross package manifests to use the standard npm TypeScript convention.nest-ravenand@sentry/nestjsto broaden peer dependency acceptance across NestJS v10 and v11.Testing
No new tests were added. The upgrade aligns with NestJS v11 migration guidance and existing test suites should validate compatibility. Manual verification of API schema generation via Swagger/Spectral and enterprise package resolution would be recommended before merging.