@@ -12,112 +12,11 @@ import type { VideoApiAdapter, VideoCallData } from "@calcom/types/VideoApiAdapt
12
12
import { getZoomAppKeys } from "./getZoomAppKeys" ;
13
13
14
14
/** @link https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate */
15
- export const zoomEventResultSchema = z
16
- . object ( {
17
- assistant_id : z . string ( ) ,
18
- host_email : z . string ( ) ,
19
- id : z . number ( ) ,
20
- registration_url : z . string ( ) ,
21
- agenda : z . string ( ) ,
22
- created_at : z . string ( ) ,
23
- duration : z . number ( ) ,
24
- h323_password : z . string ( ) ,
25
- join_url : z . string ( ) ,
26
- occurrences : z . array (
27
- z . object ( {
28
- duration : z . number ( ) ,
29
- occurrence_id : z . string ( ) ,
30
- start_time : z . string ( ) ,
31
- status : z . string ( ) ,
32
- } )
33
- ) ,
34
- password : z . string ( ) ,
35
- pmi : z . number ( ) ,
36
- pre_schedule : z . boolean ( ) ,
37
- recurrence : z . object ( {
38
- end_date_time : z . string ( ) ,
39
- end_times : z . number ( ) ,
40
- monthly_day : z . number ( ) ,
41
- monthly_week : z . number ( ) ,
42
- monthly_week_day : z . number ( ) ,
43
- repeat_interval : z . number ( ) ,
44
- type : z . number ( ) ,
45
- weekly_days : z . string ( ) ,
46
- } ) ,
47
- settings : z . object ( {
48
- allow_multiple_devices : z . boolean ( ) ,
49
- alternative_hosts : z . string ( ) ,
50
- alternative_hosts_email_notification : z . boolean ( ) ,
51
- alternative_host_update_polls : z . boolean ( ) ,
52
- approval_type : z . number ( ) ,
53
- approved_or_denied_countries_or_regions : z . object ( {
54
- approved_list : z . array ( z . string ( ) ) ,
55
- denied_list : z . array ( z . string ( ) ) ,
56
- enable : z . boolean ( ) ,
57
- method : z . string ( ) ,
58
- } ) ,
59
- audio : z . string ( ) ,
60
- authentication_domains : z . string ( ) ,
61
- authentication_exception : z . array (
62
- z . object ( { email : z . string ( ) , name : z . string ( ) , join_url : z . string ( ) } )
63
- ) ,
64
- authentication_name : z . string ( ) ,
65
- authentication_option : z . string ( ) ,
66
- auto_recording : z . string ( ) ,
67
- breakout_room : z . object ( {
68
- enable : z . boolean ( ) ,
69
- rooms : z . array ( z . object ( { name : z . string ( ) , participants : z . array ( z . string ( ) ) } ) ) ,
70
- } ) ,
71
- calendar_type : z . number ( ) ,
72
- close_registration : z . boolean ( ) ,
73
- cn_meeting : z . boolean ( ) ,
74
- contact_email : z . string ( ) ,
75
- contact_name : z . string ( ) ,
76
- custom_keys : z . array ( z . object ( { key : z . string ( ) , value : z . string ( ) } ) ) ,
77
- email_notification : z . boolean ( ) ,
78
- encryption_type : z . string ( ) ,
79
- enforce_login : z . boolean ( ) ,
80
- enforce_login_domains : z . string ( ) ,
81
- focus_mode : z . boolean ( ) ,
82
- global_dial_in_countries : z . array ( z . string ( ) ) ,
83
- global_dial_in_numbers : z . array (
84
- z . object ( {
85
- city : z . string ( ) ,
86
- country : z . string ( ) ,
87
- country_name : z . string ( ) ,
88
- number : z . string ( ) ,
89
- type : z . string ( ) ,
90
- } )
91
- ) ,
92
- host_video : z . boolean ( ) ,
93
- in_meeting : z . boolean ( ) ,
94
- jbh_time : z . number ( ) ,
95
- join_before_host : z . boolean ( ) ,
96
- language_interpretation : z . object ( {
97
- enable : z . boolean ( ) ,
98
- interpreters : z . array ( z . object ( { email : z . string ( ) , languages : z . string ( ) } ) ) ,
99
- } ) ,
100
- meeting_authentication : z . boolean ( ) ,
101
- mute_upon_entry : z . boolean ( ) ,
102
- participant_video : z . boolean ( ) ,
103
- private_meeting : z . boolean ( ) ,
104
- registrants_confirmation_email : z . boolean ( ) ,
105
- registrants_email_notification : z . boolean ( ) ,
106
- registration_type : z . number ( ) ,
107
- show_share_button : z . boolean ( ) ,
108
- use_pmi : z . boolean ( ) ,
109
- waiting_room : z . boolean ( ) ,
110
- watermark : z . boolean ( ) ,
111
- host_save_video_order : z . boolean ( ) ,
112
- } ) ,
113
- start_time : z . string ( ) ,
114
- start_url : z . string ( ) ,
115
- timezone : z . string ( ) ,
116
- topic : z . string ( ) ,
117
- tracking_fields : z . array ( z . object ( { field : z . string ( ) , value : z . string ( ) , visible : z . boolean ( ) } ) ) ,
118
- type : z . number ( ) ,
119
- } )
120
- . deepPartial ( ) ;
15
+ const zoomEventResultSchema = z . object ( {
16
+ id : z . number ( ) ,
17
+ join_url : z . string ( ) ,
18
+ password : z . string ( ) ,
19
+ } ) ;
121
20
122
21
export type ZoomEventResult = z . infer < typeof zoomEventResultSchema > ;
123
22
@@ -336,7 +235,7 @@ const ZoomVideoApiAdapter = (credential: Credential): VideoApiAdapter => {
336
235
body : JSON . stringify ( translateEvent ( event ) ) ,
337
236
} ) ;
338
237
339
- const result = zoomEventResultSchema . passthrough ( ) . parse ( response ) ;
238
+ const result = zoomEventResultSchema . parse ( response ) ;
340
239
if ( result . id && result . join_url ) {
341
240
return Promise . resolve ( {
342
241
type : "zoom_video" ,
0 commit comments