Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c4f148d

Browse files
delete a meeting
1 parent 70e9828 commit c4f148d

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

‎index.ts‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ import { zodToJsonSchema } from "zod-to-json-schema";
1010
import {
1111
createMeeting,
1212
CreateMeetingOptionsSchema,
13+
deleteMeeting,
14+
DeleteMeetingOptionsSchema,
1315
ListMeetingOptionsSchema,
1416
listMeetings,
1517
} from "./operations/meeting.js";
1618
import { z } from "zod";
17-
import { getAccessToken } from "./common/auth.js";
1819

1920
const server = new Server(
2021
{
@@ -41,6 +42,11 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
4142
description: "List scheduled meetings",
4243
inputSchema: zodToJsonSchema(ListMeetingOptionsSchema),
4344
},
45+
{
46+
name: "delete_meeting",
47+
description: "Delete a meeting with a given ID",
48+
inputSchema: zodToJsonSchema(DeleteMeetingOptionsSchema),
49+
},
4450
],
4551
};
4652
});
@@ -66,6 +72,14 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
6672
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
6773
};
6874
}
75+
76+
case "delete_meeting": {
77+
const args = DeleteMeetingOptionsSchema.parse(request.params.arguments);
78+
const result = await deleteMeeting(args);
79+
return {
80+
content: [{ type: "text", text: result }],
81+
};
82+
}
6983
}
7084
} catch (error) {
7185
if (error instanceof z.ZodError) {

‎operations/meeting.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@ export const ListMeetingOptionsSchema = z.object({
2020
type: z.string().optional().describe("The type of meeting."),
2121
});
2222

23+
export const DeleteMeetingOptionsSchema = z.object({
24+
id: z.number().describe("The ID of the meeting to delete."),
25+
});
26+
2327
export type CreateMeetingOptions = z.infer<typeof CreateMeetingOptionsSchema>;
2428
export type ListMeetingOptions = z.infer<typeof ListMeetingOptionsSchema>;
29+
export type DeleteMeetingOptions = z.infer<typeof DeleteMeetingOptionsSchema>;
2530

2631
export async function createMeeting(options: CreateMeetingOptions) {
2732
const response = await zoomRequest(
@@ -50,3 +55,13 @@ export async function listMeetings(options: ListMeetingOptions) {
5055
});
5156
return ZoomListMeetingsSchema.parse(response);
5257
}
58+
59+
export async function deleteMeeting(options: DeleteMeetingOptions) {
60+
const response = await zoomRequest(
61+
`https://api.zoom.us/v2/meetings/${options.id}`,
62+
{
63+
method: "DELETE",
64+
},
65+
);
66+
return response;
67+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /