import type { ConnectedUser } from '../../types'; import type { StreamApiError } from '../types'; export interface ConnectionChangedEvent { type: 'connection.changed'; online: boolean; } /** * This event is sent when the WS connection is established and authenticated, this event contains the full user object as it is stored on the server * @export * @interface ConnectedEvent */ export interface ConnectedEvent { /** * The connection_id for this client * @type {string} * @memberof ConnectedEvent */ connection_id: string; /** * * @type {string} * @memberof ConnectedEvent */ created_at: string; /** * * @type {OwnUserResponse} * @memberof ConnectedEvent */ me: ConnectedUser; /** * The type of event: "connection.ok" in this case * @type {string} * @memberof ConnectedEvent */ type: string; } export declare enum UnhandledErrorType { ReconnectionReconciliation = "reconnection-reconciliation", FetchingOwnFieldsOnNewActivity = "fetching-own-fields-on-new-activity" } export type SyncFailure = { feed: string; reason: unknown; activity_id?: string; }; export type UnhandledErrorEvent = { type: 'errors.unhandled'; error_type: UnhandledErrorType; } & ({ error_type: UnhandledErrorType.ReconnectionReconciliation; failures: SyncFailure[]; } | { error_type: UnhandledErrorType.FetchingOwnFieldsOnNewActivity; error: StreamApiError; }); //# sourceMappingURL=event-models.d.ts.map