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
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = PushSubscription , typescript_type = "PushSubscription")]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `PushSubscription` class."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushSubscription`*"]
    pub type PushSubscription;
    # [wasm_bindgen (structural , method , getter , js_class = "PushSubscription" , js_name = endpoint)]
    #[doc = "Getter for the `endpoint` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription/endpoint)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushSubscription`*"]
    pub fn endpoint(this: &PushSubscription) -> String;
    #[cfg(feature = "PushSubscriptionOptions")]
    # [wasm_bindgen (structural , method , getter , js_class = "PushSubscription" , js_name = options)]
    #[doc = "Getter for the `options` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription/options)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushSubscription`, `PushSubscriptionOptions`*"]
    pub fn options(this: &PushSubscription) -> PushSubscriptionOptions;
    #[cfg(feature = "PushEncryptionKeyName")]
    # [wasm_bindgen (catch , method , structural , js_class = "PushSubscription" , js_name = getKey)]
    #[doc = "The `getKey()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription/getKey)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushEncryptionKeyName`, `PushSubscription`*"]
    pub fn get_key(
        this: &PushSubscription,
        name: PushEncryptionKeyName,
    ) -> Result<Option<::js_sys::ArrayBuffer>, JsValue>;
    #[cfg(feature = "PushSubscriptionJson")]
    # [wasm_bindgen (catch , method , structural , js_class = "PushSubscription" , js_name = toJSON)]
    #[doc = "The `toJSON()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription/toJSON)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushSubscription`, `PushSubscriptionJson`*"]
    pub fn to_json(this: &PushSubscription) -> Result<PushSubscriptionJson, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "PushSubscription" , js_name = unsubscribe)]
    #[doc = "The `unsubscribe()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription/unsubscribe)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushSubscription`*"]
    pub fn unsubscribe(this: &PushSubscription) -> Result<::js_sys::Promise, JsValue>;
}