@@ -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 -
|
||||
|
||||
Reference in New Issue
Block a user