Skip to content

Access Requests API integration: consume /api/interactions/access-request #772

Description

@Seme30

Problem

The Next.js Request Access dialog already submits to POST /api/interactions/access-request, but the endpoint was previously unavailable. The frontend needs an integration pass against the new API contract so the access-request workflow is verified end to end.

Current gaps

  • No frontend test covers a successful access-request submission.
  • No frontend test covers the backend validation error returned when report name, URL, or director is missing.
  • No frontend test covers an unavailable or failed access-request service.
  • The request-access dialog needs verification that it retains the selected director and displays API failures clearly.
  • Existing report and collection access-request entry points need confirmation that they use the same native endpoint.

Frontend references

  • frontend/components/interactions/request-access-dialog.tsx
  • frontend/app/interactions/actions.ts
  • frontend/lib/interactions/api.ts
  • frontend/lib/interactions/types.ts
  • frontend/components/interactions/entity-card-footer.tsx
  • frontend/components/interactions/action-rail.tsx

Razor references

  • web/Pages/Requests/Index.cshtml.cs

Backend API now available

  • POST /api/interactions/access-request

The request body is:

{
  "reportName": "Report name",
  "reportUrl": "https://…",
  "directorName": "Director name"
}

Definition of done

  • The Request Access dialog submits a valid request successfully.
  • Validation and service errors are shown to the user.
  • Tests cover successful submission, validation failure, and service failure.
  • No Razor page handler is used by the Next.js flow.
  • Typecheck and lint pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions