Signed-off-by: solimant <solimant@users.noreply.github.com>
This commit is contained in:
solimant
2025-01-02 00:26:13 +00:00
parent b7e98127e6
commit 845e8a1283
4 changed files with 14 additions and 93 deletions
@@ -126,17 +126,6 @@ export type Retry = {
export type Scaffold = {
body: ScaffolderScaffoldOptions;
};
/**
* @public
*/
export type StreamLogsEventStream = {
path: {
taskId: string;
};
query: {
after?: number;
};
};
/**
* @public
*/
@@ -407,34 +396,6 @@ export class DefaultApiClient {
});
}
/**
* Get event stream for a task by ID.
* @param taskId -
* @param after - Offset event ID to stream events after.
*/
public async streamLogsEventStream(
// @ts-ignore
request: StreamLogsEventStream,
options?: RequestOptions,
): Promise<TypedResponse<string>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
const uriTemplate = `/v2/tasks/{taskId}/eventstream{?after}`;
const uri = parser.parse(uriTemplate).expand({
taskId: request.path.taskId,
...request.query,
});
return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
headers: {
'Content-Type': 'application/json',
...(options?.token && { Authorization: `Bearer ${options?.token}` }),
},
method: 'GET',
});
}
/**
* Get events for a task by ID.
* @param taskId -