Skip to content

Commit f7826bc

Browse files
authored
chore(Transfer, TypeScript): fix event list response types (#754)
The Transfer service returns a `total` property from both the user and endpoint-manager `/event_list` endpoints. This value is *not* included in some other responses that use [offset paging](https://docs.globus.org/api/transfer/overview/#offset_paging). Similarly, the `event_list` responses do *not* include `has_next_page`, so I've marked it as optional. Finally, the `DATA_TYPE` property from this endpoint was not quite correct.
1 parent c2c5b9c commit f7826bc

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/services/transfer/service/task.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export type EventDocument = {
232232
};
233233

234234
export type TaskEventListDocument = {
235-
DATA_TYPE: 'task_event_list';
235+
DATA_TYPE: 'event_list';
236236
DATA: EventDocument[];
237237
};
238238

src/services/transfer/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ export type Pagination = {
8989
Response: {
9090
limit: number;
9191
offset: number;
92-
has_next_page: `${boolean}` | boolean;
92+
has_next_page?: `${boolean}` | boolean;
93+
total?: number;
9394
};
9495
};
9596
/**

0 commit comments

Comments
 (0)