Skip to content

Add format as an optional param to submitGuestbook for download use cases#435

Open
ekraffmiller wants to merge 3 commits intodevelopfrom
434-format-option-for-download-usecases
Open

Add format as an optional param to submitGuestbook for download use cases#435
ekraffmiller wants to merge 3 commits intodevelopfrom
434-format-option-for-download-usecases

Conversation

@ekraffmiller
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR closes:

Related Dataverse PRs:

  • Depends on #

Special notes for your reviewer:

Suggestions on how to test this:

Is there a release notes or changelog update needed for this change?:

Additional documentation:

@ekraffmiller ekraffmiller marked this pull request as ready for review March 24, 2026 20:12
Copilot AI review requested due to automatic review settings March 24, 2026 20:12
@ekraffmiller ekraffmiller added GREI Re-arch GREI re-architecture-related FY25 Sprint 19 FY25 Sprint 19 (2025-03-12 - 2025-03-26) Size: 3 A percentage of a sprint. 2.1 hours. labels Mar 24, 2026
@ekraffmiller ekraffmiller moved this to Ready for Review ⏩ in IQSS Dataverse Project Mar 24, 2026
Copy link
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

Adds an optional format parameter to the access “submit guestbook for download” flow so callers can request specific download formats (per #434), and verifies the signed URL retains the requested format.

Changes:

  • Plumbs an optional format?: string argument through access download use cases, repository interface, and repository implementation.
  • Updates AccessRepository POST query params to include format when provided.
  • Expands unit and integration tests to cover format propagation/preservation.

Reviewed changes

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

Show a summary per file
File Description
test/unit/access/SubmitGuestbookDownloads.test.ts Adds unit tests asserting format is forwarded (and undefined when omitted).
test/integration/access/AccessRepository.test.ts Adds integration coverage ensuring format is preserved in the signed URL.
src/access/infra/repositories/AccessRepository.ts Adds format support to access download API calls via query params.
src/access/domain/useCases/SubmitGuestbookForDatasetVersionDownload.ts Adds optional format to the use case execution path.
src/access/domain/useCases/SubmitGuestbookForDatasetDownload.ts Adds optional format to the use case execution path.
src/access/domain/useCases/SubmitGuestbookForDatafilesDownload.ts Adds optional format to the use case execution path.
src/access/domain/useCases/SubmitGuestbookForDatafileDownload.ts Adds optional format to the use case execution path.
src/access/domain/repositories/IAccessRepository.ts Extends repository contract with optional format across download methods.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -22,15 +25,18 @@ export class AccessRepository extends ApiRepository implements IAccessRepository

public async submitGuestbookForDatafilesDownload(
fileIds: Array<number>,
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

The fileIds parameter type here is narrower than the interface (IAccessRepository allows string | Array<number | string>). This makes Array.isArray(fileIds) effectively dead-code from a typing perspective and prevents callers using AccessRepository directly from passing a comma-separated string. Update this method signature (and any related typing) to match IAccessRepository and keep the Array.isArray branch meaningful.

Suggested change
fileIds: Array<number>,
fileIds: string | Array<number | string>,

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@ChengShi-1 ChengShi-1 left a comment

Choose a reason for hiding this comment

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

Thank you for changes here. It looks good

@github-project-automation github-project-automation bot moved this from Ready for Review ⏩ to Ready for QA ⏩ in IQSS Dataverse Project Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY25 Sprint 19 FY25 Sprint 19 (2025-03-12 - 2025-03-26) GREI Re-arch GREI re-architecture-related Project: HDV SPA Rollout Size: 3 A percentage of a sprint. 2.1 hours.

Projects

Status: Ready for QA ⏩

Development

Successfully merging this pull request may close these issues.

Add format param to submit guestbook for download use cases

3 participants