Update client and server convenience methods
This commit is contained in:
parent
45a4c9ee37
commit
099c2e2be3
1 changed files with 30 additions and 0 deletions
|
|
@ -23,6 +23,8 @@ import {
|
|||
EmptyResultSchema,
|
||||
LoggingMessageNotification,
|
||||
ResourceUpdatedNotification,
|
||||
ListRootsRequest,
|
||||
ListRootsResultSchema,
|
||||
} from "../types.js";
|
||||
|
||||
/**
|
||||
|
|
@ -154,6 +156,17 @@ export class Server<
|
|||
);
|
||||
}
|
||||
|
||||
async listRoots(
|
||||
params?: ListRootsRequest["params"],
|
||||
onprogress?: ProgressCallback,
|
||||
) {
|
||||
return this.request(
|
||||
{ method: "roots/list", params },
|
||||
ListRootsResultSchema,
|
||||
onprogress,
|
||||
);
|
||||
}
|
||||
|
||||
async sendLoggingMessage(params: LoggingMessageNotification["params"]) {
|
||||
return this.notification({ method: "notifications/message", params });
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue