pushy-electron 1.0.6 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Pushy.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ import {BrowserWindow} from "electron";
2
+
3
+ declare namespace Pushy {
4
+
5
+ type DeviceToken = string
6
+
7
+ type Listener<T> = (data: T) => void
8
+
9
+ function listen(): void
10
+
11
+ function setNotificationListener<T>(l: Listener<T>): void
12
+
13
+ function register(opts: { appId: string }): Promise<DeviceToken>
14
+
15
+ function isRegistered(): boolean
16
+
17
+ function subscribe(topics: string | string[]): Promise<void>
18
+
19
+ function unsubscribe(topics: string | string[]): Promise<void>
20
+
21
+ function validateDeviceCredentials(): Promise<void>
22
+
23
+ function setHeartbeatInterval(seconds: number): void
24
+
25
+ function isEnterpriseConfigured(): boolean
26
+
27
+ function setEnterpriseConfig(endpoint: string, mqttEndpoint: string): void
28
+
29
+ function disconnect(): void
30
+
31
+ function alert(win: BrowserWindow, msg: string): void
32
+ }
33
+
34
+ export = Pushy
35
+ export as namespace Pushy