Skip to content

Conversation

@pavliuc75
Copy link
Contributor

No description provided.

Copy link

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 adds support for researcher assistant management in the Study client, extends recruitment listing with sorting, and updates versioning and changelog.

  • Introduce addResearcherAssistantToStudy, getStudyResearcherAssistants, and removeResearcherAssistantFromStudy methods; deprecate related researcher endpoints.
  • Add is_descending parameter to participant accounts API and update its test.
  • Bump package version to 2.0.9 and document changes in CHANGELOG.md.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/test/endpoints/study/study.test.ts Added tests for adding/removing researcher assistants
src/test/endpoints/study/recruitment.test.ts Updated recruitment test to include is_descending
src/endpoints/study/researchers.ts Introduced researcher assistant endpoints and deprecations
src/endpoints/study/recruitment.ts Added is_descending parameter to participant accounts
package.json Bumped client version from 2.0.7 to 2.0.9
CHANGELOG.md Documented new endpoints, deprecations, and parameter change
Comments suppressed due to low confidence (7)

src/endpoints/study/researchers.ts:37

  • JSDoc for addResearcherAssistantToStudy is missing a @returns annotation. Consider adding @returns to clarify the method's return value (void).
  async addResearcherAssistantToStudy({

src/endpoints/study/researchers.ts:109

  • JSDoc for removeResearcherAssistantFromStudy is missing a @returns annotation. Consider adding @returns to document the method's return type.
  async removeResearcherAssistantFromStudy({

src/endpoints/study/recruitment.ts:84

  • The JSDoc for this method isn't updated to include the new is_descending parameter. Please add a @param description for is_descending.
    is_descending,

src/test/endpoints/study/recruitment.test.ts:151

  • The test adds is_descending but only asserts that the response is defined; consider adding assertions to verify that the results are returned in descending order to fully cover the new behavior.
        is_descending: false,

CHANGELOG.md:10

  • [nitpick] The release date for version 2.0.8 is the same as 2.0.9, which may cause confusion. Consider adjusting the dates to reflect the correct release order.
## [2.0.8] - 2025-06-25

src/test/endpoints/study/study.test.ts:226

  • [nitpick] In the researcher assistant test, the variable researcher refers to an assistant. Rename it to researcherAssistant for clarity.
    const researcher = researcherAssistants.find(

src/endpoints/study/researchers.ts:8

  • [nitpick] The @deprecated tag has an unnecessary trailing period and lacks guidance on the alternative. You may want to update to @deprecated Use addResearcherAssistantToStudy instead.
   * @deprecated.

@github-actions
Copy link

github-actions bot commented Jul 7, 2025

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 92.38% (🎯 80%) 1578 / 1708
🟢 Statements 92.38% (🎯 80%) 1578 / 1708
🟢 Functions 90.08% (🎯 80%) 109 / 121
🟢 Branches 92.85% (🎯 80%) 143 / 154
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/client/carpClient.ts 91.25% 81.81% 87.5% 91.25% 50-53, 88, 100-101
src/client/index.ts 0% 0% 0% 0% 1
src/endpoints/accounts.ts 60.86% 100% 75% 60.86% 11-21
src/endpoints/auth.ts 100% 100% 100% 100%
src/endpoints/index.ts 100% 100% 100% 100%
src/endpoints/study/deployments.ts 100% 100% 100% 100%
src/endpoints/study/exports.ts 88.88% 80% 80% 88.88% 34, 67-70
src/endpoints/study/recruitment.ts 88.58% 85.71% 84.61% 88.58% 113-135, 190-195, 303
src/endpoints/study/researchers.ts 100% 100% 100% 100%
src/shared/utils.ts 63.23% 75% 66.66% 63.23% 48-72
src/shared/models/general.ts 100% 100% 100% 100%
src/shared/models/studies.ts 100% 100% 100% 100%
Generated in workflow #54 for commit a87b79b by the Vitest Coverage Report Action

…nhance error handling in accounts and exports

Refactor imports and enhance Accounts endpoint; add Collections tests for document management

Update version to 2.1.0-dev.2 and refactor test imports to use CarpTestClient

Update version to 2.1.0-dev.3 and enhance build script; add TODO for refactoring token casting

Bump version to 2.1.0-dev.4; remove unused Auth import from index.ts and update import in CarpTestClient

Bump version to 2.1.0-dev.5; refactor CarpClient to use readonly instance and add CarpTestClient for authentication; update imports and fix return type in Accounts endpoint
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.

3 participants