Client api support - Getinstances/listinstanceids#78
Merged
YunchuWang merged 5 commits intomainfrom Jan 30, 2026
Merged
Conversation
remove real dts test
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive querying and pagination capabilities for orchestration instances in the Durable Task JavaScript SDK. The implementation introduces new types for flexible filtering and pagination, implements two new client methods for querying orchestration states and listing instance IDs, and exports these APIs for public use.
Changes:
- Added pagination infrastructure with
Page,AsyncPageable, andcreateAsyncPageableutilities to support async iteration over paginated results - Introduced
OrchestrationQueryandListInstanceIdsOptionsinterfaces for flexible filtering and pagination of orchestration instances - Implemented
getAllInstancesandlistInstanceIdsmethods onTaskHubGrpcClientwith comprehensive E2E and unit tests
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/durabletask-js/src/orchestration/page.ts | Implements Page class and AsyncPageable utilities for pagination support |
| packages/durabletask-js/src/orchestration/orchestration-query.ts | Defines query and filtering interfaces with default page size constant |
| packages/durabletask-js/src/client/client.ts | Adds getAllInstances and listInstanceIds methods with helper for proto-to-SDK state conversion |
| packages/durabletask-js/src/index.ts | Exports new query types and pagination utilities for public API |
| packages/durabletask-js/test/query-apis.spec.ts | Unit tests for pagination and query type validation |
| test/e2e-azuremanaged/query-apis.spec.ts | Comprehensive E2E tests covering various query scenarios and edge cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
kaibocai
approved these changes
Jan 30, 2026
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
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.
This pull request adds advanced querying and pagination capabilities for orchestration instances in the Durable Task JS SDK. It introduces new types and utilities for paginated queries, implements two new methods on the
TaskHubGrpcClientfor querying orchestration states and listing instance IDs, and exports these new APIs for public use.New querying and pagination features:
OrchestrationQuery,ListInstanceIdsOptions, andDEFAULT_PAGE_SIZEtypes to support flexible filtering and paging of orchestration instances.Page,AsyncPageable, andcreateAsyncPageableutilities to provide async iteration over paginated results.Client API enhancements:
getAllInstancesmethod onTaskHubGrpcClientto query orchestration instances with flexible filters and return results as anAsyncPageablefor both item and page-wise async iteration.listInstanceIdsmethod for efficient, key-based pagination of instance IDs without fetching full instance metadata.OrchestrationStateinstances.Public API exports: