1 | import { ZenObservable } from 'zen-observable-ts';
|
2 | export interface SubscriptionObserver<T> {
|
3 | closed: boolean;
|
4 | next(value: T): void;
|
5 | error(errorValue: any): void;
|
6 | complete(): void;
|
7 | }
|
8 | export declare enum CONTROL_MSG {
|
9 | CONNECTION_CLOSED = "Connection closed",
|
10 | CONNECTION_FAILED = "Connection failed",
|
11 | REALTIME_SUBSCRIPTION_INIT_ERROR = "AppSync Realtime subscription init error",
|
12 | SUBSCRIPTION_ACK = "Subscription ack",
|
13 | TIMEOUT_DISCONNECT = "Timeout disconnect"
|
14 | }
|
15 |
|
16 | export declare enum ConnectionState {
|
17 | Connected = "Connected",
|
18 | ConnectedPendingNetwork = "ConnectedPendingNetwork",
|
19 | ConnectionDisrupted = "ConnectionDisrupted",
|
20 | ConnectionDisruptedPendingNetwork = "ConnectionDisruptedPendingNetwork",
|
21 | Connecting = "Connecting",
|
22 | ConnectedPendingDisconnect = "ConnectedPendingDisconnect",
|
23 | Disconnected = "Disconnected",
|
24 | ConnectedPendingKeepAlive = "ConnectedPendingKeepAlive"
|
25 | }
|
26 | export declare type PubSubContent = Record<string, unknown> | string;
|
27 | export declare type PubSubContentObserver = ZenObservable.SubscriptionObserver<PubSubContent>;
|