Skip to content

feat(auth-manager)!: added support for pagination and sort for domain#69

Merged
CptSchnitz merged 1 commit into
masterfrom
domain-sort-pagination
Jun 16, 2025
Merged

feat(auth-manager)!: added support for pagination and sort for domain#69
CptSchnitz merged 1 commit into
masterfrom
domain-sort-pagination

Conversation

@CptSchnitz

Copy link
Copy Markdown
Contributor

No description provided.

@CptSchnitz CptSchnitz requested a review from Copilot June 16, 2025 15:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 pagination and sorting support to the domain management features. The key changes include:

  • Updating the DomainManager API to accept pagination and sorting parameters and return a tuple of [domains, count].
  • Adjusting controller and integration tests to handle the new return structure and validate the API response.
  • Updating the OpenAPI specification to document the new query parameters and response format.

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
packages/auth-manager/tests/unit/domain/models/domainModel.spec.ts Updated mocked repository method from find to findAndCount, but the expected output in the test was not updated to reflect the new tuple structure.
packages/auth-manager/tests/integration/domain/domain.spec.ts Adjusted response parsing and added a ts-expect-error for openapi-helpers type issues.
packages/auth-manager/src/domain/models/domainManager.ts Modified getDomains to incorporate pagination and sort options and to return a tuple of [results, count].
packages/auth-manager/src/domain/controllers/domainController.ts Updated the controller to parse query parameters and return an object with items and total.
packages/auth-manager/openapi3.yaml Enhanced documentation to define sorting, pagination parameters, and updated response schema.
Comments suppressed due to low confidence (1)

packages/auth-manager/tests/unit/domain/models/domainModel.spec.ts:22

  • The expected value in this test does not match the updated return type of getDomains, which now returns a tuple [domains, count]. Consider updating the expectation to reflect the tuple structure, for example: await expect(domainPromise).resolves.toStrictEqual([[{ name: 'avi' }], 1]).
await expect(domainPromise).resolves.toStrictEqual([{ name: 'avi' }]);

@CptSchnitz CptSchnitz merged commit 7bf0f08 into master Jun 16, 2025
10 checks passed
@netanelC netanelC deleted the domain-sort-pagination branch July 20, 2025 13:43
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.

2 participants