UNPKG

909 BTypeScriptView Raw
1export interface SubscriptionObserver<T> {
2 closed: boolean;
3 next(value: T): void;
4 error(errorValue: any): void;
5 complete(): void;
6}
7export declare enum CONTROL_MSG {
8 CONNECTION_CLOSED = "Connection closed",
9 CONNECTION_FAILED = "Connection failed",
10 REALTIME_SUBSCRIPTION_INIT_ERROR = "AppSync Realtime subscription init error",
11 SUBSCRIPTION_ACK = "Subscription ack",
12 TIMEOUT_DISCONNECT = "Timeout disconnect"
13}
14/** @enum {string} */
15export declare enum ConnectionState {
16 Connected = "Connected",
17 ConnectedPendingNetwork = "ConnectedPendingNetwork",
18 ConnectionDisrupted = "ConnectionDisrupted",
19 ConnectionDisruptedPendingNetwork = "ConnectionDisruptedPendingNetwork",
20 Connecting = "Connecting",
21 ConnectedPendingDisconnect = "ConnectedPendingDisconnect",
22 Disconnected = "Disconnected",
23 ConnectedPendingKeepAlive = "ConnectedPendingKeepAlive"
24}