1 | import zoomApi from 'zoomapi' |
2 |
|
3 | type Zoom = { |
4 | accountId: string |
5 | oauthClientId: string |
6 | oauthClientSecret: string |
7 | webhookSecretToken: string |
8 | } |
9 |
|
10 | export async function main( |
11 | resource: Zoom, |
12 | meetingId: string, |
13 | meeting: { |
14 | uuid?: string |
15 | id?: string |
16 | host_id?: string |
17 | topic?: string |
18 | type?: 1 | 2 | 3 | 8 |
19 | start_time?: string |
20 | duration?: number |
21 | schedule_for?: string |
22 | timezone?: string |
23 | created_at?: string |
24 | join_url?: string |
25 | agenda?: string |
26 | start_url?: string |
27 | password?: string |
28 | h323_password?: string |
29 | encrypted_password?: string |
30 | pmi?: number |
31 | tracking_fields?: { |
32 | field: string |
33 | value: string |
34 | }[] |
35 | occurrences?: { |
36 | occurrence_id: string |
37 | start_time: string |
38 | duration: number |
39 | status: string |
40 | }[] |
41 | settings?: { |
42 | host_video?: boolean |
43 | participant_video?: boolean |
44 | cn_meeting?: boolean |
45 | in_meeting?: boolean |
46 | join_before_host?: boolean |
47 | mute_upon_entry?: boolean |
48 | watermark?: boolean |
49 | use_pmi?: boolean |
50 | approval_type?: 0 | 1 | 2 |
51 | registration_type?: 1 | 2 | 3 |
52 | audio?: 'both' | 'telephony' | 'voip' |
53 | auto_recording?: 'local' | 'cloud' | 'none' |
54 | alternative_hosts?: string |
55 | close_registration?: boolean |
56 | waiting_room?: boolean |
57 | global_dial_in_countries?: string[] |
58 | global_dial_in_numbers?: { |
59 | country: string |
60 | country_name: string |
61 | city: string |
62 | number: string |
63 | type: string |
64 | }[] |
65 | contact_name?: string |
66 | contact_email?: string |
67 | registrants_confirmation_email?: boolean |
68 | registrants_email_notification?: boolean |
69 | meeting_authentication?: boolean |
70 | authentication_option?: string |
71 | authentication_domains?: string |
72 | authentication_name?: string |
73 | additional_data_center_regions?: string[] |
74 | } |
75 | recurrence?: { |
76 | type: 1 | 2 | 3 |
77 | repeat_interval: number |
78 | weekly_days: string |
79 | monthly_day: number |
80 | monthly_week: number |
81 | monthly_week_day: number |
82 | end_times: number |
83 | end_date_time: string |
84 | } |
85 | } |
86 | ) { |
87 | const client = zoomApi(resource) |
88 | const createdMeeting = await client.meetings.UpdateMeeting(meetingId, meeting) |
89 | return createdMeeting |
90 | } |
91 |
|