capacitor_bindings 0.14.0

Capacitor bindings to help you build android and ios apps with rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
use wasm_bindgen::prelude::*;

#[wasm_bindgen]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins","SplashScreen"], js_name="show" )]
    pub(crate) async fn splash_show(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins","SplashScreen"], js_name="hide" )]
    pub(crate) async fn splash_hide(options: JsValue) -> Result<(), JsValue>;
}

#[wasm_bindgen()]
extern "C" {

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins","Clipboard"], js_name="write" )]
    pub(crate) async fn write(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch,final, js_namespace = ["Capacitor", "Plugins","Clipboard"],js_name="read" )]
    pub(crate) async fn read() -> Result<JsValue, JsValue>;

}

#[wasm_bindgen()]
extern "C" {

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins","Dialog"], js_name="alert" )]
    pub(crate) async fn alert(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch,final, js_namespace = ["Capacitor", "Plugins","Dialog"],js_name="prompt" )]
    pub(crate) async fn prompt(options: JsValue) -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins","Dialog"],js_name="confirm" )]
    pub(crate) async fn confirm(options: JsValue) -> Result<JsValue, JsValue>;

}

#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "ScreenReader"], js_name = "isEnabled")]
    pub(crate) async fn screen_reader_is_enabled() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "ScreenReader"], js_name = "speak")]
    pub(crate) async fn screen_reader_speak(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen( final,js_namespace = ["Capacitor", "Plugins", "ScreenReader"], js_name="addListener" )]
    pub(crate) fn screen_reader_add_listener(
        eventName: &str,
        listener_func: &Closure<dyn Fn(JsValue)>,
    ) -> JsValue;
}

#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "ActionSheet"], js_name = "showActions")]
    pub(crate) async fn action_sheet_show_actions(options: JsValue) -> Result<JsValue, JsValue>;
}

#[wasm_bindgen()]
extern "C" {

    /// Prompt the user to pick a photo from an album, or take a new photo with the camera.
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Camera"], js_name = "getPhoto")]
    pub(crate) async fn camera_get_photo(options: JsValue) -> Result<JsValue, JsValue>;

    /// Allows the user to pick multiple pictures from the photo gallery. On iOS 13 and older it only allows to pick one picture.
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Camera"], js_name = "pickImages")]
    pub(crate) async fn camera_pick_images(options: JsValue) -> Result<JsValue, JsValue>;

    /// iOS 14+ Only: Allows the user to update their limited photo library selection. On iOS 15+ returns all the limited photos after the picker dismissal. On iOS 14 or if the user gave full access to the photos it returns an empty array.
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Camera"],js_name = "pickLimitedLibraryPhotos")]
    pub(crate) async fn camera_pick_limited_library_photos() -> Result<JsValue, JsValue>;

    /// iOS 14+ Only: Return an array of photos selected from the limited photo library.
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Camera"], js_name = "getLimitedLibraryPhotos")]
    pub(crate) async fn camera_get_limited_library_photos() -> Result<JsValue, JsValue>;

    /// Check camera and photo album permissions
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Camera"], js_name = "checkPermissions")]
    pub(crate) async fn camera_check_permissions() -> Result<JsValue, JsValue>;

    /// Request camera and photo album permissions. Not implemented on Web
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Camera"], js_name = "requestPermissions")]
    pub(crate) async fn camera_request_permissions(options: JsValue) -> Result<JsValue, JsValue>;

}

#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Device"], js_name="getId" )]
    pub(crate) async fn device_get_id() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Device"], js_name="getInfo" )]
    pub(crate) async fn device_get_info() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Device"], js_name="getBatteryInfo" )]
    pub(crate) async fn device_get_battery_info() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Device"], js_name="getLanguageCode" )]
    pub(crate) async fn device_get_language_code() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Device"], js_name="getLanguageTag" )]
    pub(crate) async fn device_get_language_tag() -> Result<JsValue, JsValue>;

}

#[wasm_bindgen()]
extern "C" {

    /// Vibrate the device
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Haptics"], js_name="vibrate")]
    pub(crate) async fn haptics_vibrate(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Haptics"], js_name="impact")]
    pub(crate) async fn haptics_impact(options: JsValue) -> Result<(), JsValue>;

    /// Trigger a haptics "notification" feedback
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Haptics"], js_name="notification")]
    pub(crate) async fn haptics_notification(options: JsValue) -> Result<(), JsValue>;

    /// Trigger a selection started haptic hint
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Haptics"], js_name="selectionStart")]
    pub(crate) async fn haptics_selectionStart() -> Result<(), JsValue>;

    /// Trigger a selection changed haptic hint. If a selection was started already, this will cause the device to provide haptic feedback
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Haptics"], js_name="selectionChanged")]
    pub(crate) async fn haptics_selectionChanged() -> Result<(), JsValue>;

    /// If selectionStart() was called, selectionEnd() ends the selection. For example, call this when a user has lifted their finger from a control
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Haptics"], js_name="selectionEnd")]
    pub(crate) async fn haptics_selectionEnd() -> Result<(), JsValue>;
}

#[wasm_bindgen()]
extern "C" {

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "LocalNotifications"], js_name="areEnabled" )]
    pub(crate) async fn local_notifications_are_enabled() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "LocalNotifications"], js_name="checkPermissions" )]
    pub(crate) async fn local_notifications_check_permissions() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "LocalNotifications"], js_name="requestPermissions" )]
    pub(crate) async fn local_notifications_request_permissions() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "LocalNotifications"], js_name="getDeliveredNotifications" )]
    pub(crate) async fn local_notifications_get_delivered_notifications() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "LocalNotifications"], js_name="cancel" )]
    pub(crate) async fn local_notifications_cancel(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "LocalNotifications"], js_name="removeDeliveredNotifications" )]
    pub(crate) async fn local_notifications_remove_delivered_notifications(
        delivered: JsValue,
    ) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "LocalNotifications"], js_name="removeAllDeliveredNotifications" )]
    pub(crate) async fn local_notifications_remove_all_delivered_notifications(
    ) -> Result<(), JsValue>;

    /// Schedule one or more local notifications.
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "LocalNotifications"], js_name="schedule" )]
    pub(crate) async fn local_notifications_schedule(options: JsValue) -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "LocalNotifications"], js_name="registerActionTypes" )]
    pub(crate) async fn local_notifications_register_action_types(
        options: JsValue,
    ) -> Result<(), JsValue>;

    #[wasm_bindgen( final,js_namespace = ["Capacitor", "Plugins", "LocalNotifications"], js_name="addListener" )]
    pub(crate) fn local_notifications_add_listener(
        eventName: &str,
        listener_func: &Closure<dyn Fn(JsValue)>,
    ) -> JsValue;
}

#[wasm_bindgen()]
extern "C" {
    /// Query the current status of the network connection.
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Network"], js_name="getStatus" )]
    pub(crate) async fn network_get_status() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(final,js_namespace = ["Capacitor", "Plugins", "Network"], js_name="addListener" )]
    pub(crate) fn network_add_listener(
        eventName: &str,
        listener_func: &Closure<dyn Fn(JsValue)>,
    ) -> JsValue;
}

#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Share"], js_name="canShare" )]
    pub(crate) async fn share_can_share() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Share"], js_name="share" )]
    pub(crate) async fn share_share(options: JsValue) -> Result<JsValue, JsValue>;
}

#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "StatusBar"], js_name="show" )]
    pub(crate) async fn status_bar_show() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "StatusBar"], js_name="hide" )]
    pub(crate) async fn status_bar_hide() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "StatusBar"], js_name="setStyle" )]
    pub(crate) async fn status_bar_set_style(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "StatusBar"], js_name="setBackgroundColor" )]
    pub(crate) async fn status_bar_set_background_color(options: JsValue) -> Result<(), JsValue>;

    /// Set whether or not the status bar should overlay the webview to allow usage of the space underneath it.
    /// This method is only supported on Android.
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "StatusBar"], js_name="setOverlaysWebView" )]
    pub(crate) async fn status_bar_set_overlays_web_view(options: JsValue) -> Result<(), JsValue>;
}

#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Toast"], js_name="show" )]
    pub(crate) async fn toast_show(options: JsValue) -> Result<(), JsValue>;
}




#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "App"], js_name="exitApp" )]
    pub(crate) async fn app_exit_app() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "App"], js_name="minimizeApp" )]
    pub(crate) async fn app_minimize_app() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "App"], js_name="getInfo" )]
    pub(crate) async fn app_get_info() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "App"], js_name="getState" )]
    pub(crate) async fn app_get_state() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "App"], js_name="getLaunchUrl" )]
    pub(crate) async fn app_get_launch_url() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(final, js_namespace = ["Capacitor", "Plugins", "App"], js_name="addListener" )]
    pub(crate) fn app_add_listener(
        eventName: &str,
        listener_func: &Closure<dyn Fn(JsValue)>,
    ) -> JsValue;
}

#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AppLauncher"], js_name="canOpenUrl" )]
    pub(crate) async fn can_open_url(options: JsValue) -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AppLauncher"], js_name="openUrl" )]
    pub(crate) async fn open_url(options: JsValue) -> Result<JsValue, JsValue>;

}

#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Preferences"], js_name="configure" )]
    pub(crate) async fn preferences_configure(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Preferences"], js_name="set" )]
    pub(crate) async fn preferences_set(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Preferences"], js_name="remove" )]
    pub(crate) async fn preferences_remove(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Preferences"], js_name="get" )]
    pub(crate) async fn preferences_get(options: JsValue) -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Preferences"], js_name="clear" )]
    pub(crate) async fn preferences_clear() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Preferences"], js_name="keys" )]
    pub(crate) async fn preferences_keys() -> Result<JsValue, JsValue>;
}

#[wasm_bindgen()]
extern "C" {

    /// Open a page with the specified options.
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "Browser"], js_name = "open")]
    pub(crate) async fn browser_open(options: JsValue) -> Result<(), JsValue>;

    /// Web & iOS only: Close an open browser window. No-op on other platforms.
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Browser"], js_name = "close")]
    pub(crate) async fn browser_close() -> Result<(), JsValue>;

    #[wasm_bindgen(final, js_namespace = ["Capacitor", "Plugins", "Browser"],js_name = "addListener")]
    pub(crate) fn browser_add_listener(
        eventName: &str,
        listener_func: &Closure<dyn Fn(JsValue)>,
    ) -> JsValue;

    /// Remove all native listeners for this plugin.
    #[wasm_bindgen(catch, final,js_namespace = ["Capacitor", "Plugins", "Browser"], js_name = "removeAllListeners")]
    pub(crate) async fn browser_remove_all_listeners() -> Result<(), JsValue>;
}

#[cfg(all(feature = "review_plugin"))]
#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "InAppReview"], js_name="requestReview" )]
    pub(crate) async fn request_review() -> Result<(), JsValue>;
}

#[cfg(feature = "game_plugin")]
#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "CapacitorGameConnect"], js_name="signIn" )]
    pub(crate) async fn game_connect_sign_in() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "CapacitorGameConnect"], js_name="showLeaderboard" )]
    pub(crate) async fn game_connect_show_leaderboard(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "CapacitorGameConnect"], js_name="submitScore" )]
    pub(crate) async fn game_connect_submit_score(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "CapacitorGameConnect"], js_name="showAchievements" )]
    pub(crate) async fn game_connect_show_achievements() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "CapacitorGameConnect"], js_name="unlockAchievement" )]
    pub(crate) async fn game_connect_unlock_achievement(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "CapacitorGameConnect"], js_name="incrementAchievementProgress" )]
    pub(crate) async fn game_connect_increment_achievement_progress(
        options: JsValue,
    ) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "CapacitorGameConnect"], js_name="getUserTotalScore" )]
    pub(crate) async fn game_connect_get_user_total_score(
        options: JsValue,
    ) -> Result<JsValue, JsValue>;

}

#[cfg(feature = "safe_area_plugin")]
#[wasm_bindgen]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "SafeArea"], js_name="enable" )]
    pub (crate) fn safe_area_enable(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "SafeArea"], js_name="disable" )]
    pub (crate) fn safe_area_disable(options: JsValue) -> Result<(), JsValue>;
}

#[cfg(feature = "admob_plugin")]
#[wasm_bindgen()]
extern "C" {
    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="initialize" )]
    pub(crate) async fn admob_initialize(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="trackingAuthorizationStatus" )]
    pub(crate) async fn admob_tracking_authorization_status() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="requestTrackingAuthorization" )]
    pub(crate) async fn admob_request_tracking_authorization() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="setApplicationMuted" )]
    pub(crate) async fn admob_set_application_muted(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="setApplicationVolume" )]
    pub(crate) async fn admob_set_application_volume(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="showBanner" )]
    pub(crate) async fn admob_show_banner(options: JsValue) -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="hideBanner" )]
    pub(crate) async fn admob_hide_banner() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="resumeBanner" )]
    pub(crate) async fn admob_resume_banner() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="removeBanner" )]
    pub(crate) async fn admob_remove_banner() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="requestConsentInfo" )]
    pub(crate) async fn admob_request_consent_info(options: JsValue) -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="showConsentForm" )]
    pub(crate) async fn admob_show_consent_form() -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="resetConsentInfo" )]
    pub(crate) async fn admob_reset_consent_info() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="prepareInterstitial" )]
    pub(crate) async fn admob_prepare_interstitial(options: JsValue) -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="showInterstitial" )]
    pub(crate) async fn admob_show_interstitial() -> Result<(), JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="prepareRewardVideoAd" )]
    pub(crate) async fn admob_prepare_reward_video_ad(options: JsValue)
        -> Result<JsValue, JsValue>;

    #[wasm_bindgen(catch, final, js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="showRewardVideoAd" )]
    pub(crate) async fn admob_show_reward_video_ad() -> Result<JsValue, JsValue>;

    #[wasm_bindgen( final,js_namespace = ["Capacitor", "Plugins", "AdMob"], js_name="addListener" )]
    pub(crate) fn admob_add_listener(
        eventName: &str,
        listener_func: &Closure<dyn Fn(JsValue)>,
    ) -> JsValue;
}