1 | import { Connector } from './connector';
|
2 | import { PusherChannel, PresenceChannel } from './../channel';
|
3 | /**
|
4 | * This class creates a connector to Pusher.
|
5 | */
|
6 | export declare class PusherConnector extends Connector {
|
7 | /**
|
8 | * The Pusher instance.
|
9 | */
|
10 | pusher: any;
|
11 | /**
|
12 | * All of the subscribed channel names.
|
13 | */
|
14 | channels: any;
|
15 | /**
|
16 | * Create a fresh Pusher connection.
|
17 | */
|
18 | connect(): void;
|
19 | /**
|
20 | * Sign in the user via Pusher user authentication (https://pusher.com/docs/channels/using_channels/user-authentication/).
|
21 | */
|
22 | signin(): void;
|
23 | /**
|
24 | * Listen for an event on a channel instance.
|
25 | */
|
26 | listen(name: string, event: string, callback: Function): PusherChannel;
|
27 | /**
|
28 | * Get a channel instance by name.
|
29 | */
|
30 | channel(name: string): PusherChannel;
|
31 | /**
|
32 | * Get a private channel instance by name.
|
33 | */
|
34 | privateChannel(name: string): PusherChannel;
|
35 | /**
|
36 | * Get a private encrypted channel instance by name.
|
37 | */
|
38 | encryptedPrivateChannel(name: string): PusherChannel;
|
39 | /**
|
40 | * Get a presence channel instance by name.
|
41 | */
|
42 | presenceChannel(name: string): PresenceChannel;
|
43 | /**
|
44 | * Leave the given channel, as well as its private and presence variants.
|
45 | */
|
46 | leave(name: string): void;
|
47 | /**
|
48 | * Leave the given channel.
|
49 | */
|
50 | leaveChannel(name: string): void;
|
51 | /**
|
52 | * Get the socket ID for the connection.
|
53 | */
|
54 | socketId(): string;
|
55 | /**
|
56 | * Disconnect Pusher connection.
|
57 | */
|
58 | disconnect(): void;
|
59 | }
|