Skip to content

release 20250505#384

Merged
marcbon merged 7 commits into
mainfrom
develop
May 5, 2025
Merged

release 20250505#384
marcbon merged 7 commits into
mainfrom
develop

Conversation

@marcbon
Copy link
Copy Markdown
Contributor

@marcbon marcbon commented Apr 30, 2025

No description provided.

sinatragianpaolo and others added 4 commits April 9, 2025 15:30
… better-sqlite3 to version 11.9.1

fix(routes): ensure productLink is always defined in dossier routes
refactor(tests): add link field to campaign test data
chore(deps): update @appquality/tryber-database to version 0.44.0 and better-sqlite3 to version 11.9.1
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2025

Tests difference:

New Tests

< GET /campaigns/:campaignId - Should not return plan if campaign plan does not exist
< GET /campaigns/:campaignId - Should return plan if exist

@marcbon marcbon marked this pull request as ready for review May 5, 2025 13:53
@marcbon marcbon requested a review from Copilot May 5, 2025 13:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new optional "plan" property to the campaign operations schema and adds corresponding support for it in various routes and tests.

  • Update schema interface with a new optional nested property "plan".
  • Modify multiple endpoints and tests (_put, _post, and _get) to incorporate a new "link" field and handle the new "plan" property.
  • Adjust unit tests to verify correct behavior when campaign plan data is present or absent.

Reviewed Changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/schema.ts Added an optional “plan” object in the operations interface
src/routes/users/me/campaigns/campaignId/forms/_get/visibility.spec.ts Added a new “link” field in test data
src/routes/users/me/campaigns/_get/target.spec.ts Added a new “link” field in test data
src/routes/users/me/campaigns/_get/cap.spec.ts Added a new “link” field in test data
src/routes/dossiers/campaignId/_put/index.ts Updated dossier PUT endpoint with a default empty string for “link” and re-ordered the import
src/routes/dossiers/_post/index.ts Updated dossier POST endpoint to assign “link” with a fallback value
src/routes/campaigns/campaignId/_get/index.ts Introduced a helper to fetch campaign plan and include it in the campaign response
src/routes/campaigns/campaignId/_get/index.spec.ts Updated tests to check for existence and absence of the “plan” field and ensure preselectionFormId is not returned when not applicable
Files not reviewed (2)
  • package.json: Language not supported
  • src/reference/openapi.yml: Language not supported
Comments suppressed due to low confidence (2)

src/routes/dossiers/campaignId/_put/index.ts:164

  • Review the change from a conditional assignment to an unconditional default assignment for 'link' to ensure it aligns with your API contract and client expectations.
link: "",

src/routes/dossiers/_post/index.ts:299

  • Ensure that defaulting 'link' to an empty string in the POST route is consistent with the API design and that the implications of omitting 'productLink' are well understood.
link: this.getBody().productLink || "",

Comment thread src/schema.ts
@marcbon marcbon merged commit 9b52abd into main May 5, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants