-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Goal Reference
This issue was generated from .fleet/goals/api-sync.md. The worker agent should read this file for full context including verification commands, constraints, and structural guidance.
Objective
Update the SDK type definitions to accurately reflect the API Discovery Document's pagination schema. The SDK currently misses the nextPageToken string property from ListSessionsResponse, ListSourcesResponse, and ListActivitiesResponse.
Code-Level Diagnosis
Code path: packages/core/src/types.ts
Mechanism: The SDK does not currently expose the explicit raw response interfaces for listing collections (ListSessionsResponse, ListSourcesResponse, ListActivitiesResponse) representing the API's pagination responses.
Root cause: Missing explicit interface definitions for paginated REST API responses.
Current Implementation
// These types do not currently exist in packages/core/src/types.ts
// The SDK uses internal or inline types in some places, missing the standardized interfaces.Proposed Implementation
Files to modify:
packages/core/src/types.ts: AddListSessionsResponse,ListSourcesResponse, andListActivitiesResponseinterfaces includingnextPageToken?: string.
Integration (Before -> After)
--- packages/core/src/types.ts
+++ packages/core/src/types.ts
@@ -1016,6 +1016,21 @@
};
}
+export interface ListSessionsResponse {
+ sessions: SessionResource[];
+ nextPageToken?: string;
+}
+
+export interface ListSourcesResponse {
+ sources: Source[];
+ nextPageToken?: string;
+}
+
+export interface ListActivitiesResponse {
+ activities: Activity[];
+ nextPageToken?: string;
+}
+
// -----------------------------------------------------------------------------
// SessionClient (Interactive Paradigm)Test Scenarios
- TypeScript Verification: Ensure that adding these interfaces does not break existing code and satisfies the TypeScript compiler against API responses.
Target Files
packages/core/src/types.ts
Boundary Rules
Restrict your modifications exclusively to the files listed in the Target Files section. Ensure your source changes are entirely backward-compatible if unowned tests outside your boundary fail. Retain all existing file names and locations outside your explicitly declared target list.
Fleet Context
- Source:
jules:session:8897488729012114102 - Link: https://jules.google.com/session/8897488729012114102