-
Notifications
You must be signed in to change notification settings - Fork 3
add pagination to list platform internal & external accounts #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wuvictor-95
wants to merge
1
commit into
main
Choose a base branch
from
01-29-add_pagination_to_list_platform_internal_external_accounts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
add pagination to list platform internal & external accounts #141
wuvictor-95
wants to merge
1
commit into
main
from
01-29-add_pagination_to_list_platform_internal_external_accounts
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49d8386 to
d01f7d9
Compare
Greptile OverviewGreptile SummaryThis PR adds cursor-based pagination support to the platform-level internal and external account listing endpoints ( Changes made:
Implementation notes:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| openapi/paths/platform/platform_external_accounts.yaml | Added pagination parameters (limit, cursor) and response fields (hasMore, nextCursor, totalCount) - correctly implemented |
| openapi/paths/platform/platform_internal_accounts.yaml | Added pagination parameters (limit, cursor) and response fields (hasMore, nextCursor, totalCount) - correctly implemented |
| package.json | Added packageManager field specifying yarn 4.5.0 |
Sequence Diagram
sequenceDiagram
participant Client
participant API as Grid API
participant DB as Database
Note over Client,DB: Initial Request (First Page)
Client->>API: GET /platform/internal-accounts?limit=20
API->>DB: Query internal accounts (limit=20)
DB-->>API: Return accounts + hasMore flag
API-->>Client: Response {data: [...], hasMore: true, nextCursor: "abc123", totalCount: 45}
Note over Client,DB: Subsequent Request (Next Page)
Client->>API: GET /platform/internal-accounts?limit=20&cursor=abc123
API->>DB: Query internal accounts from cursor (limit=20)
DB-->>API: Return accounts + hasMore flag
API-->>Client: Response {data: [...], hasMore: true, nextCursor: "def456", totalCount: 45}
Note over Client,DB: Final Page
Client->>API: GET /platform/internal-accounts?limit=20&cursor=def456
API->>DB: Query internal accounts from cursor (limit=20)
DB-->>API: Return remaining accounts
API-->>Client: Response {data: [...], hasMore: false, totalCount: 45}
Note over Client,DB: Same Pattern for External Accounts
Client->>API: GET /platform/external-accounts?currency=USD&limit=10
API->>DB: Query external accounts (filter: USD, limit=10)
DB-->>API: Return accounts + hasMore flag
API-->>Client: Response {data: [...], hasMore: true, nextCursor: "xyz789", totalCount: 25}
Greptile OverviewGreptile SummaryAdded cursor-based pagination to platform internal and external accounts list endpoints, matching the existing pagination pattern used across other list endpoints in the API. Key changes:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| openapi/paths/platform/platform_internal_accounts.yaml | Added cursor-based pagination with limit, cursor, hasMore, nextCursor, and totalCount fields - consistent with existing API patterns |
| openapi/paths/platform/platform_external_accounts.yaml | Added cursor-based pagination with limit, cursor, hasMore, nextCursor, and totalCount fields - consistent with existing API patterns |
| openapi.yaml | Bundled OpenAPI spec updated with pagination changes from source files, plus incidental fix adding type: string to LIGHTNING accountType |
| mintlify/openapi.yaml | Copy of bundled OpenAPI spec for Mintlify documentation - identical changes to root openapi.yaml |
Sequence Diagram
sequenceDiagram
participant Client
participant API as Grid API
participant DB as Database
Note over Client,DB: Initial Request (First Page)
Client->>API: GET /platform/internal-accounts?limit=20
API->>DB: Query accounts (LIMIT 21)
DB-->>API: Return up to 21 accounts
API->>API: Check if hasMore (count > limit)
API->>API: Generate nextCursor (if hasMore)
API-->>Client: {data: [20 accounts], hasMore: true, nextCursor: "abc123", totalCount: 45}
Note over Client,DB: Subsequent Request (Next Page)
Client->>API: GET /platform/internal-accounts?limit=20&cursor=abc123
API->>DB: Query accounts from cursor (LIMIT 21)
DB-->>API: Return up to 21 accounts
API->>API: Check if hasMore (count > limit)
API->>API: Generate nextCursor (if hasMore)
API-->>Client: {data: [20 accounts], hasMore: true, nextCursor: "def456", totalCount: 45}
Note over Client,DB: Final Request (Last Page)
Client->>API: GET /platform/internal-accounts?limit=20&cursor=def456
API->>DB: Query accounts from cursor (LIMIT 21)
DB-->>API: Return 5 accounts
API->>API: Check if hasMore (count <= limit)
API-->>Client: {data: [5 accounts], hasMore: false, totalCount: 45}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

No description provided.